Documentation ¶
Overview ¶
Package kubeconfig provides functionality for parsing Kubernetes secret with a KubeConfig in a key into a client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientFromSecret ¶
func ClientFromSecret(ctx context.Context, cl client.Client, name types.NamespacedName, opts ClientOptions) (client.Client, error)
ClientFromSecret loads a secret from the provided name, and returns a parsed client.Client based on parsing the rest.Config from the secret.
Types ¶
type ClientOptions ¶
type ClientOptions struct { // REST is a set of RESTOptions. REST RESTOptions // Key is the key within the loaded secret to lookup the KubeConfig in. // If this key does not exist, an error is returned. Key string }
ClientOptions can provide optional options when creating a client.
type RESTOptions ¶
type RESTOptions struct {
Impersonate *rest.ImpersonationConfig
}
RESTOptions provides additional information for creating REST config during the client secret parsing.
Click to show internal directories.
Click to hide internal directories.