config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEnvToUsage

func AddEnvToUsage(cmd *cobra.Command, argToEnv map[string]string)

AddEnvToUsage adds env variables to help

func KubeConfig

func KubeConfig() (*rest.Config, error)

KubeConfig uses kubeconfig pkg to return a valid kube config

func KubeConfigFlags

func KubeConfigFlags(pf *pflag.FlagSet, argToEnv map[string]string)

KubeConfigFlags adds a kubeconfig flag to the set

Types

type Checker

type Checker interface {
	Check(cfg *rest.Config) error
}

Checker is the interface that wraps the Check method that checks if cfg can be used to connect to the Kubernetes cluster.

func NewChecker

func NewChecker() Checker

NewChecker constructs a default checker that satisfies the Checker interface.

type Getter

type Getter interface {
	Get(configPath string) (*rest.Config, error)
}

Getter is the interface that wraps the Get method that returns the Kubernetes configuration used to communicate with it using its API.

func NewGetter

func NewGetter() Getter

NewGetter constructs a default getter that satisfies the Getter interface.

Jump to

Keyboard shortcuts

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