mutating

package
v0.32.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 35 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// PluginName indicates the name of admission plug-in
	PluginName = "MutatingAdmissionPolicy"
)

Variables

This section is empty.

Functions

func NewMutatingAdmissionPolicyAccessor

func NewMutatingAdmissionPolicyAccessor(obj *Policy) generic.PolicyAccessor

func NewMutatingAdmissionPolicyBindingAccessor

func NewMutatingAdmissionPolicyBindingAccessor(obj *PolicyBinding) generic.BindingAccessor

func Register

func Register(plugins *admission.Plugins)

Register registers a plugin

Types

type MutationEvaluationFunc

type MutationEvaluationFunc func(
	ctx context.Context,
	matchedResource schema.GroupVersionResource,
	versionedAttr *admission.VersionedAttributes,
	o admission.ObjectInterfaces,
	versionedParams runtime.Object,
	namespace *corev1.Namespace,
	typeConverter managedfields.TypeConverter,
	runtimeCELCostBudget int64,
	authorizer authorizer.Authorizer,
) (runtime.Object, error)

type Mutator

type Mutator struct {
}

type Plugin

type Plugin struct {
	*generic.Plugin[PolicyHook]
}

Plugin is an implementation of admission.Interface.

func NewPlugin

func NewPlugin(_ io.Reader) *Plugin

NewPlugin returns a generic admission webhook plugin.

func (*Plugin) Admit

Admit makes an admission decision based on the request attributes.

func (*Plugin) InspectFeatureGates

func (a *Plugin) InspectFeatureGates(featureGates featuregate.FeatureGate)

type PolicyEvaluator

type PolicyEvaluator struct {
	Matcher        matchconditions.Matcher
	Mutators       []patch.Patcher
	CompositionEnv *cel.CompositionEnv
	Error          error
}

type PolicyMutation

type PolicyMutation = v1alpha1.Mutation

type Variable

type Variable struct {
	Name       string
	Expression string
}

Variable is a named expression for composition.

func (*Variable) GetExpression

func (v *Variable) GetExpression() string

func (*Variable) GetName

func (v *Variable) GetName() string

func (*Variable) ReturnTypes

func (v *Variable) ReturnTypes() []*celgo.Type

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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