webhook

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToMgr

func AddToMgr(mgr manager.Manager, adapter WebhookAdapter) error

AddToMgr is only necessary for controllers following PodOpsLifecycle

Types

type PodResourceConsistWebhook

type PodResourceConsistWebhook struct {
	WebhookAdapter
	client.Client
	*admission.Decoder
}

func NewPodResourceConsistWebhook

func NewPodResourceConsistWebhook(cli client.Client, decoder *admission.Decoder, adapter WebhookAdapter) *PodResourceConsistWebhook

func (*PodResourceConsistWebhook) Handle

func (*PodResourceConsistWebhook) Mutating

func (r *PodResourceConsistWebhook) Mutating(ctx context.Context, newPod *corev1.Pod, operation admissionv1.Operation) error

type WebhookAdapter

type WebhookAdapter interface {
	Name() string
	GetEmployersByEmployee(ctx context.Context, employee client.Object, client client.Client) ([]client.Object, error)
}

WebhookAdapter should be implemented by adapters which follow PodOpsLifecycle

Jump to

Keyboard shortcuts

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