v1

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuditAnnotationBlank = (&AuditAnnotationDie{}).DieFeed(admissionregistrationv1.AuditAnnotation{})
View Source
var ExpressionWarningBlank = (&ExpressionWarningDie{}).DieFeed(admissionregistrationv1.ExpressionWarning{})
View Source
var MatchConditionBlank = (&MatchConditionDie{}).DieFeed(admissionregistrationv1.MatchCondition{})
View Source
var MatchResourcesBlank = (&MatchResourcesDie{}).DieFeed(admissionregistrationv1.MatchResources{})
View Source
var MutatingWebhookBlank = (&MutatingWebhookDie{}).DieFeed(admissionregistrationv1.MutatingWebhook{})
View Source
var NamedRuleWithOperationsBlank = (&NamedRuleWithOperationsDie{}).DieFeed(admissionregistrationv1.NamedRuleWithOperations{})
View Source
var ParamKindBlank = (&ParamKindDie{}).DieFeed(admissionregistrationv1.ParamKind{})
View Source
var ParamRefBlank = (&ParamRefDie{}).DieFeed(admissionregistrationv1.ParamRef{})
View Source
var RuleBlank = (&RuleDie{}).DieFeed(admissionregistrationv1.Rule{})
View Source
var RuleWithOperationsBlank = (&RuleWithOperationsDie{}).DieFeed(admissionregistrationv1.RuleWithOperations{})
View Source
var ServiceReferenceBlank = (&ServiceReferenceDie{}).DieFeed(admissionregistrationv1.ServiceReference{})
View Source
var TypeCheckingBlank = (&TypeCheckingDie{}).DieFeed(admissionregistrationv1.TypeChecking{})
View Source
var ValidatingAdmissionPolicyBlank = (&ValidatingAdmissionPolicyDie{}).DieFeed(admissionregistrationv1.ValidatingAdmissionPolicy{})
View Source
var ValidatingWebhookBlank = (&ValidatingWebhookDie{}).DieFeed(admissionregistrationv1.ValidatingWebhook{})
View Source
var ValidationBlank = (&ValidationDie{}).DieFeed(admissionregistrationv1.Validation{})
View Source
var VariableBlank = (&VariableDie{}).DieFeed(admissionregistrationv1.Variable{})
View Source
var WebhookClientConfigBlank = (&WebhookClientConfigDie{}).DieFeed(admissionregistrationv1.WebhookClientConfig{})

Functions

This section is empty.

Types

type AuditAnnotationDie added in v0.13.0

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

func (*AuditAnnotationDie) DeepCopy added in v0.13.0

func (d *AuditAnnotationDie) DeepCopy() *AuditAnnotationDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*AuditAnnotationDie) DieDiff added in v0.13.0

func (d *AuditAnnotationDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*AuditAnnotationDie) DieFeed added in v0.13.0

DieFeed returns a new die with the provided resource.

func (*AuditAnnotationDie) DieFeedJSON added in v0.13.0

func (d *AuditAnnotationDie) DieFeedJSON(j []byte) *AuditAnnotationDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*AuditAnnotationDie) DieFeedPtr added in v0.13.0

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*AuditAnnotationDie) DieFeedRawExtension added in v0.13.0

func (d *AuditAnnotationDie) DieFeedRawExtension(raw runtime.RawExtension) *AuditAnnotationDie

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*AuditAnnotationDie) DieFeedYAML added in v0.13.0

func (d *AuditAnnotationDie) DieFeedYAML(y []byte) *AuditAnnotationDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*AuditAnnotationDie) DieFeedYAMLFile added in v0.13.0

func (d *AuditAnnotationDie) DieFeedYAMLFile(name string) *AuditAnnotationDie

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*AuditAnnotationDie) DieImmutable added in v0.13.0

func (d *AuditAnnotationDie) DieImmutable(immutable bool) *AuditAnnotationDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*AuditAnnotationDie) DiePatch added in v0.13.0

func (d *AuditAnnotationDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*AuditAnnotationDie) DieRelease added in v0.13.0

DieRelease returns the resource managed by the die.

func (*AuditAnnotationDie) DieReleaseJSON added in v0.13.0

func (d *AuditAnnotationDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*AuditAnnotationDie) DieReleasePtr added in v0.13.0

DieReleasePtr returns a pointer to the resource managed by the die.

func (*AuditAnnotationDie) DieReleaseRawExtension added in v0.13.0

func (d *AuditAnnotationDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*AuditAnnotationDie) DieReleaseYAML added in v0.13.0

func (d *AuditAnnotationDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*AuditAnnotationDie) DieSeal added in v0.13.0

func (d *AuditAnnotationDie) DieSeal() *AuditAnnotationDie

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*AuditAnnotationDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*AuditAnnotationDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*AuditAnnotationDie) DieSealRelease added in v0.13.0

DieSealRelease returns the sealed resource managed by the die.

func (*AuditAnnotationDie) DieSealReleasePtr added in v0.13.0

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*AuditAnnotationDie) DieStamp added in v0.13.0

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*AuditAnnotationDie) DieStampAt added in v0.13.0

func (d *AuditAnnotationDie) DieStampAt(jp string, fn interface{}) *AuditAnnotationDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*AuditAnnotationDie) DieWith added in v0.13.0

func (d *AuditAnnotationDie) DieWith(fns ...func(d *AuditAnnotationDie)) *AuditAnnotationDie

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*AuditAnnotationDie) Key added in v0.13.0

key specifies the audit annotation key. The audit annotation keys of

a ValidatingAdmissionPolicy must be unique. The key must be a qualified

name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.

The key is combined with the resource name of the

ValidatingAdmissionPolicy to construct an audit annotation key:

"{ValidatingAdmissionPolicy name}/{key}".

If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy

and the same audit annotation key, the annotation key will be identical.

In this case, the first annotation written with the key will be included

in the audit event and all subsequent annotations with the same key

will be discarded.

Required.

func (*AuditAnnotationDie) ValueExpression added in v0.13.0

func (d *AuditAnnotationDie) ValueExpression(v string) *AuditAnnotationDie

valueExpression represents the expression which is evaluated by CEL to

produce an audit annotation value. The expression must evaluate to either

a string or null value. If the expression evaluates to a string, the

audit annotation is included with the string value. If the expression

evaluates to null or empty string the audit annotation will be omitted.

The valueExpression may be no longer than 5kb in length.

If the result of the valueExpression is more than 10kb in length, it

will be truncated to 10kb.

If multiple ValidatingAdmissionPolicyBinding resources match an

API request, then the valueExpression will be evaluated for

each binding. All unique values produced by the valueExpressions

will be joined together in a comma-separated list.

Required.

type ExpressionWarningDie added in v0.13.0

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

func (*ExpressionWarningDie) DeepCopy added in v0.13.0

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*ExpressionWarningDie) DieDiff added in v0.13.0

func (d *ExpressionWarningDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*ExpressionWarningDie) DieFeed added in v0.13.0

DieFeed returns a new die with the provided resource.

func (*ExpressionWarningDie) DieFeedJSON added in v0.13.0

func (d *ExpressionWarningDie) DieFeedJSON(j []byte) *ExpressionWarningDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*ExpressionWarningDie) DieFeedPtr added in v0.13.0

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*ExpressionWarningDie) DieFeedRawExtension added in v0.13.0

func (d *ExpressionWarningDie) DieFeedRawExtension(raw runtime.RawExtension) *ExpressionWarningDie

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ExpressionWarningDie) DieFeedYAML added in v0.13.0

func (d *ExpressionWarningDie) DieFeedYAML(y []byte) *ExpressionWarningDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*ExpressionWarningDie) DieFeedYAMLFile added in v0.13.0

func (d *ExpressionWarningDie) DieFeedYAMLFile(name string) *ExpressionWarningDie

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*ExpressionWarningDie) DieImmutable added in v0.13.0

func (d *ExpressionWarningDie) DieImmutable(immutable bool) *ExpressionWarningDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*ExpressionWarningDie) DiePatch added in v0.13.0

func (d *ExpressionWarningDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*ExpressionWarningDie) DieRelease added in v0.13.0

DieRelease returns the resource managed by the die.

func (*ExpressionWarningDie) DieReleaseJSON added in v0.13.0

func (d *ExpressionWarningDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*ExpressionWarningDie) DieReleasePtr added in v0.13.0

DieReleasePtr returns a pointer to the resource managed by the die.

func (*ExpressionWarningDie) DieReleaseRawExtension added in v0.13.0

func (d *ExpressionWarningDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ExpressionWarningDie) DieReleaseYAML added in v0.13.0

func (d *ExpressionWarningDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*ExpressionWarningDie) DieSeal added in v0.13.0

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*ExpressionWarningDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*ExpressionWarningDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*ExpressionWarningDie) DieSealRelease added in v0.13.0

DieSealRelease returns the sealed resource managed by the die.

func (*ExpressionWarningDie) DieSealReleasePtr added in v0.13.0

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*ExpressionWarningDie) DieStamp added in v0.13.0

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*ExpressionWarningDie) DieStampAt added in v0.13.0

func (d *ExpressionWarningDie) DieStampAt(jp string, fn interface{}) *ExpressionWarningDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*ExpressionWarningDie) DieWith added in v0.13.0

func (d *ExpressionWarningDie) DieWith(fns ...func(d *ExpressionWarningDie)) *ExpressionWarningDie

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*ExpressionWarningDie) FieldRef added in v0.13.0

The path to the field that refers the expression.

For example, the reference to the expression of the first item of

validations is "spec.validations[0].expression"

func (*ExpressionWarningDie) Warning added in v0.13.0

The content of type checking information in a human-readable form.

Each line of the warning contains the type that the expression is checked

against, followed by the type check error from the compiler.

type MatchConditionDie

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

func (*MatchConditionDie) DeepCopy

func (d *MatchConditionDie) DeepCopy() *MatchConditionDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*MatchConditionDie) DieDiff added in v0.13.0

func (d *MatchConditionDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*MatchConditionDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*MatchConditionDie) DieFeedJSON

func (d *MatchConditionDie) DieFeedJSON(j []byte) *MatchConditionDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*MatchConditionDie) DieFeedPtr

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*MatchConditionDie) DieFeedRawExtension

func (d *MatchConditionDie) DieFeedRawExtension(raw runtime.RawExtension) *MatchConditionDie

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*MatchConditionDie) DieFeedYAML

func (d *MatchConditionDie) DieFeedYAML(y []byte) *MatchConditionDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*MatchConditionDie) DieFeedYAMLFile

func (d *MatchConditionDie) DieFeedYAMLFile(name string) *MatchConditionDie

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*MatchConditionDie) DieImmutable

func (d *MatchConditionDie) DieImmutable(immutable bool) *MatchConditionDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*MatchConditionDie) DiePatch added in v0.13.0

func (d *MatchConditionDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*MatchConditionDie) DieRelease

DieRelease returns the resource managed by the die.

func (*MatchConditionDie) DieReleaseJSON

func (d *MatchConditionDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*MatchConditionDie) DieReleasePtr

DieReleasePtr returns a pointer to the resource managed by the die.

func (*MatchConditionDie) DieReleaseRawExtension

func (d *MatchConditionDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*MatchConditionDie) DieReleaseYAML

func (d *MatchConditionDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*MatchConditionDie) DieSeal added in v0.13.0

func (d *MatchConditionDie) DieSeal() *MatchConditionDie

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*MatchConditionDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*MatchConditionDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*MatchConditionDie) DieSealRelease added in v0.13.0

DieSealRelease returns the sealed resource managed by the die.

func (*MatchConditionDie) DieSealReleasePtr added in v0.13.0

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*MatchConditionDie) DieStamp

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*MatchConditionDie) DieStampAt

func (d *MatchConditionDie) DieStampAt(jp string, fn interface{}) *MatchConditionDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*MatchConditionDie) DieWith

func (d *MatchConditionDie) DieWith(fns ...func(d *MatchConditionDie)) *MatchConditionDie

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*MatchConditionDie) Expression

func (d *MatchConditionDie) Expression(v string) *MatchConditionDie

Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.

CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:

'object' - The object from the incoming request. The value is null for DELETE requests.

'oldObject' - The existing object. The value is null for CREATE requests.

'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest).

'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.

See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz

'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the

request resource.

Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/

Required.

func (*MatchConditionDie) Name

Name is an identifier for this match condition, used for strategic merging of MatchConditions,

as well as providing an identifier for logging purposes. A good name should be descriptive of

the associated expression.

Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and

must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or

'123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an

optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')

Required.

type MatchResourcesDie added in v0.13.0

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

func (*MatchResourcesDie) DeepCopy added in v0.13.0

func (d *MatchResourcesDie) DeepCopy() *MatchResourcesDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*MatchResourcesDie) DieDiff added in v0.13.0

func (d *MatchResourcesDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*MatchResourcesDie) DieFeed added in v0.13.0

DieFeed returns a new die with the provided resource.

func (*MatchResourcesDie) DieFeedJSON added in v0.13.0

func (d *MatchResourcesDie) DieFeedJSON(j []byte) *MatchResourcesDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*MatchResourcesDie) DieFeedPtr added in v0.13.0

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*MatchResourcesDie) DieFeedRawExtension added in v0.13.0

func (d *MatchResourcesDie) DieFeedRawExtension(raw runtime.RawExtension) *MatchResourcesDie

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*MatchResourcesDie) DieFeedYAML added in v0.13.0

func (d *MatchResourcesDie) DieFeedYAML(y []byte) *MatchResourcesDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*MatchResourcesDie) DieFeedYAMLFile added in v0.13.0

func (d *MatchResourcesDie) DieFeedYAMLFile(name string) *MatchResourcesDie

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*MatchResourcesDie) DieImmutable added in v0.13.0

func (d *MatchResourcesDie) DieImmutable(immutable bool) *MatchResourcesDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*MatchResourcesDie) DiePatch added in v0.13.0

func (d *MatchResourcesDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*MatchResourcesDie) DieRelease added in v0.13.0

DieRelease returns the resource managed by the die.

