config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceAccountNamespaceFilePath = "/var/run/secrets/kubernetes.io/serviceaccount/namespace"
)

Variables

This section is empty.

Functions

func ParseCliArgs

func ParseCliArgs(config *Config) error

Types

type Config

type Config struct {
	LifecyclePort       int
	TLSPort             int
	CertFile            string
	KeyFile             string
	AnnotationNamespace string
	ConfigmapNamespace  string
	ConfigMapName       string
	LogLevel            string
	KubeConfig          string
	MasterURL           string
	WebhookEnableLabel  map[string]string
}

func (*Config) PrintHumanConfigArgs

func (c *Config) PrintHumanConfigArgs()

type InjectionConfig

type InjectionConfig struct {
	Name           *string                      `json:"name"`
	Containers     []corev1.Container           `json:"containers"`
	Volumes        []corev1.Volume              `json:"volumes"`
	Environments   []corev1.EnvVar              `json:"env"`
	VolumeMounts   []corev1.VolumeMount         `json:"volumeMounts"`
	HostNetwork    *bool                        `json:"hostNetwork"`
	HostPID        *bool                        `json:"hostPID"`
	InitContainers []corev1.Container           `json:"initContainers"`
	Readiness      *corev1.Probe                `json:"readinessProbe"`
	Liveness       *corev1.Probe                `json:"livenessProbe"`
	Startup        *corev1.Probe                `json:"startupProbe"`
	Resources      *corev1.ResourceRequirements `json:"resources"`
	Ports          []corev1.ContainerPort       `json:"ports"`
}

func LoadInjectionConfig

func LoadInjectionConfig(payload []byte) (*InjectionConfig, error)

type MapStringStringFlag

type MapStringStringFlag struct {
	Values map[string]string
}

MapStringStringFlag is a flag struct for key=value pairs

func NewMapStringStringFlag

func NewMapStringStringFlag() MapStringStringFlag

NewMapStringStringFlag creates a new flag var for storing key=value pairs

func (*MapStringStringFlag) Set

func (s *MapStringStringFlag) Set(value string) error

Set implements the flag.Var interface

func (*MapStringStringFlag) String

func (s *MapStringStringFlag) String() string

String implements the flag.Var interface

func (*MapStringStringFlag) ToMapStringString

func (s *MapStringStringFlag) ToMapStringString() map[string]string

ToMapStringString returns the underlying representation of the map of key=value pairs

Jump to

Keyboard shortcuts

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