pod

package
v0.5.13 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type WebhookPod

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

WebhookPod is the implementation of Kubernetes Webhook any implementation should at least implement the interface of mutating.Mutator of validating.Validator

func (*WebhookPod) Mutate

func (wp *WebhookPod) Mutate(ctx context.Context, obj metav1.Object) (bool, error)

func (*WebhookPod) Run

func (wp *WebhookPod) Run() bool

type WebhookPodMutator

type WebhookPodMutator interface {
	MutatePod(pod *core.Pod, namespace string) (allowed bool, err error)
}

type WebhookPodResourceMutator

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

func NewWebhookPodResourceMutator

func NewWebhookPodResourceMutator(
	ctx context.Context,
	vpaIndexer cache.Indexer,
	vpaLister autoscalelister.KatalystVerticalPodAutoscalerLister,
	workloadLister map[schema.GroupVersionKind]cache.GenericLister,
) *WebhookPodResourceMutator

NewWebhookPodResourceMutator will mutate pod resource according to vpa

func (*WebhookPodResourceMutator) MutatePod

func (r *WebhookPodResourceMutator) MutatePod(pod *core.Pod, namespace string) (mutated bool, err error)

type WebhookPodSPDReferenceMutator

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

func NewWebhookPodSPDReferenceMutator

func NewWebhookPodSPDReferenceMutator(
	ctx context.Context,
	spdIndexer cache.Indexer,
	spdLister workloadlister.ServiceProfileDescriptorLister,
	workloadLister map[schema.GroupVersionKind]cache.GenericLister,
) *WebhookPodSPDReferenceMutator

NewWebhookPodSPDReferenceMutator will maintain spd reference annotations for pod

func (*WebhookPodSPDReferenceMutator) MutatePod

func (s *WebhookPodSPDReferenceMutator) MutatePod(pod *core.Pod, namespace string) (mutated bool, err error)

Jump to

Keyboard shortcuts

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