func (*MatchResourcesDie) DieReleaseJSON added in v0.13.0

func (d *MatchResourcesDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*MatchResourcesDie) DieReleasePtr added in v0.13.0

DieReleasePtr returns a pointer to the resource managed by the die.

func (*MatchResourcesDie) DieReleaseRawExtension added in v0.13.0

func (d *MatchResourcesDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*MatchResourcesDie) DieReleaseYAML added in v0.13.0

func (d *MatchResourcesDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*MatchResourcesDie) DieSeal added in v0.13.0

func (d *MatchResourcesDie) DieSeal() *MatchResourcesDie

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*MatchResourcesDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*MatchResourcesDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*MatchResourcesDie) DieSealRelease added in v0.13.0

DieSealRelease returns the sealed resource managed by the die.

func (*MatchResourcesDie) DieSealReleasePtr added in v0.13.0

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*MatchResourcesDie) DieStamp added in v0.13.0

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*MatchResourcesDie) DieStampAt added in v0.13.0

func (d *MatchResourcesDie) DieStampAt(jp string, fn interface{}) *MatchResourcesDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*MatchResourcesDie) DieWith added in v0.13.0

func (d *MatchResourcesDie) DieWith(fns ...func(d *MatchResourcesDie)) *MatchResourcesDie

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*MatchResourcesDie) ExcludeResourceRules added in v0.13.0

ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about.

The exclude rules take precedence over include rules (if a resource matches both, it is excluded)

func (*MatchResourcesDie) ExcludeResourceRulesDie added in v0.13.0

func (d *MatchResourcesDie) ExcludeResourceRulesDie(v ...*NamedRuleWithOperationsDie) *MatchResourcesDie

ExcludeResourceRulesDie replaces ExcludeResourceRules by collecting the released value from each die passed.

ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about.

The exclude rules take precedence over include rules (if a resource matches both, it is excluded)

func (*MatchResourcesDie) MatchPolicy added in v0.13.0

matchPolicy defines how the "MatchResources" list is used to match incoming requests.

Allowed values are "Exact" or "Equivalent".

- Exact: match a request only if it exactly matches a specified rule.

For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1,

but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,

a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy.

- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version.

For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1,

and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,

a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy.

Defaults to "Equivalent"

func (*MatchResourcesDie) NamespaceSelector added in v0.13.0

func (d *MatchResourcesDie) NamespaceSelector(v *apismetav1.LabelSelector) *MatchResourcesDie

NamespaceSelector decides whether to run the admission control policy on an object based

on whether the namespace for that object matches the selector. If the

object itself is a namespace, the matching is performed on

object.metadata.labels. If the object is another cluster scoped resource,

it never skips the policy.

For example, to run the webhook on any objects whose namespace is not

associated with "runlevel" of "0" or "1"; you will set the selector as

follows:

"namespaceSelector": {

"matchExpressions": [

{

"key": "runlevel",

"operator": "NotIn",

"values": [

"0",

"1"

]

}

]

}

If instead you want to only run the policy on any objects whose

namespace is associated with the "environment" of "prod" or "staging";

you will set the selector as follows:

"namespaceSelector": {

"matchExpressions": [

{

"key": "environment",

"operator": "In",

"values": [

"prod",

"staging"

]

}

]

}

See

https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

for more examples of label selectors.

Default to the empty LabelSelector, which matches everything.

func (*MatchResourcesDie) NamespaceSelectorDie added in v0.13.0

func (d *MatchResourcesDie) NamespaceSelectorDie(fn func(d *metav1.LabelSelectorDie)) *MatchResourcesDie

NamespaceSelectorDie mutates NamespaceSelector as a die.

NamespaceSelector decides whether to run the admission control policy on an object based

on whether the namespace for that object matches the selector. If the

object itself is a namespace, the matching is performed on

object.metadata.labels. If the object is another cluster scoped resource,

it never skips the policy.

For example, to run the webhook on any objects whose namespace is not

associated with "runlevel" of "0" or "1"; you will set the selector as

follows:

"namespaceSelector": {

"matchExpressions": [

{

"key": "runlevel",

"operator": "NotIn",

"values": [

"0",

"1"

]

}

]

}

If instead you want to only run the policy on any objects whose

namespace is associated with the "environment" of "prod" or "staging";

you will set the selector as follows:

"namespaceSelector": {

"matchExpressions": [

{

"key": "environment",

"operator": "In",

"values": [

"prod",

"staging"

]

}

]

}

See

https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

for more examples of label selectors.

Default to the empty LabelSelector, which matches everything.

func (*MatchResourcesDie) ObjectSelector added in v0.13.0

ObjectSelector decides whether to run the validation based on if the

object has matching labels. objectSelector is evaluated against both

the oldObject and newObject that would be sent to the cel validation, and

is considered to match if either object matches the selector. A null

object (oldObject in the case of create, or newObject in the case of

delete) or an object that cannot have labels (like a

DeploymentRollback or a PodProxyOptions object) is not considered to

match.

Use the object selector only if the webhook is opt-in, because end

users may skip the admission webhook by setting the labels.

Default to the empty LabelSelector, which matches everything.

func (*MatchResourcesDie) ObjectSelectorDie added in v0.13.0

func (d *MatchResourcesDie) ObjectSelectorDie(fn func(d *metav1.LabelSelectorDie)) *MatchResourcesDie

ObjectSelectorDie mutates ObjectSelector as a die.

ObjectSelector decides whether to run the validation based on if the

object has matching labels. objectSelector is evaluated against both

the oldObject and newObject that would be sent to the cel validation, and

is considered to match if either object matches the selector. A null

object (oldObject in the case of create, or newObject in the case of

delete) or an object that cannot have labels (like a

DeploymentRollback or a PodProxyOptions object) is not considered to

match.

Use the object selector only if the webhook is opt-in, because end

users may skip the admission webhook by setting the labels.

Default to the empty LabelSelector, which matches everything.

func (*MatchResourcesDie) ResourceRules added in v0.13.0

ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches.

The policy cares about an operation if it matches _any_ Rule.

func (*MatchResourcesDie) ResourceRulesDie added in v0.13.0

ResourceRulesDie replaces ResourceRules by collecting the released value from each die passed.

ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches.

The policy cares about an operation if it matches _any_ Rule.

type MutatingWebhookConfigurationDie

type MutatingWebhookConfigurationDie struct {
	metav1.FrozenObjectMeta
	// contains filtered or unexported fields
}

func (*MutatingWebhookConfigurationDie) APIVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

func (*MutatingWebhookConfigurationDie) DeepCopy

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*MutatingWebhookConfigurationDie) DeepCopyObject

func (d *MutatingWebhookConfigurationDie) DeepCopyObject() runtime.Object

func (*MutatingWebhookConfigurationDie) DieDefaultTypeMetadata added in v0.13.0

DieDefaultTypeMetadata sets the APIVersion and Kind to "admissionregistration.k8s.io/v1" and "MutatingWebhookConfiguration" respectively.

func (*MutatingWebhookConfigurationDie) DieDiff added in v0.13.0

func (d *MutatingWebhookConfigurationDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*MutatingWebhookConfigurationDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*MutatingWebhookConfigurationDie) DieFeedJSON

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*MutatingWebhookConfigurationDie) DieFeedPtr

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*MutatingWebhookConfigurationDie) DieFeedRawExtension

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*MutatingWebhookConfigurationDie) DieFeedYAML

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*MutatingWebhookConfigurationDie) DieFeedYAMLFile

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*MutatingWebhookConfigurationDie) DieImmutable

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*MutatingWebhookConfigurationDie) DiePatch added in v0.13.0

func (d *MutatingWebhookConfigurationDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*MutatingWebhookConfigurationDie) DieRelease

DieRelease returns the resource managed by the die.

func (*MutatingWebhookConfigurationDie) DieReleaseJSON

func (d *MutatingWebhookConfigurationDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*MutatingWebhookConfigurationDie) DieReleasePtr

DieReleasePtr returns a pointer to the resource managed by the die.

func (*MutatingWebhookConfigurationDie) DieReleaseRawExtension

func (d *MutatingWebhookConfigurationDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*MutatingWebhookConfigurationDie) DieReleaseUnstructured

func (d *MutatingWebhookConfigurationDie) DieReleaseUnstructured() *unstructured.Unstructured

DieReleaseUnstructured returns the resource managed by the die as an unstructured object. Panics on error.

func (*MutatingWebhookConfigurationDie) DieReleaseYAML

func (d *MutatingWebhookConfigurationDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*MutatingWebhookConfigurationDie) DieSeal added in v0.13.0

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*MutatingWebhookConfigurationDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*MutatingWebhookConfigurationDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*MutatingWebhookConfigurationDie) DieSealRelease added in v0.13.0

DieSealRelease returns the sealed resource managed by the die.

func (*MutatingWebhookConfigurationDie) DieSealReleasePtr added in v0.13.0

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*MutatingWebhookConfigurationDie) DieStamp

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*MutatingWebhookConfigurationDie) DieStampAt

func (d *MutatingWebhookConfigurationDie) DieStampAt(jp string, fn interface{}) *MutatingWebhookConfigurationDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*MutatingWebhookConfigurationDie) DieWith

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*MutatingWebhookConfigurationDie) GetObjectKind

func (*MutatingWebhookConfigurationDie) Kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

func (*MutatingWebhookConfigurationDie) MarshalJSON

func (d *MutatingWebhookConfigurationDie) MarshalJSON() ([]byte, error)

func (*MutatingWebhookConfigurationDie) Metadata added in v0.13.0

Metadata standard object's metadata.

func (*MutatingWebhookConfigurationDie) MetadataDie

MetadataDie stamps the resource's ObjectMeta field with a mutable die.

func (*MutatingWebhookConfigurationDie) TypeMetadata added in v0.13.0

TypeMetadata standard object's type metadata.

func (*MutatingWebhookConfigurationDie) TypeMetadataDie added in v0.13.0

TypeMetadataDie stamps the resource's TypeMeta field with a mutable die.

func (*MutatingWebhookConfigurationDie) UnmarshalJSON

func (d *MutatingWebhookConfigurationDie) UnmarshalJSON(b []byte) error

func (*MutatingWebhookConfigurationDie) WebhookDie

WebhookDie mutates a single item in Webhooks matched by the nested field Name, appending a new item if no match is found.

Webhooks is a list of webhooks and the affected resources and operations.

func (*MutatingWebhookConfigurationDie) Webhooks

Webhooks is a list of webhooks and the affected resources and operations.

type MutatingWebhookDie

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

func (*MutatingWebhookDie) AdmissionReviewVersions

func (d *MutatingWebhookDie) AdmissionReviewVersions(v ...string) *MutatingWebhookDie

AdmissionReviewVersions is an ordered list of preferred `AdmissionReview`

versions the Webhook expects. API server will try to use first version in

the list which it supports. If none of the versions specified in this list

supported by API server, validation will fail for this object.

If a persisted webhook configuration specifies allowed versions and does not

include any versions known to the API Server, calls to the webhook will fail

and be subject to the failure policy.

func (*MutatingWebhookDie) ClientConfig

ClientConfig defines how to communicate with the hook.

Required

func (*MutatingWebhookDie) ClientConfigDie

func (d *MutatingWebhookDie) ClientConfigDie(fn func(d *WebhookClientConfigDie)) *MutatingWebhookDie

ClientConfigDie mutates ClientConfig as a die.

ClientConfig defines how to communicate with the hook.

Required

func (*MutatingWebhookDie) DeepCopy

func (d *MutatingWebhookDie) DeepCopy() *MutatingWebhookDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*MutatingWebhookDie) DieDiff added in v0.13.0

func (d *MutatingWebhookDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*MutatingWebhookDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*MutatingWebhookDie) DieFeedJSON

func (d *MutatingWebhookDie) DieFeedJSON(j []byte) *MutatingWebhookDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*MutatingWebhookDie) DieFeedPtr

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*MutatingWebhookDie) DieFeedRawExtension

func (d *MutatingWebhookDie) DieFeedRawExtension(raw runtime.RawExtension) *MutatingWebhookDie

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*MutatingWebhookDie) DieFeedYAML

func (d *MutatingWebhookDie) DieFeedYAML(y []byte) *MutatingWebhookDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*MutatingWebhookDie) DieFeedYAMLFile

func (d *MutatingWebhookDie) DieFeedYAMLFile(name string) *MutatingWebhookDie

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*MutatingWebhookDie) DieImmutable

func (d *MutatingWebhookDie) DieImmutable(immutable bool) *MutatingWebhookDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*MutatingWebhookDie) DiePatch added in v0.13.0

func (d *MutatingWebhookDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*MutatingWebhookDie) DieRelease

DieRelease returns the resource managed by the die.

func (*MutatingWebhookDie) DieReleaseJSON

func (d *MutatingWebhookDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*MutatingWebhookDie) DieReleasePtr

DieReleasePtr returns a pointer to the resource managed by the die.

func (*MutatingWebhookDie) DieReleaseRawExtension

func (d *MutatingWebhookDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*MutatingWebhookDie) DieReleaseYAML

func (d *MutatingWebhookDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*MutatingWebhookDie) DieSeal added in v0.13.0

func (d *MutatingWebhookDie) DieSeal() *MutatingWebhookDie

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*MutatingWebhookDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*MutatingWebhookDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*MutatingWebhookDie) DieSealRelease added in v0.13.0

DieSealRelease returns the sealed resource managed by the die.

func (*MutatingWebhookDie) DieSealReleasePtr added in v0.13.0

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*MutatingWebhookDie) DieStamp

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*MutatingWebhookDie) DieStampAt

func (d *MutatingWebhookDie) DieStampAt(jp string, fn interface{}) *MutatingWebhookDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*MutatingWebhookDie) DieWith

func (d *MutatingWebhookDie) DieWith(fns ...func(d *MutatingWebhookDie)) *MutatingWebhookDie

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*MutatingWebhookDie) FailurePolicy

FailurePolicy defines how unrecognized errors from the admission endpoint are handled -

allowed values are Ignore or Fail. Defaults to Fail.

func (*MutatingWebhookDie) MatchConditionDie

func (d *MutatingWebhookDie) MatchConditionDie(v string, fn func(d *MatchConditionDie)) *MutatingWebhookDie

MatchConditionDie mutates a single item in MatchConditions matched by the nested field Name, appending a new item if no match is found.

MatchConditions is a list of conditions that must be met for a request to be sent to this

webhook. Match conditions filter requests that have already been matched by the rules,

namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.

There are a maximum of 64 match conditions allowed.

The exact matching logic is (in order):

1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.

2. If ALL matchConditions evaluate to TRUE, the webhook is called.

3. If any matchCondition evaluates to an error (but none are FALSE):

- If failurePolicy=Fail, reject the request

- If failurePolicy=Ignore, the error is ignored and the webhook is skipped

func (*MutatingWebhookDie) MatchConditions

MatchConditions is a list of conditions that must be met for a request to be sent to this

webhook. Match conditions filter requests that have already been matched by the rules,

namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.

There are a maximum of 64 match conditions allowed.

The exact matching logic is (in order):

1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.

2. If ALL matchConditions evaluate to TRUE, the webhook is called.

3. If any matchCondition evaluates to an error (but none are FALSE):

- If failurePolicy=Fail, reject the request

- If failurePolicy=Ignore, the error is ignored and the webhook is skipped

func (*MutatingWebhookDie) MatchPolicy

matchPolicy defines how the "rules" list is used to match incoming requests.

Allowed values are "Exact" or "Equivalent".

- Exact: match a request only if it exactly matches a specified rule.

For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1,

but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,

a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.

- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version.

For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1,

and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,

a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.

Defaults to "Equivalent"

func (*MutatingWebhookDie) Name

The name of the admission webhook.

Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where

"imagepolicy" is the name of the webhook, and kubernetes.io is the name

of the organization.

Required.

func (*MutatingWebhookDie) NamespaceSelector

NamespaceSelector decides whether to run the webhook on an object based

on whether the namespace for that object matches the selector. If the

object itself is a namespace, the matching is performed on

object.metadata.labels. If the object is another cluster scoped resource,

it never skips the webhook.

For example, to run the webhook on any objects whose namespace is not

associated with "runlevel" of "0" or "1"; you will set the selector as

follows:

"namespaceSelector": {

"matchExpressions": [

{

"key": "runlevel",

"operator": "NotIn",

"values": [

"0",

"1"

]

}

]

}

If instead you want to only run the webhook on any objects whose

namespace is associated with the "environment" of "prod" or "staging";

you will set the selector as follows:

"namespaceSelector": {

"matchExpressions": [

{

"key": "environment",

"operator": "In",

"values": [

"prod",

"staging"

]

}

]

}

See

https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

for more examples of label selectors.

Default to the empty LabelSelector, which matches everything.

func (*MutatingWebhookDie) NamespaceSelectorDie

func (d *MutatingWebhookDie) NamespaceSelectorDie(fn func(d *metav1.LabelSelectorDie)) *MutatingWebhookDie

NamespaceSelectorDie mutates NamespaceSelector as a die.

NamespaceSelector decides whether to run the webhook on an object based

on whether the namespace for that object matches the selector. If the

object itself is a namespace, the matching is performed on

object.metadata.labels. If the object is another cluster scoped resource,

it never skips the webhook.

For example, to run the webhook on any objects whose namespace is not

associated with "runlevel" of "0" or "1"; you will set the selector as

follows:

"namespaceSelector": {

"matchExpressions": [

{

"key": "runlevel",

"operator": "NotIn",

"values": [

"0",

"1"

]

}

]

}

If instead you want to only run the webhook on any objects whose

namespace is associated with the "environment" of "prod" or "staging";

you will set the selector as follows:

"namespaceSelector": {

"matchExpressions": [

{

"key": "environment",

"operator": "In",

"values": [

"prod",

"staging"

]

}

]

}

See

https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

for more examples of label selectors.

Default to the empty LabelSelector, which matches everything.

func (*MutatingWebhookDie) ObjectSelector

ObjectSelector decides whether to run the webhook based on if the

object has matching labels. objectSelector is evaluated against both

the oldObject and newObject that would be sent to the webhook, and

is considered to match if either object matches the selector. A null

object (oldObject in the case of create, or newObject in the case of

delete) or an object that cannot have labels (like a

DeploymentRollback or a PodProxyOptions object) is not considered to

match.

Use the object selector only if the webhook is opt-in, because end

users may skip the admission webhook by setting the labels.

Default to the empty LabelSelector, which matches everything.

func (*MutatingWebhookDie) ObjectSelectorDie

func (d *MutatingWebhookDie) ObjectSelectorDie(fn func(d *metav1.LabelSelectorDie)) *MutatingWebhookDie

ObjectSelectorDie mutates ObjectSelector as a die.

ObjectSelector decides whether to run the webhook based on if the

object has matching labels. objectSelector is evaluated against both

the oldObject and newObject that would be sent to the webhook, and

is considered to match if either object matches the selector. A null

object (oldObject in the case of create, or newObject in the case of

delete) or an object that cannot have labels (like a

DeploymentRollback or a PodProxyOptions object) is not considered to

match.

Use the object selector only if the webhook is opt-in, because end

users may skip the admission webhook by setting the labels.

Default to the empty LabelSelector, which matches everything.

func (*MutatingWebhookDie) ReinvocationPolicy

reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation.

Allowed values are "Never" and "IfNeeded".

Never: the webhook will not be called more than once in a single admission evaluation.

IfNeeded: the webhook will be called at least one additional time as part of the admission evaluation

if the object being admitted is modified by other admission plugins after the initial webhook call.

Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted.

Note:

* the number of additional invocations is not guaranteed to be exactly one.

* if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again.

* webhooks that use this option may be reordered to minimize the number of additional invocations.

* to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.

Defaults to "Never".

func (*MutatingWebhookDie) Rules

Rules describes what operations on what resources/subresources the webhook cares about.

The webhook cares about an operation if it matches _any_ Rule.

However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks

from putting the cluster in a state which cannot be recovered from without completely

disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called

on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.

func (*MutatingWebhookDie) RulesDie

RulesDie replaces Rules by collecting the released value from each die passed.

Rules describes what operations on what resources/subresources the webhook cares about.

The webhook cares about an operation if it matches _any_ Rule.

However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks

from putting the cluster in a state which cannot be recovered from without completely

disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called

on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.

func (*MutatingWebhookDie) SideEffects

SideEffects states whether this webhook has side effects.

Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown).

Webhooks with side effects MUST implement a reconciliation system, since a request may be

rejected by a future step in the admission chain and the side effects therefore need to be undone.

Requests with the dryRun attribute will be auto-rejected if they match a webhook with

sideEffects == Unknown or Some.

func (*MutatingWebhookDie) TimeoutSeconds

func (d *MutatingWebhookDie) TimeoutSeconds(v *int32) *MutatingWebhookDie

TimeoutSeconds specifies the timeout for this webhook. After the timeout passes,

the webhook call will be ignored or the API call will fail based on the

failure policy.

The timeout value must be between 1 and 30 seconds.

Default to 10 seconds.

type NamedRuleWithOperationsDie added in v0.13.0

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

func (*NamedRuleWithOperationsDie) APIGroups added in v0.13.0

func (*NamedRuleWithOperationsDie) APIVersions added in v0.13.0

func (*NamedRuleWithOperationsDie) DeepCopy added in v0.13.0

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*NamedRuleWithOperationsDie) DieDiff added in v0.13.0

func (d *NamedRuleWithOperationsDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*NamedRuleWithOperationsDie) DieFeed added in v0.13.0

DieFeed returns a new die with the provided resource.

func (*NamedRuleWithOperationsDie) DieFeedJSON added in v0.13.0

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*NamedRuleWithOperationsDie) DieFeedPtr added in v0.13.0

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*NamedRuleWithOperationsDie) DieFeedRawExtension added in v0.13.0

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*NamedRuleWithOperationsDie) DieFeedYAML added in v0.13.0

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*NamedRuleWithOperationsDie) DieFeedYAMLFile added in v0.13.0

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*NamedRuleWithOperationsDie) DieImmutable added in v0.13.0

func (d *NamedRuleWithOperationsDie) DieImmutable(immutable bool) *NamedRuleWithOperationsDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*NamedRuleWithOperationsDie) DiePatch added in v0.13.0

func (d *NamedRuleWithOperationsDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*NamedRuleWithOperationsDie) DieRelease added in v0.13.0

DieRelease returns the resource managed by the die.

func (*NamedRuleWithOperationsDie) DieReleaseJSON added in v0.13.0

func (d *NamedRuleWithOperationsDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*NamedRuleWithOperationsDie) DieReleasePtr added in v0.13.0

DieReleasePtr returns a pointer to the resource managed by the die.

func (*NamedRuleWithOperationsDie) DieReleaseRawExtension added in v0.13.0

func (d *NamedRuleWithOperationsDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*NamedRuleWithOperationsDie) DieReleaseYAML added in v0.13.0

func (d *NamedRuleWithOperationsDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*NamedRuleWithOperationsDie) DieSeal added in v0.13.0

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*NamedRuleWithOperationsDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*NamedRuleWithOperationsDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*NamedRuleWithOperationsDie) DieSealRelease added in v0.13.0

DieSealRelease returns the sealed resource managed by the die.

func (*NamedRuleWithOperationsDie) DieSealReleasePtr added in v0.13.0

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*NamedRuleWithOperationsDie) DieStamp added in v0.13.0

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*NamedRuleWithOperationsDie) DieStampAt added in v0.13.0

func (d *NamedRuleWithOperationsDie) DieStampAt(jp string, fn interface{}) *NamedRuleWithOperationsDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*NamedRuleWithOperationsDie) DieWith added in v0.13.0

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*NamedRuleWithOperationsDie) Operations added in v0.13.0

func (*NamedRuleWithOperationsDie) ResourceNames added in v0.13.0

ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.

func (*NamedRuleWithOperationsDie) Resources added in v0.13.0

func (*NamedRuleWithOperationsDie) Rule added in v0.13.0

func (*NamedRuleWithOperationsDie) RuleWithOperations added in v0.13.0

RuleWithOperations is a tuple of Operations and Resources.

func (*NamedRuleWithOperationsDie) Scope added in v0.13.0

type ParamKindDie added in v0.13.0

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

func (*ParamKindDie) APIVersion added in v0.13.0

func (d *ParamKindDie) APIVersion(v string) *ParamKindDie

APIVersion is the API group version the resources belong to.

In format of "group/version".

Required.

func (*ParamKindDie) DeepCopy added in v0.13.0

func (d *ParamKindDie) DeepCopy() *ParamKindDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*ParamKindDie) DieDiff added in v0.13.0

func (d *ParamKindDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*ParamKindDie) DieFeed added in v0.13.0

DieFeed returns a new die with the provided resource.

func (*ParamKindDie) DieFeedJSON added in v0.13.0

func (d *ParamKindDie) DieFeedJSON(j []byte) *ParamKindDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*ParamKindDie) DieFeedPtr added in v0.13.0

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*ParamKindDie) DieFeedRawExtension added in v0.13.0

func (d *ParamKindDie) DieFeedRawExtension(raw runtime.RawExtension) *ParamKindDie

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ParamKindDie) DieFeedYAML added in v0.13.0

func (d *ParamKindDie) DieFeedYAML(y []byte) *ParamKindDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*ParamKindDie) DieFeedYAMLFile added in v0.13.0

func (d *ParamKindDie) DieFeedYAMLFile(name string) *ParamKindDie

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*ParamKindDie) DieImmutable added in v0.13.0

func (d *ParamKindDie) DieImmutable(immutable bool) *ParamKindDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*ParamKindDie) DiePatch added in v0.13.0

func (d *ParamKindDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*ParamKindDie) DieRelease added in v0.13.0

DieRelease returns the resource managed by the die.

func (*ParamKindDie) DieReleaseJSON added in v0.13.0

func (d *ParamKindDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*ParamKindDie) DieReleasePtr added in v0.13.0

func (d *ParamKindDie) DieReleasePtr() *admissionregistrationv1.ParamKind

DieReleasePtr returns a pointer to the resource managed by the die.

func (*ParamKindDie) DieReleaseRawExtension added in v0.13.0

func (d *ParamKindDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ParamKindDie) DieReleaseYAML added in v0.13.0

func (d *ParamKindDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*ParamKindDie) DieSeal added in v0.13.0

func (d *ParamKindDie) DieSeal() *ParamKindDie

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*ParamKindDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*ParamKindDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*ParamKindDie) DieSealRelease added in v0.13.0

func (d *ParamKindDie) DieSealRelease() admissionregistrationv1.ParamKind

DieSealRelease returns the sealed resource managed by the die.

func (*ParamKindDie) DieSealReleasePtr added in v0.13.0

func (d *ParamKindDie) DieSealReleasePtr() *admissionregistrationv1.ParamKind

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*ParamKindDie) DieStamp added in v0.13.0

func (d *ParamKindDie) DieStamp(fn func(r *admissionregistrationv1.ParamKind)) *ParamKindDie

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*ParamKindDie) DieStampAt added in v0.13.0

func (d *ParamKindDie) DieStampAt(jp string, fn interface{}) *ParamKindDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*ParamKindDie) DieWith added in v0.13.0

func (d *ParamKindDie) DieWith(fns ...func(d *ParamKindDie)) *ParamKindDie

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*ParamKindDie) Kind added in v0.13.0

func (d *ParamKindDie) Kind(v string) *ParamKindDie

Kind is the API kind the resources belong to.

Required.

type ParamRefDie added in v0.13.0

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

func (*ParamRefDie) DeepCopy added in v0.13.0

func (d *ParamRefDie) DeepCopy() *ParamRefDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*ParamRefDie) DieDiff added in v0.13.0

func (d *ParamRefDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*ParamRefDie) DieFeed added in v0.13.0

DieFeed returns a new die with the provided resource.

func (*ParamRefDie) DieFeedJSON added in v0.13.0

