Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewKubeconfigKeychain ¶
func NewKubeconfigKeychain(ctx context.Context, opts ...Option) resolver.Credential
NewKubeconfigKeychain provides a keychain which can sync its contents with kubernetes API server by fetching all `kubernetes.io/dockerconfigjson` secrets in the cluster with provided kubeconfig. It's OK that config provides kubeconfig path but the file doesn't exist at that moment. In this case, this keychain keeps on trying to read the specified path periodically and when the file is actually provided, this keychain tries to access API server using the file. This is useful for some environments (e.g. single node cluster with containerized apiserver) where stargz snapshotter needs to start before everything, including booting containerd/kubelet/apiserver and configuring users/roles. TODO: support update of kubeconfig file