kubeconfig

package
v0.21.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentContext

func CurrentContext() (string, error)

func DeleteContext

func DeleteContext(contextName string) error

DeleteContext deletes the context with the given name from the kube config

func ManagementContextName

func ManagementContextName() string

func ParseContext

func ParseContext(contextName string) (isPlatformContext bool, cluster string, namespace string, vCluster string)

func PrintKubeConfigTo

func PrintKubeConfigTo(options ContextOptions, writer io.Writer) error

PrintKubeConfigTo prints the given config to the writer

func PrintTokenKubeConfig

func PrintTokenKubeConfig(restConfig *rest.Config, token string) error

PrintTokenKubeConfig writes the kube config to the os.Stdout

func SpaceContextName

func SpaceContextName(clusterName, namespaceName string) string

func SpaceInstanceContextName

func SpaceInstanceContextName(projectName, spaceInstanceName string) string

func UpdateKubeConfig

func UpdateKubeConfig(options ContextOptions, cfg *config.CLI) error

UpdateKubeConfig updates the kube config and adds the virtual cluster context

func VirtualClusterContextName

func VirtualClusterContextName(clusterName, namespaceName, virtualClusterName string) string

func VirtualClusterInstanceContextName

func VirtualClusterInstanceContextName(projectName, virtualClusterInstance string) string

func WriteTokenKubeConfig

func WriteTokenKubeConfig(restConfig *rest.Config, token string, w io.Writer) error

WriteTokenKubeConfig writes the kube config to the io.Writer

Types

type ContextOptions

type ContextOptions struct {
	Name                             string
	Server                           string
	CaData                           []byte
	ConfigPath                       string
	InsecureSkipTLSVerify            bool
	DirectClusterEndpointEnabled     bool
	VirtualClusterAccessPointEnabled bool

	Token                 string
	ClientKeyData         []byte
	ClientCertificateData []byte

	CurrentNamespace string
	SetActive        bool
}

Jump to

Keyboard shortcuts

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