podmutator

package
v1.2.16 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: MIT Imports: 8 Imported by: 0

README

Pod Mutator Admission Controller

The Pod Mutator is a mutating admission controller that modifies Pods during the create process.

Mutators

The Pod Mutator can run multiple mutation functions, each performing a different task:

  • The Pod Scheduler mutator adds the name of the StorageOS scheduler extender to the Pod's SchedulerName. See Pod Scheduler Mutator for more detail.

Tunables

Default values work well when the api-manager is installed by the cluster-operator. They should only be changed under advisement from StorageOS support.

-scheduler-name is the name of the scheduler extender to set in the Pod's SchedulerName field. If set to an empty string, no updates will be made. When set, the scheduler name must match the name of the scheduler extender configured in the StorageOS cluster-operator. (default "storageos-scheduler)".

-webhook-mutate-pods-path is the URL path of the Pod mutating webhook. It must match the configuration name set in the cluster-operator. (default "/mutate-pods").

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	client.Client
	// contains filtered or unexported fields
}

func NewController

func NewController(k8s client.Client, decoder *admission.Decoder, mutators []Mutator) *Controller

NewController returns a new Pod mutating admission controller.

func (*Controller) Handle

Handle handles an admission request and mutates a pod object in the request.

type Mutator

type Mutator interface {
	MutatePod(ctx context.Context, pod *corev1.Pod, namespace string) error
}

Directories

Path Synopsis
Package scheduler contains mutating admission controller webhook handlers for setting a pod's scheduler.
Package scheduler contains mutating admission controller webhook handlers for setting a pod's scheduler.

Jump to

Keyboard shortcuts

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