func (d *ParamRefDie) DieFeedJSON(j []byte) *ParamRefDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*ParamRefDie) DieFeedPtr added in v0.13.0

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*ParamRefDie) DieFeedRawExtension added in v0.13.0

func (d *ParamRefDie) DieFeedRawExtension(raw runtime.RawExtension) *ParamRefDie

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ParamRefDie) DieFeedYAML added in v0.13.0

func (d *ParamRefDie) DieFeedYAML(y []byte) *ParamRefDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*ParamRefDie) DieFeedYAMLFile added in v0.13.0

func (d *ParamRefDie) DieFeedYAMLFile(name string) *ParamRefDie

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*ParamRefDie) DieImmutable added in v0.13.0

func (d *ParamRefDie) DieImmutable(immutable bool) *ParamRefDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*ParamRefDie) DiePatch added in v0.13.0

func (d *ParamRefDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*ParamRefDie) DieRelease added in v0.13.0

DieRelease returns the resource managed by the die.

func (*ParamRefDie) DieReleaseJSON added in v0.13.0

func (d *ParamRefDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*ParamRefDie) DieReleasePtr added in v0.13.0

func (d *ParamRefDie) DieReleasePtr() *admissionregistrationv1.ParamRef

DieReleasePtr returns a pointer to the resource managed by the die.

func (*ParamRefDie) DieReleaseRawExtension added in v0.13.0

func (d *ParamRefDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ParamRefDie) DieReleaseYAML added in v0.13.0

func (d *ParamRefDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*ParamRefDie) DieSeal added in v0.13.0

func (d *ParamRefDie) DieSeal() *ParamRefDie

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*ParamRefDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*ParamRefDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*ParamRefDie) DieSealRelease added in v0.13.0

func (d *ParamRefDie) DieSealRelease() admissionregistrationv1.ParamRef

DieSealRelease returns the sealed resource managed by the die.

func (*ParamRefDie) DieSealReleasePtr added in v0.13.0

func (d *ParamRefDie) DieSealReleasePtr() *admissionregistrationv1.ParamRef

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*ParamRefDie) DieStamp added in v0.13.0

func (d *ParamRefDie) DieStamp(fn func(r *admissionregistrationv1.ParamRef)) *ParamRefDie

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*ParamRefDie) DieStampAt added in v0.13.0

func (d *ParamRefDie) DieStampAt(jp string, fn interface{}) *ParamRefDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*ParamRefDie) DieWith added in v0.13.0

func (d *ParamRefDie) DieWith(fns ...func(d *ParamRefDie)) *ParamRefDie

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*ParamRefDie) Name added in v0.13.0

func (d *ParamRefDie) Name(v string) *ParamRefDie

name is the name of the resource being referenced.

One of `name` or `selector` must be set, but `name` and `selector` are

mutually exclusive properties. If one is set, the other must be unset.

A single parameter used for all admission requests can be configured

by setting the `name` field, leaving `selector` blank, and setting namespace

if `paramKind` is namespace-scoped.

func (*ParamRefDie) Namespace added in v0.13.0

func (d *ParamRefDie) Namespace(v string) *ParamRefDie

namespace is the namespace of the referenced resource. Allows limiting

the search for params to a specific namespace. Applies to both `name` and

`selector` fields.

A per-namespace parameter may be used by specifying a namespace-scoped

`paramKind` in the policy and leaving this field empty.

- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this

field results in a configuration error.

- If `paramKind` is namespace-scoped, the namespace of the object being

evaluated for admission will be used when this field is left unset. Take

care that if this is left empty the binding must not match any cluster-scoped

resources, which will result in an error.

func (*ParamRefDie) ParameterNotFoundAction added in v0.13.0

`parameterNotFoundAction` controls the behavior of the binding when the resource

exists, and name or selector is valid, but there are no parameters

matched by the binding. If the value is set to `Allow`, then no

matched parameters will be treated as successful validation by the binding.

If set to `Deny`, then no matched parameters will be subject to the

`failurePolicy` of the policy.

Allowed values are `Allow` or `Deny`

Required

func (*ParamRefDie) Selector added in v0.13.0

selector can be used to match multiple param objects based on their labels.

Supply selector: {} to match all resources of the ParamKind.

If multiple params are found, they are all evaluated with the policy expressions

and the results are ANDed together.

One of `name` or `selector` must be set, but `name` and `selector` are

mutually exclusive properties. If one is set, the other must be unset.

func (*ParamRefDie) SelectorDie added in v0.13.0

func (d *ParamRefDie) SelectorDie(fn func(d *metav1.LabelSelectorDie)) *ParamRefDie

SelectorDie mutates Selector as a die.

selector can be used to match multiple param objects based on their labels.

Supply selector: {} to match all resources of the ParamKind.

If multiple params are found, they are all evaluated with the policy expressions

and the results are ANDed together.

One of `name` or `selector` must be set, but `name` and `selector` are

mutually exclusive properties. If one is set, the other must be unset.

type RuleDie

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

func (*RuleDie) APIGroups

func (d *RuleDie) APIGroups(v ...string) *RuleDie

APIGroups is the API groups the resources belong to. '*' is all groups.

If '*' is present, the length of the slice must be one.

Required.

func (*RuleDie) APIVersions

func (d *RuleDie) APIVersions(v ...string) *RuleDie

APIVersions is the API versions the resources belong to. '*' is all versions.

If '*' is present, the length of the slice must be one.

Required.

func (*RuleDie) DeepCopy

func (d *RuleDie) DeepCopy() *RuleDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*RuleDie) DieDiff added in v0.13.0

func (d *RuleDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*RuleDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*RuleDie) DieFeedJSON

func (d *RuleDie) DieFeedJSON(j []byte) *RuleDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*RuleDie) DieFeedPtr

func (d *RuleDie) DieFeedPtr(r *admissionregistrationv1.Rule) *RuleDie

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*RuleDie) DieFeedRawExtension

func (d *RuleDie) DieFeedRawExtension(raw runtime.RawExtension) *RuleDie

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*RuleDie) DieFeedYAML

func (d *RuleDie) DieFeedYAML(y []byte) *RuleDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*RuleDie) DieFeedYAMLFile

func (d *RuleDie) DieFeedYAMLFile(name string) *RuleDie

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*RuleDie) DieImmutable

func (d *RuleDie) DieImmutable(immutable bool) *RuleDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*RuleDie) DiePatch added in v0.13.0

func (d *RuleDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*RuleDie) DieRelease

func (d *RuleDie) DieRelease() admissionregistrationv1.Rule

DieRelease returns the resource managed by the die.

func (*RuleDie) DieReleaseJSON

func (d *RuleDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*RuleDie) DieReleasePtr

func (d *RuleDie) DieReleasePtr() *admissionregistrationv1.Rule

DieReleasePtr returns a pointer to the resource managed by the die.

func (*RuleDie) DieReleaseRawExtension

func (d *RuleDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*RuleDie) DieReleaseYAML

func (d *RuleDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*RuleDie) DieSeal added in v0.13.0

func (d *RuleDie) DieSeal() *RuleDie

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*RuleDie) DieSealFeed added in v0.13.0

func (d *RuleDie) DieSealFeed(r admissionregistrationv1.Rule) *RuleDie

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*RuleDie) DieSealFeedPtr added in v0.13.0

func (d *RuleDie) DieSealFeedPtr(r *admissionregistrationv1.Rule) *RuleDie

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*RuleDie) DieSealRelease added in v0.13.0

func (d *RuleDie) DieSealRelease() admissionregistrationv1.Rule

DieSealRelease returns the sealed resource managed by the die.

func (*RuleDie) DieSealReleasePtr added in v0.13.0

func (d *RuleDie) DieSealReleasePtr() *admissionregistrationv1.Rule

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*RuleDie) DieStamp

func (d *RuleDie) DieStamp(fn func(r *admissionregistrationv1.Rule)) *RuleDie

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*RuleDie) DieStampAt

func (d *RuleDie) DieStampAt(jp string, fn interface{}) *RuleDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*RuleDie) DieWith

func (d *RuleDie) DieWith(fns ...func(d *RuleDie)) *RuleDie

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*RuleDie) Resources

func (d *RuleDie) Resources(v ...string) *RuleDie

Resources is a list of resources this rule applies to.

For example:

'pods' means pods.

'pods/log' means the log subresource of pods.

'*' means all resources, but not subresources.

'pods/*' means all subresources of pods.

'*/scale' means all scale subresources.

'*/*' means all resources and their subresources.

If wildcard is present, the validation rule will ensure resources do not

overlap with each other.

Depending on the enclosing object, subresources might not be allowed.

Required.

func (*RuleDie) Scope

scope specifies the scope of this rule.

Valid values are "Cluster", "Namespaced", and "*"

"Cluster" means that only cluster-scoped resources will match this rule.

Namespace API objects are cluster-scoped.

"Namespaced" means that only namespaced resources will match this rule.

"*" means that there are no scope restrictions.

Subresources match the scope of their parent resource.

Default is "*".

type RuleWithOperationsDie

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

func (*RuleWithOperationsDie) APIGroups

func (*RuleWithOperationsDie) APIVersions

func (d *RuleWithOperationsDie) APIVersions(v ...string) *RuleWithOperationsDie

func (*RuleWithOperationsDie) DeepCopy

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*RuleWithOperationsDie) DieDiff added in v0.13.0

func (d *RuleWithOperationsDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*RuleWithOperationsDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*RuleWithOperationsDie) DieFeedJSON

func (d *RuleWithOperationsDie) DieFeedJSON(j []byte) *RuleWithOperationsDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*RuleWithOperationsDie) DieFeedPtr

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*RuleWithOperationsDie) DieFeedRawExtension

func (d *RuleWithOperationsDie) DieFeedRawExtension(raw runtime.RawExtension) *RuleWithOperationsDie

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*RuleWithOperationsDie) DieFeedYAML

func (d *RuleWithOperationsDie) DieFeedYAML(y []byte) *RuleWithOperationsDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*RuleWithOperationsDie) DieFeedYAMLFile

func (d *RuleWithOperationsDie) DieFeedYAMLFile(name string) *RuleWithOperationsDie

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*RuleWithOperationsDie) DieImmutable

func (d *RuleWithOperationsDie) DieImmutable(immutable bool) *RuleWithOperationsDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*RuleWithOperationsDie) DiePatch added in v0.13.0

func (d *RuleWithOperationsDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*RuleWithOperationsDie) DieRelease

DieRelease returns the resource managed by the die.

func (*RuleWithOperationsDie) DieReleaseJSON

func (d *RuleWithOperationsDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*RuleWithOperationsDie) DieReleasePtr

DieReleasePtr returns a pointer to the resource managed by the die.

func (*RuleWithOperationsDie) DieReleaseRawExtension

func (d *RuleWithOperationsDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*RuleWithOperationsDie) DieReleaseYAML

func (d *RuleWithOperationsDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*RuleWithOperationsDie) DieSeal added in v0.13.0

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*RuleWithOperationsDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*RuleWithOperationsDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*RuleWithOperationsDie) DieSealRelease added in v0.13.0

DieSealRelease returns the sealed resource managed by the die.

func (*RuleWithOperationsDie) DieSealReleasePtr added in v0.13.0

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*RuleWithOperationsDie) DieStamp

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*RuleWithOperationsDie) DieStampAt

func (d *RuleWithOperationsDie) DieStampAt(jp string, fn interface{}) *RuleWithOperationsDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*RuleWithOperationsDie) DieWith

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*RuleWithOperationsDie) Operations

Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or *

for all of those operations and any future admission operations that are added.

If '*' is present, the length of the slice must be one.

Required.

func (*RuleWithOperationsDie) Resources

func (*RuleWithOperationsDie) Rule

Rule is embedded, it describes other criteria of the rule, like

APIGroups, APIVersions, Resources, etc.

func (*RuleWithOperationsDie) Scope

type ServiceReferenceDie

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

func (*ServiceReferenceDie) DeepCopy

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*ServiceReferenceDie) DieDiff added in v0.13.0

func (d *ServiceReferenceDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*ServiceReferenceDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*ServiceReferenceDie) DieFeedJSON

func (d *ServiceReferenceDie) DieFeedJSON(j []byte) *ServiceReferenceDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*ServiceReferenceDie) DieFeedPtr

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*ServiceReferenceDie) DieFeedRawExtension

func (d *ServiceReferenceDie) DieFeedRawExtension(raw runtime.RawExtension) *ServiceReferenceDie

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ServiceReferenceDie) DieFeedYAML

func (d *ServiceReferenceDie) DieFeedYAML(y []byte) *ServiceReferenceDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*ServiceReferenceDie) DieFeedYAMLFile

func (d *ServiceReferenceDie) DieFeedYAMLFile(name string) *ServiceReferenceDie

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*ServiceReferenceDie) DieImmutable

func (d *ServiceReferenceDie) DieImmutable(immutable bool) *ServiceReferenceDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*ServiceReferenceDie) DiePatch added in v0.13.0

func (d *ServiceReferenceDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*ServiceReferenceDie) DieRelease

DieRelease returns the resource managed by the die.

func (*ServiceReferenceDie) DieReleaseJSON

func (d *ServiceReferenceDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*ServiceReferenceDie) DieReleasePtr

DieReleasePtr returns a pointer to the resource managed by the die.

func (*ServiceReferenceDie) DieReleaseRawExtension

func (d *ServiceReferenceDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ServiceReferenceDie) DieReleaseYAML

func (d *ServiceReferenceDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*ServiceReferenceDie) DieSeal added in v0.13.0

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*ServiceReferenceDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*ServiceReferenceDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*ServiceReferenceDie) DieSealRelease added in v0.13.0

DieSealRelease returns the sealed resource managed by the die.

func (*ServiceReferenceDie) DieSealReleasePtr added in v0.13.0

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*ServiceReferenceDie) DieStamp

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*ServiceReferenceDie) DieStampAt

func (d *ServiceReferenceDie) DieStampAt(jp string, fn interface{}) *ServiceReferenceDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*ServiceReferenceDie) DieWith

func (d *ServiceReferenceDie) DieWith(fns ...func(d *ServiceReferenceDie)) *ServiceReferenceDie

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*ServiceReferenceDie) Name

`name` is the name of the service.

Required

func (*ServiceReferenceDie) Namespace

`namespace` is the namespace of the service.

Required

func (*ServiceReferenceDie) Path

`path` is an optional URL path which will be sent in any request to

this service.

func (*ServiceReferenceDie) Port

If specified, the port on the service that hosting webhook.

Default to 443 for backward compatibility.

`port` should be a valid port number (1-65535, inclusive).

type TypeCheckingDie added in v0.13.0

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

func (*TypeCheckingDie) DeepCopy added in v0.13.0

func (d *TypeCheckingDie) DeepCopy() *TypeCheckingDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*TypeCheckingDie) DieDiff added in v0.13.0

func (d *TypeCheckingDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*TypeCheckingDie) DieFeed added in v0.13.0

DieFeed returns a new die with the provided resource.

func (*TypeCheckingDie) DieFeedJSON added in v0.13.0

func (d *TypeCheckingDie) DieFeedJSON(j []byte) *TypeCheckingDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*TypeCheckingDie) DieFeedPtr added in v0.13.0

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*TypeCheckingDie) DieFeedRawExtension added in v0.13.0

func (d *TypeCheckingDie) DieFeedRawExtension(raw runtime.RawExtension) *TypeCheckingDie

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*TypeCheckingDie) DieFeedYAML added in v0.13.0

func (d *TypeCheckingDie) DieFeedYAML(y []byte) *TypeCheckingDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*TypeCheckingDie) DieFeedYAMLFile added in v0.13.0

func (d *TypeCheckingDie) DieFeedYAMLFile(name string) *TypeCheckingDie

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*TypeCheckingDie) DieImmutable added in v0.13.0

func (d *TypeCheckingDie) DieImmutable(immutable bool) *TypeCheckingDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*TypeCheckingDie) DiePatch added in v0.13.0

func (d *TypeCheckingDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*TypeCheckingDie) DieRelease added in v0.13.0

DieRelease returns the resource managed by the die.

func (*TypeCheckingDie) DieReleaseJSON added in v0.13.0

func (d *TypeCheckingDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*TypeCheckingDie) DieReleasePtr added in v0.13.0

DieReleasePtr returns a pointer to the resource managed by the die.

func (*TypeCheckingDie) DieReleaseRawExtension added in v0.13.0

func (d *TypeCheckingDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*TypeCheckingDie) DieReleaseYAML added in v0.13.0

func (d *TypeCheckingDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*TypeCheckingDie) DieSeal added in v0.13.0

func (d *TypeCheckingDie) DieSeal() *TypeCheckingDie

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*TypeCheckingDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*TypeCheckingDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*TypeCheckingDie) DieSealRelease added in v0.13.0

DieSealRelease returns the sealed resource managed by the die.

func (*TypeCheckingDie) DieSealReleasePtr added in v0.13.0

func (d *TypeCheckingDie) DieSealReleasePtr() *admissionregistrationv1.TypeChecking

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*TypeCheckingDie) DieStamp added in v0.13.0

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*TypeCheckingDie) DieStampAt added in v0.13.0

func (d *TypeCheckingDie) DieStampAt(jp string, fn interface{}) *TypeCheckingDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*TypeCheckingDie) DieWith added in v0.13.0

func (d *TypeCheckingDie) DieWith(fns ...func(d *TypeCheckingDie)) *TypeCheckingDie

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*TypeCheckingDie) ExpressionWarnings added in v0.13.0

The type checking warnings for each expression.

func (*TypeCheckingDie) ExpressionWarningsDie added in v0.13.0

func (d *TypeCheckingDie) ExpressionWarningsDie(v ...*ExpressionWarningDie) *TypeCheckingDie

ExpressionWarningsDie replaces ExpressionWarnings by collecting the released value from each die passed.

The type checking warnings for each expression.

type ValidatingAdmissionPolicyBindingDie added in v0.13.0

type ValidatingAdmissionPolicyBindingDie struct {
	metav1.FrozenObjectMeta
	// contains filtered or unexported fields
}

func (*ValidatingAdmissionPolicyBindingDie) APIVersion added in v0.13.0

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

func (*ValidatingAdmissionPolicyBindingDie) DeepCopy added in v0.13.0

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*ValidatingAdmissionPolicyBindingDie) DeepCopyObject added in v0.13.0

func (*ValidatingAdmissionPolicyBindingDie) DieDefaultTypeMetadata added in v0.13.0

DieDefaultTypeMetadata sets the APIVersion and Kind to "admissionregistration.k8s.io/v1" and "ValidatingAdmissionPolicyBinding" respectively.

func (*ValidatingAdmissionPolicyBindingDie) DieDiff added in v0.13.0

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*ValidatingAdmissionPolicyBindingDie) DieFeed added in v0.13.0

DieFeed returns a new die with the provided resource.

func (*ValidatingAdmissionPolicyBindingDie) DieFeedJSON added in v0.13.0

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*ValidatingAdmissionPolicyBindingDie) DieFeedPtr added in v0.13.0

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*ValidatingAdmissionPolicyBindingDie) DieFeedRawExtension added in v0.13.0

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ValidatingAdmissionPolicyBindingDie) DieFeedYAML added in v0.13.0

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*ValidatingAdmissionPolicyBindingDie) DieFeedYAMLFile added in v0.13.0

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*ValidatingAdmissionPolicyBindingDie) DieImmutable added in v0.13.0

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*ValidatingAdmissionPolicyBindingDie) DiePatch added in v0.13.0

func (d *ValidatingAdmissionPolicyBindingDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*ValidatingAdmissionPolicyBindingDie) DieRelease added in v0.13.0

DieRelease returns the resource managed by the die.

func (*ValidatingAdmissionPolicyBindingDie) DieReleaseJSON added in v0.13.0

func (d *ValidatingAdmissionPolicyBindingDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*ValidatingAdmissionPolicyBindingDie) DieReleasePtr added in v0.13.0

DieReleasePtr returns a pointer to the resource managed by the die.

func (*ValidatingAdmissionPolicyBindingDie) DieReleaseRawExtension added in v0.13.0

func (d *ValidatingAdmissionPolicyBindingDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ValidatingAdmissionPolicyBindingDie) DieReleaseUnstructured added in v0.13.0

func (d *ValidatingAdmissionPolicyBindingDie) DieReleaseUnstructured() *unstructured.Unstructured

DieReleaseUnstructured returns the resource managed by the die as an unstructured object. Panics on error.

func (*ValidatingAdmissionPolicyBindingDie) DieReleaseYAML added in v0.13.0

func (d *ValidatingAdmissionPolicyBindingDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*ValidatingAdmissionPolicyBindingDie) DieSeal added in v0.13.0

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*ValidatingAdmissionPolicyBindingDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*ValidatingAdmissionPolicyBindingDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*ValidatingAdmissionPolicyBindingDie) DieSealRelease added in v0.13.0

DieSealRelease returns the sealed resource managed by the die.

func (*ValidatingAdmissionPolicyBindingDie) DieSealReleasePtr added in v0.13.0

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*ValidatingAdmissionPolicyBindingDie) DieStamp added in v0.13.0

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*ValidatingAdmissionPolicyBindingDie) DieStampAt added in v0.13.0

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*ValidatingAdmissionPolicyBindingDie) DieWith added in v0.13.0

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*ValidatingAdmissionPolicyBindingDie) GetObjectKind added in v0.13.0

func (*ValidatingAdmissionPolicyBindingDie) Kind added in v0.13.0

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

func (*ValidatingAdmissionPolicyBindingDie) MarshalJSON added in v0.13.0

func (d *ValidatingAdmissionPolicyBindingDie) MarshalJSON() ([]byte, error)

func (*ValidatingAdmissionPolicyBindingDie) Metadata added in v0.13.0

Metadata standard object's metadata.

func (*ValidatingAdmissionPolicyBindingDie) MetadataDie added in v0.13.0

MetadataDie stamps the resource's ObjectMeta field with a mutable die.

func (*ValidatingAdmissionPolicyBindingDie) Spec added in v0.13.0

Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.

func (*ValidatingAdmissionPolicyBindingDie) SpecDie added in v0.13.0

SpecDie stamps the resource's spec field with a mutable die.

func (*ValidatingAdmissionPolicyBindingDie) TypeMetadata added in v0.13.0

TypeMetadata standard object's type metadata.

func (*ValidatingAdmissionPolicyBindingDie) TypeMetadataDie added in v0.13.0

TypeMetadataDie stamps the resource's TypeMeta field with a mutable die.

func (*ValidatingAdmissionPolicyBindingDie) UnmarshalJSON added in v0.13.0

func (d *ValidatingAdmissionPolicyBindingDie) UnmarshalJSON(b []byte) error

type ValidatingAdmissionPolicyBindingSpecDie added in v0.13.0

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

func (*ValidatingAdmissionPolicyBindingSpecDie) DeepCopy added in v0.13.0

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieDiff added in v0.13.0

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieFeed added in v0.13.0

DieFeed returns a new die with the provided resource.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieFeedJSON added in v0.13.0

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieFeedPtr added in v0.13.0

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieFeedRawExtension added in v0.13.0

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieFeedYAML added in v0.13.0

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieFeedYAMLFile added in v0.13.0

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieImmutable added in v0.13.0

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*ValidatingAdmissionPolicyBindingSpecDie) DiePatch added in v0.13.0

DiePatch generates a patch between the current value of the die and the sealed value.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieRelease added in v0.13.0

DieRelease returns the resource managed by the die.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieReleaseJSON added in v0.13.0

func (d *ValidatingAdmissionPolicyBindingSpecDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieReleasePtr added in v0.13.0

DieReleasePtr returns a pointer to the resource managed by the die.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieReleaseRawExtension added in v0.13.0

func (d *ValidatingAdmissionPolicyBindingSpecDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieReleaseYAML added in v0.13.0

func (d *ValidatingAdmissionPolicyBindingSpecDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieSeal added in v0.13.0

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieSealRelease added in v0.13.0

DieSealRelease returns the sealed resource managed by the die.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieSealReleasePtr added in v0.13.0

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieStamp added in v0.13.0

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieStampAt added in v0.13.0

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*ValidatingAdmissionPolicyBindingSpecDie) DieWith added in v0.13.0

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*ValidatingAdmissionPolicyBindingSpecDie) MatchResources added in v0.13.0

MatchResources declares what resources match this binding and will be validated by it.

Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this.

If this is unset, all resources matched by the policy are validated by this binding

When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated.

Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required.

func (*ValidatingAdmissionPolicyBindingSpecDie) MatchResourcesDie added in v0.13.0

MatchResourcesDie mutates MatchResources as a die.

MatchResources declares what resources match this binding and will be validated by it.

Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this.

If this is unset, all resources matched by the policy are validated by this binding

When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated.

Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required.

func (*ValidatingAdmissionPolicyBindingSpecDie) ParamRef added in v0.13.0

paramRef specifies the parameter resource used to configure the admission control policy.

It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy.

If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied.

If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.

func (*ValidatingAdmissionPolicyBindingSpecDie) ParamRefDie added in v0.13.0

ParamRefDie mutates ParamRef as a die.

paramRef specifies the parameter resource used to configure the admission control policy.

It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy.

If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied.

If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.

func (*ValidatingAdmissionPolicyBindingSpecDie) PolicyName added in v0.13.0

PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to.

If the referenced resource does not exist, this binding is considered invalid and will be ignored

Required.

func (*ValidatingAdmissionPolicyBindingSpecDie) ValidationActions added in v0.13.0

validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced.

If a validation evaluates to false it is always enforced according to these actions.

Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according

to these actions only if the FailurePolicy is set to Fail, otherwise the failures are

ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.

validationActions is declared as a set of action values. Order does

not matter. validationActions may not contain duplicates of the same action.

The supported actions values are:

"Deny" specifies that a validation failure results in a denied request.

"Warn" specifies that a validation failure is reported to the request client

in HTTP Warning headers, with a warning code of 299. Warnings can be sent

both for allowed or denied admission responses.

"Audit" specifies that a validation failure is included in the published

audit event for the request. The audit event will contain a

`validation.policy.admission.k8s.io/validation_failure` audit annotation

with a value containing the details of the validation failures, formatted as

a JSON list of objects, each with the following fields:

- message: The validation failure message string

- policy: The resource name of the ValidatingAdmissionPolicy

- binding: The resource name of the ValidatingAdmissionPolicyBinding

- expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy

- validationActions: The enforcement actions enacted for the validation failure

Example audit annotation:

`"validation.policy.admission.k8s.io/validation_failure": "[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]"`

Clients should expect to handle additional values by ignoring

any values not recognized.

"Deny" and "Warn" may not be used together since this combination

needlessly duplicates the validation failure both in the

API response body and the HTTP warning headers.

Required.

type ValidatingAdmissionPolicyDie added in v0.13.0

type ValidatingAdmissionPolicyDie struct {
	metav1.FrozenObjectMeta
	// contains filtered or unexported fields
}

func (*ValidatingAdmissionPolicyDie) APIVersion added in v0.13.0

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

func (*ValidatingAdmissionPolicyDie) DeepCopy added in v0.13.0

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*ValidatingAdmissionPolicyDie) DeepCopyObject added in v0.13.0

func (d *ValidatingAdmissionPolicyDie) DeepCopyObject() runtime.Object

func (*ValidatingAdmissionPolicyDie) DieDefaultTypeMetadata added in v0.13.0

func (d *ValidatingAdmissionPolicyDie) DieDefaultTypeMetadata() *ValidatingAdmissionPolicyDie

DieDefaultTypeMetadata sets the APIVersion and Kind to "admissionregistration.k8s.io/v1" and "ValidatingAdmissionPolicy" respectively.

func (*ValidatingAdmissionPolicyDie) DieDiff added in v0.13.0

func (d *ValidatingAdmissionPolicyDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*ValidatingAdmissionPolicyDie) DieFeed added in v0.13.0

DieFeed returns a new die with the provided resource.

func (*ValidatingAdmissionPolicyDie) DieFeedJSON added in v0.13.0

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*ValidatingAdmissionPolicyDie) DieFeedPtr added in v0.13.0

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*ValidatingAdmissionPolicyDie) DieFeedRawExtension added in v0.13.0

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ValidatingAdmissionPolicyDie) DieFeedYAML added in v0.13.0

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*ValidatingAdmissionPolicyDie) DieFeedYAMLFile added in v0.13.0

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*ValidatingAdmissionPolicyDie) DieImmutable added in v0.13.0

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*ValidatingAdmissionPolicyDie) DiePatch added in v0.13.0

func (d *ValidatingAdmissionPolicyDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*ValidatingAdmissionPolicyDie) DieRelease added in v0.13.0

DieRelease returns the resource managed by the die.

func (*ValidatingAdmissionPolicyDie) DieReleaseJSON added in v0.13.0

func (d *ValidatingAdmissionPolicyDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*ValidatingAdmissionPolicyDie) DieReleasePtr added in v0.13.0

DieReleasePtr returns a pointer to the resource managed by the die.

func (*ValidatingAdmissionPolicyDie) DieReleaseRawExtension added in v0.13.0

func (d *ValidatingAdmissionPolicyDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ValidatingAdmissionPolicyDie) DieReleaseUnstructured added in v0.13.0

func (d *ValidatingAdmissionPolicyDie) DieReleaseUnstructured() *unstructured.Unstructured

DieReleaseUnstructured returns the resource managed by the die as an unstructured object. Panics on error.

func (*ValidatingAdmissionPolicyDie) DieReleaseYAML added in v0.13.0

func (d *ValidatingAdmissionPolicyDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*ValidatingAdmissionPolicyDie) DieSeal added in v0.13.0

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*ValidatingAdmissionPolicyDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*ValidatingAdmissionPolicyDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*ValidatingAdmissionPolicyDie) DieSealRelease added in v0.13.0

DieSealRelease returns the sealed resource managed by the die.

func (*ValidatingAdmissionPolicyDie) DieSealReleasePtr added in v0.13.0

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*ValidatingAdmissionPolicyDie) DieStamp added in v0.13.0

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*ValidatingAdmissionPolicyDie) DieStampAt added in v0.13.0

func (d *ValidatingAdmissionPolicyDie) DieStampAt(jp string, fn interface{}) *ValidatingAdmissionPolicyDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*ValidatingAdmissionPolicyDie) DieWith added in v0.13.0

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*ValidatingAdmissionPolicyDie) GetObjectKind added in v0.13.0

func (d *ValidatingAdmissionPolicyDie) GetObjectKind() schema.ObjectKind

func (*ValidatingAdmissionPolicyDie) Kind added in v0.13.0

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

func (*ValidatingAdmissionPolicyDie) MarshalJSON added in v0.13.0

func (d *ValidatingAdmissionPolicyDie) MarshalJSON() ([]byte, error)

func (*ValidatingAdmissionPolicyDie) Metadata added in v0.13.0

Metadata standard object's metadata.

func (*ValidatingAdmissionPolicyDie) MetadataDie added in v0.13.0

MetadataDie stamps the resource's ObjectMeta field with a mutable die.

func (*ValidatingAdmissionPolicyDie) Spec added in v0.13.0

Specification of the desired behavior of the ValidatingAdmissionPolicy.

func (*ValidatingAdmissionPolicyDie) SpecDie added in v0.13.0

SpecDie stamps the resource's spec field with a mutable die.

func (*ValidatingAdmissionPolicyDie) Status added in v0.13.0

The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy

behaves in the expected way.

Populated by the system.

Read-only.

func (*ValidatingAdmissionPolicyDie) StatusDie added in v0.13.0

StatusDie stamps the resource's status field with a mutable die.

func (*ValidatingAdmissionPolicyDie) TypeMetadata added in v0.13.0

TypeMetadata standard object's type metadata.

func (*ValidatingAdmissionPolicyDie) TypeMetadataDie added in v0.13.0

TypeMetadataDie stamps the resource's TypeMeta field with a mutable die.

func (*ValidatingAdmissionPolicyDie) UnmarshalJSON added in v0.13.0

func (d *ValidatingAdmissionPolicyDie) UnmarshalJSON(b []byte) error

type ValidatingAdmissionPolicySpecDie added in v0.13.0

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

func (*ValidatingAdmissionPolicySpecDie) AuditAnnotations added in v0.13.0

auditAnnotations contains CEL expressions which are used to produce audit

annotations for the audit event of the API request.

validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is

required.

func (*ValidatingAdmissionPolicySpecDie) AuditAnnotationsDie added in v0.13.0

AuditAnnotationsDie replaces AuditAnnotations by collecting the released value from each die passed.

auditAnnotations contains CEL expressions which are used to produce audit

annotations for the audit event of the API request.

validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is

required.

func (*ValidatingAdmissionPolicySpecDie) DeepCopy added in v0.13.0

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*ValidatingAdmissionPolicySpecDie) DieDiff added in v0.13.0

func (d *ValidatingAdmissionPolicySpecDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*ValidatingAdmissionPolicySpecDie) DieFeed added in v0.13.0

DieFeed returns a new die with the provided resource.

func (*ValidatingAdmissionPolicySpecDie) DieFeedJSON added in v0.13.0

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*ValidatingAdmissionPolicySpecDie) DieFeedPtr added in v0.13.0

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*ValidatingAdmissionPolicySpecDie) DieFeedRawExtension added in v0.13.0

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ValidatingAdmissionPolicySpecDie) DieFeedYAML added in v0.13.0

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*ValidatingAdmissionPolicySpecDie) DieFeedYAMLFile added in v0.13.0

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*ValidatingAdmissionPolicySpecDie) DieImmutable added in v0.13.0

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*ValidatingAdmissionPolicySpecDie) DiePatch added in v0.13.0

func (d *ValidatingAdmissionPolicySpecDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*ValidatingAdmissionPolicySpecDie) DieRelease added in v0.13.0

DieRelease returns the resource managed by the die.

func (*ValidatingAdmissionPolicySpecDie) DieReleaseJSON added in v0.13.0

func (d *ValidatingAdmissionPolicySpecDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*ValidatingAdmissionPolicySpecDie) DieReleasePtr added in v0.13.0

DieReleasePtr returns a pointer to the resource managed by the die.

func (*ValidatingAdmissionPolicySpecDie) DieReleaseRawExtension added in v0.13.0

func (d *ValidatingAdmissionPolicySpecDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ValidatingAdmissionPolicySpecDie) DieReleaseYAML added in v0.13.0

func (d *ValidatingAdmissionPolicySpecDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*ValidatingAdmissionPolicySpecDie) DieSeal added in v0.13.0

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*ValidatingAdmissionPolicySpecDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*ValidatingAdmissionPolicySpecDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*ValidatingAdmissionPolicySpecDie) DieSealRelease added in v0.13.0

DieSealRelease returns the sealed resource managed by the die.

func (*ValidatingAdmissionPolicySpecDie) DieSealReleasePtr added in v0.13.0

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*ValidatingAdmissionPolicySpecDie) DieStamp added in v0.13.0

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*ValidatingAdmissionPolicySpecDie) DieStampAt added in v0.13.0

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*ValidatingAdmissionPolicySpecDie) DieWith added in v0.13.0

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*ValidatingAdmissionPolicySpecDie) FailurePolicy added in v0.13.0

failurePolicy defines how to handle failures for the admission policy. Failures can

occur from CEL expression parse errors, type check errors, runtime errors and invalid

or mis-configured policy definitions or bindings.

A policy is invalid if spec.paramKind refers to a non-existent Kind.

A binding is invalid if spec.paramRef.name refers to a non-existent resource.

failurePolicy does not define how validations that evaluate to false are handled.

When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions

define how failures are enforced.

Allowed values are Ignore or Fail. Defaults to Fail.

func (*ValidatingAdmissionPolicySpecDie) MatchConditionDie added in v0.13.0

MatchConditionDie mutates a single item in MatchConditions matched by the nested field Name, appending a new item if no match is found.

MatchConditions is a list of conditions that must be met for a request to be validated.

Match conditions filter requests that have already been matched by the rules,

namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.

There are a maximum of 64 match conditions allowed.

If a parameter object is provided, it can be accessed via the `params` handle in the same

manner as validation expressions.

The exact matching logic is (in order):

1. If ANY matchCondition evaluates to FALSE, the policy is skipped.

2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.

3. If any matchCondition evaluates to an error (but none are FALSE):

- If failurePolicy=Fail, reject the request

- If failurePolicy=Ignore, the policy is skipped

func (*ValidatingAdmissionPolicySpecDie) MatchConditions added in v0.13.0

MatchConditions is a list of conditions that must be met for a request to be validated.

Match conditions filter requests that have already been matched by the rules,

namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.

There are a maximum of 64 match conditions allowed.

If a parameter object is provided, it can be accessed via the `params` handle in the same

manner as validation expressions.

The exact matching logic is (in order):

1. If ANY matchCondition evaluates to FALSE, the policy is skipped.

2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.

3. If any matchCondition evaluates to an error (but none are FALSE):

- If failurePolicy=Fail, reject the request

- If failurePolicy=Ignore, the policy is skipped

func (*ValidatingAdmissionPolicySpecDie) MatchConstraints added in v0.13.0

MatchConstraints specifies what resources this policy is designed to validate.

The AdmissionPolicy cares about a request if it matches _all_ Constraints.

However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API

ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding.

Required.

func (*ValidatingAdmissionPolicySpecDie) MatchConstraintsDie added in v0.13.0

MatchConstraintsDie mutates MatchConstraints as a die.

MatchConstraints specifies what resources this policy is designed to validate.

The AdmissionPolicy cares about a request if it matches _all_ Constraints.

However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API

ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding.

Required.

func (*ValidatingAdmissionPolicySpecDie) ParamKind added in v0.13.0

ParamKind specifies the kind of resources used to parameterize this policy.

If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions.

If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied.

If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null.

func (*ValidatingAdmissionPolicySpecDie) ParamKindDie added in v0.13.0

ParamKindDie mutates ParamKind as a die.

ParamKind specifies the kind of resources used to parameterize this policy.

If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions.

If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied.

If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null.

func (*ValidatingAdmissionPolicySpecDie) Validations added in v0.13.0

Validations contain CEL expressions which is used to apply the validation.

Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is

required.

func (*ValidatingAdmissionPolicySpecDie) ValidationsDie added in v0.13.0

ValidationsDie replaces Validations by collecting the released value from each die passed.

Validations contain CEL expressions which is used to apply the validation.

Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is

required.

func (*ValidatingAdmissionPolicySpecDie) VariableDie added in v0.13.0

VariableDie mutates a single item in Variables matched by the nested field Name, appending a new item if no match is found.

Variables contain definitions of variables that can be used in composition of other expressions.

Each variable is defined as a named CEL expression.

The variables defined here will be available under `variables` in other expressions of the policy

except MatchConditions because MatchConditions are evaluated before the rest of the policy.

The expression of a variable can refer to other variables defined earlier in the list but not those after.

Thus, Variables must be sorted by the order of first appearance and acyclic.

func (*ValidatingAdmissionPolicySpecDie) Variables added in v0.13.0

Variables contain definitions of variables that can be used in composition of other expressions.

Each variable is defined as a named CEL expression.

The variables defined here will be available under `variables` in other expressions of the policy

except MatchConditions because MatchConditions are evaluated before the rest of the policy.

The expression of a variable can refer to other variables defined earlier in the list but not those after.

Thus, Variables must be sorted by the order of first appearance and acyclic.

func (*ValidatingAdmissionPolicySpecDie) VariablesDie added in v0.13.0

deprecated: use VariableDie instead

type ValidatingAdmissionPolicyStatusDie added in v0.13.0

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

func (*ValidatingAdmissionPolicyStatusDie) Conditions added in v0.13.0

The conditions represent the latest available observations of a policy's current state.

func (*ValidatingAdmissionPolicyStatusDie) ConditionsDie added in v0.13.0

ConditionsDie replaces Conditions by collecting the released value from each die passed.

The conditions represent the latest available observations of a policy's current state.

func (*ValidatingAdmissionPolicyStatusDie) DeepCopy added in v0.13.0

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*ValidatingAdmissionPolicyStatusDie) DieDiff added in v0.13.0

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*ValidatingAdmissionPolicyStatusDie) DieFeed added in v0.13.0

DieFeed returns a new die with the provided resource.

func (*ValidatingAdmissionPolicyStatusDie) DieFeedJSON added in v0.13.0

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*ValidatingAdmissionPolicyStatusDie) DieFeedPtr added in v0.13.0

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*ValidatingAdmissionPolicyStatusDie) DieFeedRawExtension added in v0.13.0

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ValidatingAdmissionPolicyStatusDie) DieFeedYAML added in v0.13.0

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*ValidatingAdmissionPolicyStatusDie) DieFeedYAMLFile added in v0.13.0

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*ValidatingAdmissionPolicyStatusDie) DieImmutable added in v0.13.0

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*ValidatingAdmissionPolicyStatusDie) DiePatch added in v0.13.0

func (d *ValidatingAdmissionPolicyStatusDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*ValidatingAdmissionPolicyStatusDie) DieRelease added in v0.13.0

DieRelease returns the resource managed by the die.

func (*ValidatingAdmissionPolicyStatusDie) DieReleaseJSON added in v0.13.0

func (d *ValidatingAdmissionPolicyStatusDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*ValidatingAdmissionPolicyStatusDie) DieReleasePtr added in v0.13.0

DieReleasePtr returns a pointer to the resource managed by the die.

func (*ValidatingAdmissionPolicyStatusDie) DieReleaseRawExtension added in v0.13.0

func (d *ValidatingAdmissionPolicyStatusDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ValidatingAdmissionPolicyStatusDie) DieReleaseYAML added in v0.13.0

