webhook

package
v0.4.24 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotation

type Annotation struct {
	Key   string
	Value string
}

func ParseAnnotation

func ParseAnnotation(annotation string) (Annotation, error)

type Label

type Label struct {
	Key   string
	Value string
}

func ParseLabel

func ParseLabel(label string) (Label, error)

type Mapping

type Mapping struct {
	Pattern           string `json:"pattern"`
	Replacement       string `json:"replacement"`
	PatternRegexp     *regexp.Regexp
	ReplacementRegexp *regexp.Regexp
}

func ParseMapping

func ParseMapping(pattern string, replacement string) (Mapping, error)

type PodWebhook

type PodWebhook struct {
	Config *PodWebhookConfig
}

func (*PodWebhook) MutateCreate

func (w *PodWebhook) MutateCreate(ctx context.Context, pod *corev1.Pod) error

func (*PodWebhook) MutateUpdate

func (w *PodWebhook) MutateUpdate(ctx context.Context, oldPod *corev1.Pod, newPod *corev1.Pod) error

type PodWebhookConfig

type PodWebhookConfig struct {
	Mappings              []Mapping
	LabelsIfModified      []Label
	AnnotationsIfModified []Annotation
}

Jump to

Keyboard shortcuts

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