kubeconfig

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigExtensionName = "kflex-config-extension-name"
	InitialContextName  = "kflex-initial-ctx-name"
)

Variables

This section is empty.

Functions

func DeleteContext

func DeleteContext(config *clientcmdapi.Config, cpName string) error

func GetCurrentContext added in v0.8.3

func GetCurrentContext(ctx context.Context) (string, error)

func IsHostingClusterContextPreferenceSet added in v0.6.2

func IsHostingClusterContextPreferenceSet(config *clientcmdapi.Config) bool

func LoadAndMerge

func LoadAndMerge(ctx context.Context, client kubernetes.Clientset, name, controlPlaneType string) error

func LoadAndMergeNoWrite added in v0.2.5

func LoadAndMergeNoWrite(ctx context.Context, client kubernetes.Clientset, name, controlPlaneType string, konfig *clientcmdapi.Config) error

LoadAndMergeNoWrite: works as LoadAndMerge but on supplied konfig from file and does not write it back

func LoadKubeconfig

func LoadKubeconfig(ctx context.Context) (*clientcmdapi.Config, error)

func SaveHostingClusterContextPreference added in v0.6.2

func SaveHostingClusterContextPreference(ctx context.Context) error

func SetHostingClusterContextPreference added in v0.6.2

func SetHostingClusterContextPreference(config *clientcmdapi.Config, userSuppliedContext *string)

sets hosting cluster context to current context if userSuppliedContext is nil, otherwise set to userSuppliedContext

func SwitchContext

func SwitchContext(config *clientcmdapi.Config, cpName string) error

func SwitchToHostingClusterContext added in v0.6.2

func SwitchToHostingClusterContext(config *clientcmdapi.Config, removeExtension bool) error

func WaitForNamespaceReady added in v0.8.0

func WaitForNamespaceReady(ctx context.Context, clientset kubernetes.Interface, controlPlaneName string) error

func WatchForSecretCreation

func WatchForSecretCreation(clientset kubernetes.Clientset, controlPlaneName, secretName string) error

func WriteKubeconfig

func WriteKubeconfig(ctx context.Context, config *clientcmdapi.Config) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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