mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-19 00:19:14 +00:00
Generate and format files
- Run hack/update-codegen.sh - Run hack/update-generated-device-plugin.sh - Run hack/update-generated-protobuf.sh - Run hack/update-generated-runtime.sh - Run hack/update-generated-swagger-docs.sh - Run hack/update-openapi-spec.sh - Run hack/update-gofmt.sh Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
@@ -84,12 +84,12 @@ func GetPreferredDockercfgPath() string {
|
||||
return preferredPath
|
||||
}
|
||||
|
||||
//DefaultDockercfgPaths returns default search paths of .dockercfg
|
||||
// DefaultDockercfgPaths returns default search paths of .dockercfg
|
||||
func DefaultDockercfgPaths() []string {
|
||||
return []string{GetPreferredDockercfgPath(), workingDirPath, homeDirPath, rootDirPath}
|
||||
}
|
||||
|
||||
//DefaultDockerConfigJSONPaths returns default search paths of .docker/config.json
|
||||
// DefaultDockerConfigJSONPaths returns default search paths of .docker/config.json
|
||||
func DefaultDockerConfigJSONPaths() []string {
|
||||
return []string{GetPreferredDockercfgPath(), workingDirPath, homeJSONDirPath, rootJSONDirPath}
|
||||
}
|
||||
@@ -156,7 +156,7 @@ func ReadDockerConfigJSONFile(searchPaths []string) (cfg DockerConfig, err error
|
||||
|
||||
}
|
||||
|
||||
//ReadSpecificDockerConfigJSONFile attempts to read docker configJSON from a given file path.
|
||||
// ReadSpecificDockerConfigJSONFile attempts to read docker configJSON from a given file path.
|
||||
func ReadSpecificDockerConfigJSONFile(filePath string) (cfg DockerConfig, err error) {
|
||||
var contents []byte
|
||||
|
||||
|
@@ -110,8 +110,9 @@ type DockerConfigURLKeyProvider struct {
|
||||
}
|
||||
|
||||
// ContainerRegistryProvider is a DockerConfigProvider that provides a dockercfg with:
|
||||
// Username: "_token"
|
||||
// Password: "{access token from metadata}"
|
||||
//
|
||||
// Username: "_token"
|
||||
// Password: "{access token from metadata}"
|
||||
type ContainerRegistryProvider struct {
|
||||
MetadataProvider
|
||||
}
|
||||
|
@@ -31,9 +31,9 @@ import (
|
||||
// reverse index across the registry endpoints. A registry endpoint is made
|
||||
// up of a host (e.g. registry.example.com), but it may also contain a path
|
||||
// (e.g. registry.example.com/foo) This index is important for two reasons:
|
||||
// - registry endpoints may overlap, and when this happens we must find the
|
||||
// most specific match for a given image
|
||||
// - iterating a map does not yield predictable results
|
||||
// - registry endpoints may overlap, and when this happens we must find the
|
||||
// most specific match for a given image
|
||||
// - iterating a map does not yield predictable results
|
||||
type DockerKeyring interface {
|
||||
Lookup(image string) ([]AuthConfig, bool)
|
||||
}
|
||||
@@ -197,8 +197,9 @@ func URLsMatchStr(glob string, target string) (bool, error) {
|
||||
// glob wild cards in the host name.
|
||||
//
|
||||
// Examples:
|
||||
// globURL=*.docker.io, targetURL=blah.docker.io => match
|
||||
// globURL=*.docker.io, targetURL=not.right.io => no match
|
||||
//
|
||||
// globURL=*.docker.io, targetURL=blah.docker.io => match
|
||||
// globURL=*.docker.io, targetURL=not.right.io => no match
|
||||
//
|
||||
// Note that we don't support wildcards in ports and paths yet.
|
||||
func URLsMatch(globURL *url.URL, targetURL *url.URL) (bool, error) {
|
||||
|
@@ -367,7 +367,7 @@ type execPlugin struct {
|
||||
|
||||
// ExecPlugin executes the plugin binary with arguments and environment variables specified in CredentialProviderConfig:
|
||||
//
|
||||
// $ ENV_NAME=ENV_VALUE <plugin-name> args[0] args[1] <<<request
|
||||
// $ ENV_NAME=ENV_VALUE <plugin-name> args[0] args[1] <<<request
|
||||
//
|
||||
// The plugin is expected to receive the CredentialProviderRequest API via stdin from the kubelet and
|
||||
// return CredentialProviderResponse via stdout.
|
||||
|
@@ -32,9 +32,10 @@ var providers = make(map[string]DockerConfigProvider)
|
||||
|
||||
// RegisterCredentialProvider is called by provider implementations on
|
||||
// initialization to register themselves, like so:
|
||||
// func init() {
|
||||
// RegisterCredentialProvider("name", &myProvider{...})
|
||||
// }
|
||||
//
|
||||
// func init() {
|
||||
// RegisterCredentialProvider("name", &myProvider{...})
|
||||
// }
|
||||
func RegisterCredentialProvider(name string, provider DockerConfigProvider) {
|
||||
providersMutex.Lock()
|
||||
defer providersMutex.Unlock()
|
||||
|
Reference in New Issue
Block a user