cmd

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: Apache-2.0 Imports: 16 Imported by: 3

Documentation

Overview

Package cmd provides viper/cobra for shared command line flags

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 ApplyCRDs

func ApplyCRDs(ctx context.Context, apply ApplyFn, restConfig *rest.Config) error

ApplyCRDs calls apply to create the operators CRDs

func ApplyCRDsFlags

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

ApplyCRDsFlags adds to viper flags

func CtxTimeOut

func CtxTimeOut(cfg *config.Config)

CtxTimeOut sets the context timeout from viper

func CtxTimeOutFlags

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

CtxTimeOutFlags adds to viper flags

func DockerImage

func DockerImage() error

DockerImage sets the docker image, which the operator uses to execute commands in pods

func DockerImageFlags

func DockerImageFlags(pf *flag.FlagSet, argToEnv map[string]string, repo string, tag string)

DockerImageFlags adds to viper flags

func GenCLIDocsyMarkDown

func GenCLIDocsyMarkDown(cmd *cobra.Command, docDir string) error

GenCLIDocsyMarkDown generates docsy-markdown files from cobra commands

func KubeConfig

func KubeConfig(log *zap.SugaredLogger) (*rest.Config, error)

KubeConfig uses kubeconfig pkg to return a valid kube config

func KubeConfigFlags

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

KubeConfigFlags adds to viper flags

func LogLevel

func LogLevel() string

LogLevel returns the log-level argument

func LoggerFlags

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

LoggerFlags adds to viper flags

func Meltdown

func Meltdown(cfg *config.Config)

Meltdown is the reconciliation backoff duration

func MeltdownFlags

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

MeltdownFlags adds to viper flags

func MonitoredID

func MonitoredID(cfg *config.Config)

MonitoredID sets the moitored id from viper

func MonitoredIDFlags

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

MonitoredIDFlags adds to viper flags

func OperatorNamespace

func OperatorNamespace(cfg *config.Config, log *zap.SugaredLogger, name string) string

OperatorNamespace is the namespace of the service, which points to the webhook server

func OperatorNamespaceFlags

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

OperatorNamespaceFlags adds to viper flags

Types

type ApplyFn

type ApplyFn func(ctx context.Context, config *rest.Config) error

ApplyFn is a function that applies CRDs

Jump to

Keyboard shortcuts

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