mutate

package
v1.4.2-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MutateResourceWithOverlay added in v1.2.0

func MutateResourceWithOverlay(resource, pattern interface{}) ([][]byte, error)

MutateResourceWithOverlay is a start of overlaying process

func NewConditionError added in v1.4.2

func NewConditionError(err error) error

func ProcessOverlay

func ProcessOverlay(log logr.Logger, ruleName string, overlay interface{}, resource unstructured.Unstructured) (resp response.RuleResponse, patchedResource unstructured.Unstructured)

ProcessOverlay processes mutation overlay on the resource

func ProcessPatchJSON6902 added in v1.2.0

func ProcessPatchJSON6902(ruleName string, patchesJSON6902 []byte, resource unstructured.Unstructured, log logr.Logger) (resp response.RuleResponse, patchedResource unstructured.Unstructured)

ProcessPatchJSON6902 ...

func ProcessPatches

func ProcessPatches(log logr.Logger, ruleName string, mutation kyverno.Mutation, resource unstructured.Unstructured) (resp response.RuleResponse, patchedResource unstructured.Unstructured)

ProcessPatches applies the patches on the resource and returns the patched resource

func ProcessStrategicMergePatch added in v1.2.0

func ProcessStrategicMergePatch(ruleName string, overlay interface{}, resource unstructured.Unstructured, log logr.Logger) (resp response.RuleResponse, patchedResource unstructured.Unstructured)

ProcessStrategicMergePatch ...

Types

type ConditionError added in v1.4.2

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

func (ConditionError) Error added in v1.4.2

func (ce ConditionError) Error() string

type Handler added in v1.3.0

type Handler interface {
	Handle() (resp response.RuleResponse, newPatchedResource unstructured.Unstructured)
}

Handler knows how to mutate resources with given pattern

func CreateMutateHandler added in v1.2.0

func CreateMutateHandler(ruleName string, mutate *kyverno.Mutation, patchedResource unstructured.Unstructured, context context.EvalInterface, logger logr.Logger) Handler

CreateMutateHandler initilizes a new instance of mutation handler

Jump to

Keyboard shortcuts

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