This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support basic auth and HTTP for image registries
The image registry code assumed - all image registries use HTTPS - all image registries use token authentication ..but if you run your own registry in your cluster, neither of these things is likely to be true. To support basic authentication, all we need to do is add a handler in when constructing the registry client; it will get used if the authentication challenge indicates so. Supporting HTTP is (oddly) a bit trickier, since there's no indication from an image name (which is all we have) whether the registry uses HTTP or HTTPS. Luckily, registries will tend to redirect any HTTP requests to HTTPS, so if we're not sure we can simply try HTTP first and follow any redirect.
- Loading branch information
Showing
2 changed files
with
60 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters