Documentation ¶
Index ¶
- Variables
- func GetBasicAuthConfig(host, port, username, pass string) (*rest.Config, error)
- func GetConfig(masterURL, kubeconfig string) (*rest.Config, error)
- func GetKubernetesClientSet(masterURL, kubeconfig string) (*kubernetes.Clientset, error)
- func GetKubernetesClientSetBasicAuth(host, port, username, pass string) (*kubernetes.Clientset, error)
- func GetKubernetesInformers(masterURL, kubeconfig string) (informers.SharedInformerFactory, error)
Constants ¶
This section is empty.
Variables ¶
var ( ErrHostNotSpecified = errors.New("host not specified") ErrInvalidCredentials = errors.New("invalid credentials") )
Functions ¶
func GetBasicAuthConfig ¶
GetBasicAuthConfig is a helper function that builds configs for a kubernetes client that uses a basic authentication. https://kubernetes.io/docs/admin/authentication/#static-password-file
func GetConfig ¶
GetConfig creates a *rest.Config for talking to a Kubernetes apiserver. If kubeconfig is set, will use the kubeconfig file at that location. Otherwise will assume running in cluster and use the cluster provided kubeconfig.
func GetKubernetesClientSet ¶
func GetKubernetesClientSet(masterURL, kubeconfig string) (*kubernetes.Clientset, error)
GetKubernetesClientSet creates a *kubernetes.ClientSet for talking to a Kubernetes apiserver. If kubeconfig is set, will use the kubeconfig file at that location. Otherwise will assume running in cluster and use the cluster provided kubeconfig.
func GetKubernetesClientSetBasicAuth ¶
func GetKubernetesClientSetBasicAuth(host, port, username, pass string) (*kubernetes.Clientset, error)
func GetKubernetesInformers ¶
func GetKubernetesInformers(masterURL, kubeconfig string) (informers.SharedInformerFactory, error)
GetKubernetesInformers creates a informers.SharedInformerFactory for talking to a Kubernetes apiserver. If kubeconfig is set, will use the kubeconfig file at that location. Otherwise will assume running in cluster and use the cluster provided kubeconfig.
Types ¶
This section is empty.