Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfig ¶
GetConfig returns the currently loaded configuration via LoadConfig(). Returns an error if LoadConfig() has not been called.
func GetPathOptions ¶
func GetPathOptions() *kubectl.PathOptions
GetPathOptions contains options for the kubectl config file
func LoadConfig ¶
LoadConfig loads a kubeconfig from the specified kubeconfigFile, or uses the recommended file from kubectl defaults ($HOME/.kube/config). If the file exists it will use the existing configuration as a base for the changes, otherwise it starts a new configuration. Returns an error only if the existing file is not a valid configuration or it can't be read.
func Remove ¶
Remove deletes all items related to the specified target: cluster, context, user. Returns an error if LoadConfig() has not been called.f
func UpdateConfig ¶
func UpdateConfig(name string, aliases []string, tokenData *client.TargetInfo) error
UpdateConfig loads the current kubeconfig file and applies the changes described in the tokenData. Once applied, it writes the changes to disk. It will use the specified name for the names of the cluster, user and context. It will create an additional context for each of the aliases provided
Types ¶
This section is empty.