config

package
v2.2.0-beta.2+incompat... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrHostNotSpecified   = errors.New("host not specified")
	ErrInvalidCredentials = errors.New("invalid credentials")
)

Functions

func GetBasicAuthConfig

func GetBasicAuthConfig(host, port, username, pass string) (*rest.Config, error)

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

func GetConfig(masterURL, kubeconfig string) (*rest.Config, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL