webhook

package
v1.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewImageSwapper

func NewImageSwapper(targetRegistry string, filters []pkg.JMESPathFilter) mutating.Mutator

NewImageSwapper returns a new ImageSwapper initialized.

func NewImageSwapperWebhook

func NewImageSwapperWebhook(targetRegistry string, filters []pkg.JMESPathFilter) (webhook.Webhook, error)

Types

type FilterContext

type FilterContext struct {
	Obj metav1.Object `json:"obj,omitempty"`
}

FilterContext is being used by JMESPath to search and match

type ImageSwapper

type ImageSwapper struct {
	// contains filtered or unexported fields
}

ImageSwapper is a mutator that will set labels on the received pods.

func (*ImageSwapper) Mutate

func (p *ImageSwapper) Mutate(ctx context.Context, obj metav1.Object) (bool, error)

Mutate will set the required labels on the pods. Satisfies mutating.Mutator interface.

Jump to

Keyboard shortcuts

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