Commit Graph

26 Commits (750881c0ab62a9f59d53582bc33826caa167aa83)

Author SHA1 Message Date
tiffany jernigan 5224b94282 Credential provider Provide takes image (general) 2019-07-02 21:18:13 -07:00
Davanum Srinivas 954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Clayton Coleman 7e398dc31f
Remove dependency on docker daemon for core credential types
We are removing dependencies on docker types where possible in the core
libraries. credentialprovider is generic to Docker and uses a public API
(the config file format) that must remain stable. Create an equivalent type
and use a type cast (which would error if we ever change the type) in the
dockershim. We already perform a transformation like this for CRI and so
we aren't changing much.
2018-09-07 16:36:14 -04:00
Clayton Coleman 5210e6fefd
Remove dependency on v1 API in base credential provider
Credential provider is useful without the v1 API, move the only
dependency out so that we can more easily move credential provider to a
utility library in the future (other callers besides Kubelet may need to
load pull secrets like Docker).
2018-01-05 17:52:06 -05:00
Yang Guo bf2ced837c Updates Docker Engine API 2017-07-13 12:55:07 -07:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Chao Xu 4f3d0e3bde more dependencies packages:
pkg/metrics
pkg/credentialprovider
pkg/security
pkg/securitycontext
pkg/serviceaccount
pkg/storage
pkg/fieldpath
2016-11-23 15:53:09 -08:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Harry Zhang a3939473d3 Refactor PullImage RemoveImage methods
Refactor image remove
2016-04-23 10:33:47 -04:00
Rudi Chiarito ca6bdba014 Allow lazy binding in credential providers; don't use it in AWS yet
This is step one for cross-region ECR support and has no visible effects yet.
I'm not crazy about the name LazyProvide. Perhaps the interface method could
remain like that and the package method of the same name could become
LateBind(). I still don't understand why the credential provider has a
DockerConfigEntry that has the same fields but is distinct from
docker.AuthConfiguration. I had to write a converter now that we do that in
more than one place.

In step two, I'll add another intermediate, lazy provider for each AWS region,
whose empty LazyAuthConfiguration will have a refresh time of months or years.
Behind the scenes, it'll use an actual ecrProvider with the usual ~12 hour
credentials, that will get created (and later refreshed) only when kubelet is
attempting to pull an image. If we simply turned ecrProvider directly into a
lazy provider, we would bypass all the caching and get new credentials for
each image pulled.
2016-03-29 15:39:30 -04:00
Clayton Coleman 8c27314915 Unqualified host:port pairs are valid Docker auth fields
The dockercfg and .docker/config.json files can contain host:path
combos, which are not correctly parsed by the keyring.
2016-02-18 13:18:34 -05:00
Tim Hockin 9698e957a6 Merge pull request #12717 from tamnd/fixdockercfg
Fix new docker config format for private registries
2015-09-18 14:43:38 -07:00
tummychow 78ce5da988 Move util.StringSet into its own package
A lot of packages use StringSet, but they don't use anything else from
the util package. Moving StringSet into another package will shrink
their dependency trees significantly.
2015-09-10 12:04:15 -07:00
tamnd 906b279080 Support new docker config format for private registries 2015-08-22 15:37:25 +07:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Eric Tune 760caea187 Merge pull request #8863 from mfojtik/fix-default-registry-matcher
Add 'docker.io' and 'index.docker.io' to default registry matcher
2015-06-01 10:28:34 -07:00
Michal Fojtik 9a94f7cc38 Add 'docker.io' and 'index.docker.io' to default registry matcher
Signed-off-by: Michal Fojtik <mfojtik@redhat.com>
2015-05-30 12:59:18 +02:00
Nghia Tran 8b57b6fea6 Support glob wildcards for gcr.io credentials 2015-05-29 10:44:59 -07:00
deads2k 0c14e0cbdb add pull secret references to pods 2015-05-18 16:18:16 -04:00
deads2k 2ecb0ebd73 make the dockerkeyring handle mutiple matching credentials 2015-05-11 09:54:03 -04:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Brendan Burns 0532c46217 Add a more detailed error message for potential auth fails in docker pull. 2015-02-12 17:00:59 -08:00
Matt Moore 2d396797a9 Fix for issue 3797.
Docker's logic for resolving credentials from .dockercfg accepts two kinds of matches:
1. an exact match between the dockercfg entry and the image prefix
2. a hostname match between the dockercfg entry and the image prefix

This change implements the latter, which permits the docker client to take .dockercfg entries of the form:
   https://quay.io/v1/
and use them for images of the form:
   quay.io/foo/bar
even though they are not a prefix-match.
2015-01-26 14:06:12 -08:00
Matt Moore 0c5d9ed0d2 Implements a credentialprovider library for use by DockerPuller.
This change refactors the way Kubelet's DockerPuller handles the docker config credentials to utilize a new credentialprovider library.

The credentialprovider library is based on several of the files from the Kubelet's dockertools directory, but supports a new pluggable model for retrieving a .dockercfg-compatible JSON blob with credentials.

With this change, the Kubelet will lazily ask for the docker config from a set of DockerConfigProvider extensions each time it needs a credential.

This change provides common implementations of DockerConfigProvider for:
 - "Default": load .dockercfg from disk
 - "Caching": wraps another provider in a cache that expires after a pre-specified lifetime.

GCP-only:
 - "google-dockercfg": reads a .dockercfg from a GCE instance's metadata
 - "google-dockercfg-url": reads a .dockercfg from a URL specified in a GCE instance's metadata.
 - "google-container-registry": reads an access token from GCE metadata into a password field.
2014-11-17 21:46:54 -08:00