Documentation ¶
Index ¶
- func KubeConfigToSecret(objKey client.ObjectKey, cfg *api.Config) (*corev1.Secret, error)
- func SecretToKubeConfig(secret *corev1.Secret) (clientcmd.ClientConfig, error)
- func SecretToKubeConfigByKey(secret *corev1.Secret, key string) (clientcmd.ClientConfig, error)
- type KeyNotFound
- type SerializedKubeconfigInvalid
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KubeConfigToSecret ¶
KubeConfigToSecret returns a Secret with the given object key containing a kubeconfig serialized from the given *api.Config
func SecretToKubeConfig ¶
func SecretToKubeConfig( secret *corev1.Secret, ) (clientcmd.ClientConfig, error)
SecretToKubeConfig returns clientcmd.ClientConfig from a Secret containing a serialized kubeconfig
func SecretToKubeConfigByKey ¶
SecretToKubeConfigByKey returns clientcmd.ClientConfig from a Secret containing a serialized kubeconfig as the value for the provided key.
Types ¶
type KeyNotFound ¶
KeyNotFound is returned if the Secret does not contain the kubeConfigDataKey key.
func (KeyNotFound) Error ¶
func (r KeyNotFound) Error() string
type SerializedKubeconfigInvalid ¶
func (SerializedKubeconfigInvalid) Error ¶
func (r SerializedKubeconfigInvalid) Error() string
Click to show internal directories.
Click to hide internal directories.