Documentation
¶
Index ¶
- func ExpandEnv(path string) string
- func GetContextsNamesFromKubeconfig(kubeconfigBytes []byte, contextPrefix string) (*string, []string, error)
- func GetCurrentContext() (string, error)
- func ParseSanitizedKubeconfig(data []byte) (*types.KubeConfig, error)
- func SliceFindIndex[T string | int](slice []T, search T) int
- func SplitAdditionalArgs(args *[]string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandEnv ¶
ExpandEnv takes a string and replaces all environment variables with their values ~ is expanded to the user's home directory
func GetContextsNamesFromKubeconfig ¶
func GetContextsNamesFromKubeconfig(kubeconfigBytes []byte, contextPrefix string) (*string, []string, error)
GetContextsNamesFromKubeconfig takes kubeconfig bytes and parses the kubeconfig to extract the context names. returns the kubeconfig as a string as a first argument, and the context names as a second argument
func GetCurrentContext ¶
GetCurrentContext returns "current-context" value of current kubeconfig
func ParseSanitizedKubeconfig ¶
func ParseSanitizedKubeconfig(data []byte) (*types.KubeConfig, error)
ParseSanitizedKubeconfig parses the kubeconfig bytes into a kubeconfig struct without credentials
func SliceFindIndex ¶
func SplitAdditionalArgs ¶
Types ¶
This section is empty.