func (d *ValidatingAdmissionPolicyStatusDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*ValidatingAdmissionPolicyStatusDie) DieSeal added in v0.13.0

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*ValidatingAdmissionPolicyStatusDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*ValidatingAdmissionPolicyStatusDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*ValidatingAdmissionPolicyStatusDie) DieSealRelease added in v0.13.0

DieSealRelease returns the sealed resource managed by the die.

func (*ValidatingAdmissionPolicyStatusDie) DieSealReleasePtr added in v0.13.0

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*ValidatingAdmissionPolicyStatusDie) DieStamp added in v0.13.0

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*ValidatingAdmissionPolicyStatusDie) DieStampAt added in v0.13.0

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*ValidatingAdmissionPolicyStatusDie) DieWith added in v0.13.0

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*ValidatingAdmissionPolicyStatusDie) ObservedGeneration added in v0.13.0

The generation observed by the controller.

func (*ValidatingAdmissionPolicyStatusDie) TypeChecking added in v0.13.0

The results of type checking for each expression.

Presence of this field indicates the completion of the type checking.

func (*ValidatingAdmissionPolicyStatusDie) TypeCheckingDie added in v0.13.0

TypeCheckingDie mutates TypeChecking as a die.

The results of type checking for each expression.

Presence of this field indicates the completion of the type checking.

type ValidatingWebhookConfigurationDie

type ValidatingWebhookConfigurationDie struct {
	metav1.FrozenObjectMeta
	// contains filtered or unexported fields
}

func (*ValidatingWebhookConfigurationDie) APIVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

func (*ValidatingWebhookConfigurationDie) DeepCopy

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*ValidatingWebhookConfigurationDie) DeepCopyObject

func (d *ValidatingWebhookConfigurationDie) DeepCopyObject() runtime.Object

func (*ValidatingWebhookConfigurationDie) DieDefaultTypeMetadata added in v0.13.0

DieDefaultTypeMetadata sets the APIVersion and Kind to "admissionregistration.k8s.io/v1" and "ValidatingWebhookConfiguration" respectively.

func (*ValidatingWebhookConfigurationDie) DieDiff added in v0.13.0

func (d *ValidatingWebhookConfigurationDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*ValidatingWebhookConfigurationDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*ValidatingWebhookConfigurationDie) DieFeedJSON

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*ValidatingWebhookConfigurationDie) DieFeedPtr

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*ValidatingWebhookConfigurationDie) DieFeedRawExtension

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ValidatingWebhookConfigurationDie) DieFeedYAML

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*ValidatingWebhookConfigurationDie) DieFeedYAMLFile

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*ValidatingWebhookConfigurationDie) DieImmutable

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*ValidatingWebhookConfigurationDie) DiePatch added in v0.13.0

func (d *ValidatingWebhookConfigurationDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*ValidatingWebhookConfigurationDie) DieRelease

DieRelease returns the resource managed by the die.

func (*ValidatingWebhookConfigurationDie) DieReleaseJSON

func (d *ValidatingWebhookConfigurationDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*ValidatingWebhookConfigurationDie) DieReleasePtr

DieReleasePtr returns a pointer to the resource managed by the die.

func (*ValidatingWebhookConfigurationDie) DieReleaseRawExtension

func (d *ValidatingWebhookConfigurationDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ValidatingWebhookConfigurationDie) DieReleaseUnstructured

func (d *ValidatingWebhookConfigurationDie) DieReleaseUnstructured() *unstructured.Unstructured

DieReleaseUnstructured returns the resource managed by the die as an unstructured object. Panics on error.

func (*ValidatingWebhookConfigurationDie) DieReleaseYAML

func (d *ValidatingWebhookConfigurationDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*ValidatingWebhookConfigurationDie) DieSeal added in v0.13.0

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*ValidatingWebhookConfigurationDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*ValidatingWebhookConfigurationDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*ValidatingWebhookConfigurationDie) DieSealRelease added in v0.13.0

DieSealRelease returns the sealed resource managed by the die.

func (*ValidatingWebhookConfigurationDie) DieSealReleasePtr added in v0.13.0

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*ValidatingWebhookConfigurationDie) DieStamp

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*ValidatingWebhookConfigurationDie) DieStampAt

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*ValidatingWebhookConfigurationDie) DieWith

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*ValidatingWebhookConfigurationDie) GetObjectKind

func (*ValidatingWebhookConfigurationDie) Kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

func (*ValidatingWebhookConfigurationDie) MarshalJSON

func (d *ValidatingWebhookConfigurationDie) MarshalJSON() ([]byte, error)

func (*ValidatingWebhookConfigurationDie) Metadata added in v0.13.0

Metadata standard object's metadata.

func (*ValidatingWebhookConfigurationDie) MetadataDie

MetadataDie stamps the resource's ObjectMeta field with a mutable die.

func (*ValidatingWebhookConfigurationDie) TypeMetadata added in v0.13.0

TypeMetadata standard object's type metadata.

func (*ValidatingWebhookConfigurationDie) TypeMetadataDie added in v0.13.0

TypeMetadataDie stamps the resource's TypeMeta field with a mutable die.

func (*ValidatingWebhookConfigurationDie) UnmarshalJSON

func (d *ValidatingWebhookConfigurationDie) UnmarshalJSON(b []byte) error

func (*ValidatingWebhookConfigurationDie) WebhookDie

WebhookDie mutates a single item in Webhooks matched by the nested field Name, appending a new item if no match is found.

Webhooks is a list of webhooks and the affected resources and operations.

func (*ValidatingWebhookConfigurationDie) Webhooks

Webhooks is a list of webhooks and the affected resources and operations.

type ValidatingWebhookDie

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

func (*ValidatingWebhookDie) AdmissionReviewVersions

func (d *ValidatingWebhookDie) AdmissionReviewVersions(v ...string) *ValidatingWebhookDie

AdmissionReviewVersions is an ordered list of preferred `AdmissionReview`

versions the Webhook expects. API server will try to use first version in

the list which it supports. If none of the versions specified in this list

supported by API server, validation will fail for this object.

If a persisted webhook configuration specifies allowed versions and does not

include any versions known to the API Server, calls to the webhook will fail

and be subject to the failure policy.

func (*ValidatingWebhookDie) ClientConfig

ClientConfig defines how to communicate with the hook.

Required

func (*ValidatingWebhookDie) ClientConfigDie

func (d *ValidatingWebhookDie) ClientConfigDie(fn func(d *WebhookClientConfigDie)) *ValidatingWebhookDie

ClientConfigDie mutates ClientConfig as a die.

ClientConfig defines how to communicate with the hook.

Required

func (*ValidatingWebhookDie) DeepCopy

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*ValidatingWebhookDie) DieDiff added in v0.13.0

func (d *ValidatingWebhookDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*ValidatingWebhookDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*ValidatingWebhookDie) DieFeedJSON

func (d *ValidatingWebhookDie) DieFeedJSON(j []byte) *ValidatingWebhookDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*ValidatingWebhookDie) DieFeedPtr

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*ValidatingWebhookDie) DieFeedRawExtension

func (d *ValidatingWebhookDie) DieFeedRawExtension(raw runtime.RawExtension) *ValidatingWebhookDie

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ValidatingWebhookDie) DieFeedYAML

func (d *ValidatingWebhookDie) DieFeedYAML(y []byte) *ValidatingWebhookDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*ValidatingWebhookDie) DieFeedYAMLFile

func (d *ValidatingWebhookDie) DieFeedYAMLFile(name string) *ValidatingWebhookDie

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*ValidatingWebhookDie) DieImmutable

func (d *ValidatingWebhookDie) DieImmutable(immutable bool) *ValidatingWebhookDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*ValidatingWebhookDie) DiePatch added in v0.13.0

func (d *ValidatingWebhookDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*ValidatingWebhookDie) DieRelease

DieRelease returns the resource managed by the die.

func (*ValidatingWebhookDie) DieReleaseJSON

func (d *ValidatingWebhookDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*ValidatingWebhookDie) DieReleasePtr

DieReleasePtr returns a pointer to the resource managed by the die.

func (*ValidatingWebhookDie) DieReleaseRawExtension

func (d *ValidatingWebhookDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ValidatingWebhookDie) DieReleaseYAML

func (d *ValidatingWebhookDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*ValidatingWebhookDie) DieSeal added in v0.13.0

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*ValidatingWebhookDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*ValidatingWebhookDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*ValidatingWebhookDie) DieSealRelease added in v0.13.0

DieSealRelease returns the sealed resource managed by the die.

func (*ValidatingWebhookDie) DieSealReleasePtr added in v0.13.0

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*ValidatingWebhookDie) DieStamp

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*ValidatingWebhookDie) DieStampAt

func (d *ValidatingWebhookDie) DieStampAt(jp string, fn interface{}) *ValidatingWebhookDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*ValidatingWebhookDie) DieWith

func (d *ValidatingWebhookDie) DieWith(fns ...func(d *ValidatingWebhookDie)) *ValidatingWebhookDie

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*ValidatingWebhookDie) FailurePolicy

FailurePolicy defines how unrecognized errors from the admission endpoint are handled -

allowed values are Ignore or Fail. Defaults to Fail.

func (*ValidatingWebhookDie) MatchConditionDie

func (d *ValidatingWebhookDie) MatchConditionDie(v string, fn func(d *MatchConditionDie)) *ValidatingWebhookDie

MatchConditionDie mutates a single item in MatchConditions matched by the nested field Name, appending a new item if no match is found.

MatchConditions is a list of conditions that must be met for a request to be sent to this

webhook. Match conditions filter requests that have already been matched by the rules,

namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.

There are a maximum of 64 match conditions allowed.

The exact matching logic is (in order):

1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.

2. If ALL matchConditions evaluate to TRUE, the webhook is called.

3. If any matchCondition evaluates to an error (but none are FALSE):

- If failurePolicy=Fail, reject the request

- If failurePolicy=Ignore, the error is ignored and the webhook is skipped

func (*ValidatingWebhookDie) MatchConditions

MatchConditions is a list of conditions that must be met for a request to be sent to this

webhook. Match conditions filter requests that have already been matched by the rules,

namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.

There are a maximum of 64 match conditions allowed.

The exact matching logic is (in order):

1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.

2. If ALL matchConditions evaluate to TRUE, the webhook is called.

3. If any matchCondition evaluates to an error (but none are FALSE):

- If failurePolicy=Fail, reject the request

- If failurePolicy=Ignore, the error is ignored and the webhook is skipped

func (*ValidatingWebhookDie) MatchPolicy

matchPolicy defines how the "rules" list is used to match incoming requests.

Allowed values are "Exact" or "Equivalent".

- Exact: match a request only if it exactly matches a specified rule.

For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1,

but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,

a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.

- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version.

For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1,

and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,

a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.

Defaults to "Equivalent"

func (*ValidatingWebhookDie) Name

The name of the admission webhook.

Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where

"imagepolicy" is the name of the webhook, and kubernetes.io is the name

of the organization.

Required.

func (*ValidatingWebhookDie) NamespaceSelector

NamespaceSelector decides whether to run the webhook on an object based

on whether the namespace for that object matches the selector. If the

object itself is a namespace, the matching is performed on

object.metadata.labels. If the object is another cluster scoped resource,

it never skips the webhook.

For example, to run the webhook on any objects whose namespace is not

associated with "runlevel" of "0" or "1"; you will set the selector as

follows:

"namespaceSelector": {

"matchExpressions": [

{

"key": "runlevel",

"operator": "NotIn",

"values": [

"0",

"1"

]

}

]

}

If instead you want to only run the webhook on any objects whose

namespace is associated with the "environment" of "prod" or "staging";

you will set the selector as follows:

"namespaceSelector": {

"matchExpressions": [

{

"key": "environment",

"operator": "In",

"values": [

"prod",

"staging"

]

}

]

}

See

https://kubernetes.io/docs/concepts/overview/working-with-objects/labels

for more examples of label selectors.

Default to the empty LabelSelector, which matches everything.

func (*ValidatingWebhookDie) NamespaceSelectorDie

func (d *ValidatingWebhookDie) NamespaceSelectorDie(fn func(d *metav1.LabelSelectorDie)) *ValidatingWebhookDie

NamespaceSelectorDie mutates NamespaceSelector as a die.

NamespaceSelector decides whether to run the webhook on an object based

on whether the namespace for that object matches the selector. If the

object itself is a namespace, the matching is performed on

object.metadata.labels. If the object is another cluster scoped resource,

it never skips the webhook.

For example, to run the webhook on any objects whose namespace is not

associated with "runlevel" of "0" or "1"; you will set the selector as

follows:

"namespaceSelector": {

"matchExpressions": [

{

"key": "runlevel",

"operator": "NotIn",

"values": [

"0",

"1"

]

}

]

}

If instead you want to only run the webhook on any objects whose

namespace is associated with the "environment" of "prod" or "staging";

you will set the selector as follows:

"namespaceSelector": {

"matchExpressions": [

{

"key": "environment",

"operator": "In",

"values": [

"prod",

"staging"

]

}

]

}

See

https://kubernetes.io/docs/concepts/overview/working-with-objects/labels

for more examples of label selectors.

Default to the empty LabelSelector, which matches everything.

func (*ValidatingWebhookDie) ObjectSelector

ObjectSelector decides whether to run the webhook based on if the

object has matching labels. objectSelector is evaluated against both

the oldObject and newObject that would be sent to the webhook, and

is considered to match if either object matches the selector. A null

object (oldObject in the case of create, or newObject in the case of

delete) or an object that cannot have labels (like a

DeploymentRollback or a PodProxyOptions object) is not considered to

match.

Use the object selector only if the webhook is opt-in, because end

users may skip the admission webhook by setting the labels.

Default to the empty LabelSelector, which matches everything.

func (*ValidatingWebhookDie) ObjectSelectorDie

func (d *ValidatingWebhookDie) ObjectSelectorDie(fn func(d *metav1.LabelSelectorDie)) *ValidatingWebhookDie

ObjectSelectorDie mutates ObjectSelector as a die.

ObjectSelector decides whether to run the webhook based on if the

