context

package
v1.35.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 7 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CurrentConfig = getCurrentConfig
)

For testing

Functions

func ConfigureKubeConfig added in v1.0.0

func ConfigureKubeConfig(cliKubeConfig, cliKubeContext string)

ConfigureKubeConfig sets an override for the current context in the k8s config. When given, the firstCliValue always takes precedence over the yamlValue. Changing the kube-context of a running Skaffold process is not supported, so after the first call, the kube-context will be locked.

func GetClusterInfo added in v1.7.1

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

GetClusterInfo returns the Cluster information for the given kubeContext

func GetDefaultRestClientConfig added in v1.30.0

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. The kubeconfig used will be cached for the life of the skaffold process after the first call. If the CurrentContext is empty and the resulting config is empty, this method attempts to create a RESTClient with an in-cluster config.

func GetRestClientConfig added in v0.36.0

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