Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDockerconfigKeychain ¶
func NewKubeconfigKeychain ¶
func NewKubeconfigKeychain(ctx context.Context, opts ...KubeconfigOption) func(string) (string, string, error)
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
Types ¶
type KubeconfigOption ¶
type KubeconfigOption func(*options)
func WithKubeconfigPath ¶
func WithKubeconfigPath(path string) KubeconfigOption