config

package
v0.0.0-...-7aa9df5 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: Apache-2.0 Imports: 16 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

func LoggerFlags

func LoggerFlags(pf *flag.FlagSet, argToEnv map[string]string)

LoggerFlags adds to viper flags

func NewClientLogger

func NewClientLogger() logr.Logger

New creates a new logger with our setup

func NewInstallClientLogger

func NewInstallClientLogger() logr.Logger

New creates a new logger with our setup

func NewLogger

func NewLogger() logr.Logger

New creates a new logger with our setup

func TraceLevel

func TraceLevel() int

TraceLevel returns the trace-level argument

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