config

package
v0.0.0-...-beceb34 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(
	url,
	kubeconfig,
	context string,
) (*rest.Config, error)

LoadConfig loads the kubeconfig and returns a *rest.Config url: The url of the server kubeconfig: The path of the kubeconfig, if empty the KUBECONFIG environment variable will be used. context: The context to use to search the *rest.Config in the kubeconfig file, if empty the current-context will be used. Search in the following order: provided kubeconfig path, KUBECONFIG environment variable, in the cluster, in the user home directory. If the context is not provided and the url is not provided, it returns a *rest.Config the for the current-context. If the context is not provided but the url provided, it returns a *rest.Config for the server identified by the url. If the context is provided, it returns a *rest.Config for the provided context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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