object has matching labels. objectSelector is evaluated against both

the oldObject and newObject that would be sent to the webhook, and

is considered to match if either object matches the selector. A null

object (oldObject in the case of create, or newObject in the case of

delete) or an object that cannot have labels (like a

DeploymentRollback or a PodProxyOptions object) is not considered to

match.

Use the object selector only if the webhook is opt-in, because end

users may skip the admission webhook by setting the labels.

Default to the empty LabelSelector, which matches everything.

func (*ValidatingWebhookDie) Rules

Rules describes what operations on what resources/subresources the webhook cares about.

The webhook cares about an operation if it matches _any_ Rule.

However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks

from putting the cluster in a state which cannot be recovered from without completely

disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called

on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.

func (*ValidatingWebhookDie) RulesDie

RulesDie replaces Rules by collecting the released value from each die passed.

Rules describes what operations on what resources/subresources the webhook cares about.

The webhook cares about an operation if it matches _any_ Rule.

However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks

from putting the cluster in a state which cannot be recovered from without completely

disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called

on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.

func (*ValidatingWebhookDie) SideEffects

SideEffects states whether this webhook has side effects.

Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown).

Webhooks with side effects MUST implement a reconciliation system, since a request may be

rejected by a future step in the admission chain and the side effects therefore need to be undone.

Requests with the dryRun attribute will be auto-rejected if they match a webhook with

sideEffects == Unknown or Some.

func (*ValidatingWebhookDie) TimeoutSeconds

func (d *ValidatingWebhookDie) TimeoutSeconds(v *int32) *ValidatingWebhookDie

TimeoutSeconds specifies the timeout for this webhook. After the timeout passes,

the webhook call will be ignored or the API call will fail based on the

failure policy.

The timeout value must be between 1 and 30 seconds.

Default to 10 seconds.

type ValidationDie added in v0.13.0

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

func (*ValidationDie) DeepCopy added in v0.13.0

func (d *ValidationDie) DeepCopy() *ValidationDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*ValidationDie) DieDiff added in v0.13.0

func (d *ValidationDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*ValidationDie) DieFeed added in v0.13.0

DieFeed returns a new die with the provided resource.

func (*ValidationDie) DieFeedJSON added in v0.13.0

func (d *ValidationDie) DieFeedJSON(j []byte) *ValidationDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*ValidationDie) DieFeedPtr added in v0.13.0

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*ValidationDie) DieFeedRawExtension added in v0.13.0

func (d *ValidationDie) DieFeedRawExtension(raw runtime.RawExtension) *ValidationDie

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ValidationDie) DieFeedYAML added in v0.13.0

func (d *ValidationDie) DieFeedYAML(y []byte) *ValidationDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*ValidationDie) DieFeedYAMLFile added in v0.13.0

func (d *ValidationDie) DieFeedYAMLFile(name string) *ValidationDie

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*ValidationDie) DieImmutable added in v0.13.0

func (d *ValidationDie) DieImmutable(immutable bool) *ValidationDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*ValidationDie) DiePatch added in v0.13.0

func (d *ValidationDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*ValidationDie) DieRelease added in v0.13.0

DieRelease returns the resource managed by the die.

func (*ValidationDie) DieReleaseJSON added in v0.13.0

func (d *ValidationDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*ValidationDie) DieReleasePtr added in v0.13.0

func (d *ValidationDie) DieReleasePtr() *admissionregistrationv1.Validation

DieReleasePtr returns a pointer to the resource managed by the die.

func (*ValidationDie) DieReleaseRawExtension added in v0.13.0

func (d *ValidationDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*ValidationDie) DieReleaseYAML added in v0.13.0

func (d *ValidationDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*ValidationDie) DieSeal added in v0.13.0

func (d *ValidationDie) DieSeal() *ValidationDie

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*ValidationDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*ValidationDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*ValidationDie) DieSealRelease added in v0.13.0

func (d *ValidationDie) DieSealRelease() admissionregistrationv1.Validation

DieSealRelease returns the sealed resource managed by the die.

func (*ValidationDie) DieSealReleasePtr added in v0.13.0

func (d *ValidationDie) DieSealReleasePtr() *admissionregistrationv1.Validation

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*ValidationDie) DieStamp added in v0.13.0

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*ValidationDie) DieStampAt added in v0.13.0

func (d *ValidationDie) DieStampAt(jp string, fn interface{}) *ValidationDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*ValidationDie) DieWith added in v0.13.0

func (d *ValidationDie) DieWith(fns ...func(d *ValidationDie)) *ValidationDie

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*ValidationDie) Expression added in v0.13.0

func (d *ValidationDie) Expression(v string) *ValidationDie

Expression represents the expression which will be evaluated by CEL.

ref: https://github.com/google/cel-spec

CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:

- 'object' - The object from the incoming request. The value is null for DELETE requests.

- 'oldObject' - The existing object. The value is null for CREATE requests.

- 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).

- 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind.

- 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources.

- 'variables' - Map of composited variables, from its name to its lazily evaluated value.

For example, a variable named 'foo' can be accessed as 'variables.foo'.

- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.

See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz

- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the

request resource.

The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the

object. No other metadata properties are accessible.

Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.

Accessible property names are escaped according to the following rules when accessed in the expression:

- '__' escapes to '__underscores__'

- '.' escapes to '__dot__'

- '-' escapes to '__dash__'

- '/' escapes to '__slash__'

- Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:

"true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if",

"import", "let", "loop", "package", "namespace", "return".

Examples:

- Expression accessing a property named "namespace": {"Expression": "object.__namespace__ > 0"}

- Expression accessing a property named "x-prop": {"Expression": "object.x__dash__prop > 0"}

- Expression accessing a property named "redact__d": {"Expression": "object.redact__underscores__d > 0"}

Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1].

Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:

- 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and

non-intersecting elements in `Y` are appended, retaining their partial order.

- 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values

are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with

non-intersecting keys are appended, retaining their partial order.

Required.

func (*ValidationDie) Message added in v0.13.0

func (d *ValidationDie) Message(v string) *ValidationDie

Message represents the message displayed when validation fails. The message is required if the Expression contains

line breaks. The message must not contain line breaks.

If unset, the message is "failed rule: {Rule}".

e.g. "must be a URL with the host matching spec.host"

If the Expression contains line breaks. Message is required.

The message must not contain line breaks.

If unset, the message is "failed Expression: {Expression}".

func (*ValidationDie) MessageExpression added in v0.13.0

func (d *ValidationDie) MessageExpression(v string) *ValidationDie

messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.

Since messageExpression is used as a failure message, it must evaluate to a string.

If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails.

If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced

as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string

that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and

the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged.

messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'.

Example:

"object.x must be less than max ("+string(params.max)+")"

func (*ValidationDie) Reason added in v0.13.0

Reason represents a machine-readable description of why this validation failed.

If this is the first validation in the list to fail, this reason, as well as the

corresponding HTTP response code, are used in the

HTTP response to the client.

The currently supported reasons are: "Unauthorized", "Forbidden", "Invalid", "RequestEntityTooLarge".

If not set, StatusReasonInvalid is used in the response to the client.

type VariableDie added in v0.13.0

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

func (*VariableDie) DeepCopy added in v0.13.0

func (d *VariableDie) DeepCopy() *VariableDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*VariableDie) DieDiff added in v0.13.0

func (d *VariableDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*VariableDie) DieFeed added in v0.13.0

DieFeed returns a new die with the provided resource.

func (*VariableDie) DieFeedJSON added in v0.13.0

func (d *VariableDie) DieFeedJSON(j []byte) *VariableDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*VariableDie) DieFeedPtr added in v0.13.0

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*VariableDie) DieFeedRawExtension added in v0.13.0

func (d *VariableDie) DieFeedRawExtension(raw runtime.RawExtension) *VariableDie

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*VariableDie) DieFeedYAML added in v0.13.0

func (d *VariableDie) DieFeedYAML(y []byte) *VariableDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*VariableDie) DieFeedYAMLFile added in v0.13.0

func (d *VariableDie) DieFeedYAMLFile(name string) *VariableDie

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*VariableDie) DieImmutable added in v0.13.0

func (d *VariableDie) DieImmutable(immutable bool) *VariableDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*VariableDie) DiePatch added in v0.13.0

func (d *VariableDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*VariableDie) DieRelease added in v0.13.0

DieRelease returns the resource managed by the die.

func (*VariableDie) DieReleaseJSON added in v0.13.0

func (d *VariableDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*VariableDie) DieReleasePtr added in v0.13.0

func (d *VariableDie) DieReleasePtr() *admissionregistrationv1.Variable

DieReleasePtr returns a pointer to the resource managed by the die.

func (*VariableDie) DieReleaseRawExtension added in v0.13.0

func (d *VariableDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*VariableDie) DieReleaseYAML added in v0.13.0

func (d *VariableDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*VariableDie) DieSeal added in v0.13.0

func (d *VariableDie) DieSeal() *VariableDie

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*VariableDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*VariableDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*VariableDie) DieSealRelease added in v0.13.0

func (d *VariableDie) DieSealRelease() admissionregistrationv1.Variable

DieSealRelease returns the sealed resource managed by the die.

func (*VariableDie) DieSealReleasePtr added in v0.13.0

func (d *VariableDie) DieSealReleasePtr() *admissionregistrationv1.Variable

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*VariableDie) DieStamp added in v0.13.0

func (d *VariableDie) DieStamp(fn func(r *admissionregistrationv1.Variable)) *VariableDie

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*VariableDie) DieStampAt added in v0.13.0

func (d *VariableDie) DieStampAt(jp string, fn interface{}) *VariableDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*VariableDie) DieWith added in v0.13.0

func (d *VariableDie) DieWith(fns ...func(d *VariableDie)) *VariableDie

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*VariableDie) Expression added in v0.13.0

func (d *VariableDie) Expression(v string) *VariableDie

Expression is the expression that will be evaluated as the value of the variable.

The CEL expression has access to the same identifiers as the CEL expressions in Validation.

func (*VariableDie) Name added in v0.13.0

func (d *VariableDie) Name(v string) *VariableDie

Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.

The variable can be accessed in other expressions through `variables`

For example, if name is "foo", the variable will be available as `variables.foo`

type WebhookClientConfigDie

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

func (*WebhookClientConfigDie) CABundle

`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.

If unspecified, system trust roots on the apiserver are used.

func (*WebhookClientConfigDie) DeepCopy

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*WebhookClientConfigDie) DieDiff added in v0.13.0

func (d *WebhookClientConfigDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*WebhookClientConfigDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*WebhookClientConfigDie) DieFeedJSON

func (d *WebhookClientConfigDie) DieFeedJSON(j []byte) *WebhookClientConfigDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*WebhookClientConfigDie) DieFeedPtr

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*WebhookClientConfigDie) DieFeedRawExtension

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*WebhookClientConfigDie) DieFeedYAML

func (d *WebhookClientConfigDie) DieFeedYAML(y []byte) *WebhookClientConfigDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*WebhookClientConfigDie) DieFeedYAMLFile

func (d *WebhookClientConfigDie) DieFeedYAMLFile(name string) *WebhookClientConfigDie

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*WebhookClientConfigDie) DieImmutable

func (d *WebhookClientConfigDie) DieImmutable(immutable bool) *WebhookClientConfigDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*WebhookClientConfigDie) DiePatch added in v0.13.0

func (d *WebhookClientConfigDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*WebhookClientConfigDie) DieRelease

DieRelease returns the resource managed by the die.

func (*WebhookClientConfigDie) DieReleaseJSON

func (d *WebhookClientConfigDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*WebhookClientConfigDie) DieReleasePtr

DieReleasePtr returns a pointer to the resource managed by the die.

func (*WebhookClientConfigDie) DieReleaseRawExtension

func (d *WebhookClientConfigDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*WebhookClientConfigDie) DieReleaseYAML

func (d *WebhookClientConfigDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*WebhookClientConfigDie) DieSeal added in v0.13.0

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*WebhookClientConfigDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*WebhookClientConfigDie) DieSealFeedPtr added in v0.13.0

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*WebhookClientConfigDie) DieSealRelease added in v0.13.0

DieSealRelease returns the sealed resource managed by the die.

func (*WebhookClientConfigDie) DieSealReleasePtr added in v0.13.0

DieSealReleasePtr returns the sealed resource pointer managed by the die.

func (*WebhookClientConfigDie) DieStamp

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*WebhookClientConfigDie) DieStampAt

func (d *WebhookClientConfigDie) DieStampAt(jp string, fn interface{}) *WebhookClientConfigDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*WebhookClientConfigDie) DieWith

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*WebhookClientConfigDie) Service

`service` is a reference to the service for this webhook. Either

`service` or `url` must be specified.

If the webhook is running within the cluster, then you should use `service`.

func (*WebhookClientConfigDie) ServiceDie

ServiceDie mutates Service as a die.

`service` is a reference to the service for this webhook. Either

`service` or `url` must be specified.

If the webhook is running within the cluster, then you should use `service`.

func (*WebhookClientConfigDie) URL

`url` gives the location of the webhook, in standard URL form

(`scheme://host:port/path`). Exactly one of `url` or `service`

must be specified.

The `host` should not refer to a service running in the cluster; use

the `service` field instead. The host might be resolved via external

DNS in some apiservers (e.g., `kube-apiserver` cannot resolve

in-cluster DNS as that would be a layering violation). `host` may

also be an IP address.

Please note that using `localhost` or `127.0.0.1` as a `host` is

risky unless you take great care to run this webhook on all hosts

which run an apiserver which might need to make calls to this

webhook. Such installs are likely to be non-portable, i.e., not easy

to turn up in a new cluster.

The scheme must be "https"; the URL must begin with "https://".

A path is optional, and if present may be any string permissible in

a URL. You may use the path to pass an arbitrary string to the

webhook, for example, a cluster identifier.

Attempting to use a user or basic auth e.g. "user:password@" is not

allowed. Fragments ("#...") and query parameters ("?...") are not

allowed, either.

Jump to

Keyboard shortcuts

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