pvcmutator

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: 12 Imported by: 0

README

PVC Mutator Admission Controller

The PVC Mutator is a mutating admission controller that modifies PersistentVolumeClaims during the create process.

Mutators

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

  • Encryption key generator: ensures that PVCs that have requested encryption have a valid configuration, generating encryption keys if needed.

  • StorageClass to annotation: ensures that StorageOS related PVCs have their StorageClass' UID as an annotation.

Tunables

There are currently no tunable flags for the PVC Mutator.

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, api stos.Licence, mutators []Mutator) *Controller

NewController returns a new PVC mutating admission controller.

func (*Controller) Handle

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

type Mutator

type Mutator interface {
	MutatePVC(ctx context.Context, pvc *corev1.PersistentVolumeClaim, namespace string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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