util

package
v0.0.0-...-bbd9c0a Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandEnv

func ExpandEnv(path string) string

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 ParseSanitizedKubeconfig

func ParseSanitizedKubeconfig(data []byte) (*types.KubeConfig, error)

ParseSanitizedKubeconfig parses the kubeconfig bytes into a kubeconfig struct without credentials

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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