context

package
v0.0.0-...-8e53d61 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CurrentConfig = getCurrentConfig
)

For testing

Functions

func ConfigureKubeConfig

func ConfigureKubeConfig(cliKubeConfig, cliKubeContext string)

ConfigureKubeConfig sets an override for the current context in the k8s config.

func GetClusterInfo

func GetClusterInfo(kctx string) (*clientcmdapi.Cluster, error)

GetClusterInfo returns the Cluster information for the given kubeContext

func GetDefaultRestClientConfig

func GetDefaultRestClientConfig() (*restclient.Config, error)

GetDefaultRestClientConfig returns a REST client config for API calls against the Kubernetes API. If ConfigureKubeConfig was called before, the CurrentContext will be overridden.

func GetRestClientConfig

func GetRestClientConfig(kubeContext string) (*restclient.Config, error)

GetRestClientConfig returns a REST client config for API calls against the Kubernetes API for the given context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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