Documentation ¶
Index ¶
- Constants
- Variables
- func BuildKubeConfig(kubeconfig string) (*rest.Config, error)
- func ClearFakeClient()
- func GetAPIExtGoClient(config *rest.Config) (apiextv1Client.Interface, error)
- func GetAPIExtV1Client(config *rest.Config) (apiextv1.ApiextensionsV1Interface, error)
- func GetAppsV1Client(config *rest.Config) (appsv1.AppsV1Interface, error)
- func GetCoreV1Client(config *rest.Config) (corev1.CoreV1Interface, error)
- func GetDynamicClient(config *rest.Config) (dynamic.Interface, error)
- func GetGoClient(config *rest.Config) (kubernetes.Interface, error)
- func GetKubeClient(kubeconfigPath string) (*rest.Config, kubernetes.Interface, error)
- func GetKubeConfig(kubeconfigPath string) (*rest.Config, error)
- func GetKubeConfigGivenPath(kubeconfigPath string) (*rest.Config, error)
- func GetKubeConfigGivenPathAndContext(kubeConfigPath string, kubeContext string) (*rest.Config, error)
- func GetKubeConfigLocation(kubeconfigPath string) (string, bool, error)
- func GetKubeconfigPath(filename string) (string, error)
- func GetKubernetesClientset(kubeconfigPath string) (*kubernetes.Clientset, error)
- func GetKubernetesClientsetWithConfig(config *rest.Config) (*kubernetes.Clientset, error)
- func GetNamespaceFromConfig(kubeConfigPath string) (string, error)
- func ResetCoreV1Client()
- func ResetGetAPIExtV1ClientFunc()
- func SetFakeClient(client kubernetes.Interface)
- type ClientConfigFunc
- type KubeInfo
- type TunnelInfo
Constants ¶
const APIServerBurst = 150
const APIServerQPS = 100
const EnvVarKubeConfig = "KUBECONFIG"
EnvVarKubeConfig Name of Environment Variable for KUBECONFIG
const EnvVarTestKubeConfig = "TEST_KUBECONFIG"
EnvVarTestKubeConfig Name of Environment Variable for test KUBECONFIG
const KubeApiServerPort = "6443"
Variables ¶
var GetAPIExtV1ClientFunc = GetAPIExtV1Client
GetAPIExtV1ClientFunc is the function to return the ApiextensionsV1Interface
var GetAppsV1Func = GetAppsV1Client
GetAppsV1Func is the function the AppsV1Interface
var GetCoreV1Func = GetCoreV1Client
GetCoreV1Func is the function to return the CoreV1Interface
Functions ¶
func GetAPIExtGoClient ¶
func GetAPIExtGoClient(config *rest.Config) (apiextv1Client.Interface, error)
GetAPIExtGoClient returns an API Extensions go-client
func GetAPIExtV1Client ¶
func GetAPIExtV1Client(config *rest.Config) (apiextv1.ApiextensionsV1Interface, error)
GetAPIExtV1Client returns the ApiextensionsV1Interface
func GetAppsV1Client ¶
func GetAppsV1Client(config *rest.Config) (appsv1.AppsV1Interface, error)
GetAppsV1Client returns the AppsV1Interface
func GetCoreV1Client ¶
func GetCoreV1Client(config *rest.Config) (corev1.CoreV1Interface, error)
GetCoreV1Client returns the CoreV1Interface
func GetDynamicClient ¶
GetDynamicClient returns a dynamic client
func GetGoClient ¶
func GetGoClient(config *rest.Config) (kubernetes.Interface, error)
GetGoClient returns a go-client
func GetKubeClient ¶
GetKubeClient - return a Kubernetes clientset for use with the go-client
func GetKubeConfig ¶
GetKubeConfig Returns kubeconfig from KUBECONFIG env var if set Else from default location ~/.kube/config
func GetKubeConfigGivenPath ¶
GetKubeConfigGivenPath GetKubeConfig will get the kubeconfig from the given kubeconfigPath
func GetKubeConfigGivenPathAndContext ¶
func GetKubeConfigGivenPathAndContext(kubeConfigPath string, kubeContext string) (*rest.Config, error)
GetKubeConfigGivenPathAndContext returns a rest.Config given a kubeConfig and kubeContext.
func GetKubeConfigLocation ¶
GetKubeConfigLocation Helper function to obtain the default kubeConfig location
func GetKubeconfigPath ¶
func GetKubernetesClientset ¶
func GetKubernetesClientset(kubeconfigPath string) (*kubernetes.Clientset, error)
GetKubernetesClientset returns the Kubernetes clientset for the cluster set in the environment
func GetKubernetesClientsetWithConfig ¶
func GetKubernetesClientsetWithConfig(config *rest.Config) (*kubernetes.Clientset, error)
GetKubernetesClientsetWithConfig returns the Kubernetes clientset for the given configuration
func GetNamespaceFromConfig ¶
GetNamespaceFromConfig gets the namespace that is set in the current context of the kubeConfig file
func ResetCoreV1Client ¶
func ResetCoreV1Client()
func ResetGetAPIExtV1ClientFunc ¶
func ResetGetAPIExtV1ClientFunc()
ResetGetAPIExtV1ClientFunc for unit testing, to reset any overrides to GetAPIExtV1ClientFunc
Types ¶
type ClientConfigFunc ¶
type ClientConfigFunc func() (*rest.Config, kubernetes.Interface, error)
type KubeInfo ¶
func CreateKubeInfo ¶
CreateKubeInfo returns a kubeInfo struct from a path to a kubeConfig