cmd

package
v0.0.0-...-e045138 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigMethodUnknown = iota
	ConfigMethodKubernetesConfigMap
	ConfigMethodCommandLineOrEnv
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigMethod

type ConfigMethod int

type Globals

type Globals struct {
	Port int `help:"HTTP Port to listen for hook requests." env:"PORT" default:"8080"`

	Kubeconfig string `help:"Kubeconfig file." env:"KUBECONFIG"`

	ObservabilityConfig string `help:"JSON representation of observability configuration." env:"OBSERVABILITY_CONFIG"`

	// Kubernetes parameters
	KubernetesNamespace                  string `help:"Namespace where the hook is running." env:"KUBERNETES_NAMESPACE"`
	KubernetesObservabilityConfigMapName string `help:"ConfigMap object name that contains the observability configuration." env:"KUBERNETES_OBSERVABILITY_CONFIGMAP_NAME"`

	Context      context.Context    `kong:"-"`
	Logger       *zap.SugaredLogger `kong:"-"`
	LogLevel     zap.AtomicLevel    `kong:"-"`
	KubeClient   kclient.Interface  `kong:"-"`
	DynClient    kdclient.Interface `kong:"-"`
	ConfigMethod ConfigMethod       `kong:"-"`
}

func (*Globals) Flush

func (g *Globals) Flush()

func (*Globals) Initialize

func (g *Globals) Initialize() error

func (*Globals) Validate

func (g *Globals) Validate() error

Jump to

Keyboard shortcuts

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