package v1alpha1
import "k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1"
Index ¶
- type ApplyConfigurationApplyConfiguration
- func ApplyConfiguration() *ApplyConfigurationApplyConfiguration
- func (b *ApplyConfigurationApplyConfiguration) WithExpression(value string) *ApplyConfigurationApplyConfiguration
- type AuditAnnotationApplyConfiguration
- func AuditAnnotation() *AuditAnnotationApplyConfiguration
- func (b *AuditAnnotationApplyConfiguration) WithKey(value string) *AuditAnnotationApplyConfiguration
- func (b *AuditAnnotationApplyConfiguration) WithValueExpression(value string) *AuditAnnotationApplyConfiguration
- type ExpressionWarningApplyConfiguration
- func ExpressionWarning() *ExpressionWarningApplyConfiguration
- func (b *ExpressionWarningApplyConfiguration) WithFieldRef(value string) *ExpressionWarningApplyConfiguration
- func (b *ExpressionWarningApplyConfiguration) WithWarning(value string) *ExpressionWarningApplyConfiguration
- type JSONPatchApplyConfiguration
- func JSONPatch() *JSONPatchApplyConfiguration
- func (b *JSONPatchApplyConfiguration) WithExpression(value string) *JSONPatchApplyConfiguration
- type MatchConditionApplyConfiguration
- func MatchCondition() *MatchConditionApplyConfiguration
- func (b *MatchConditionApplyConfiguration) WithExpression(value string) *MatchConditionApplyConfiguration
- func (b *MatchConditionApplyConfiguration) WithName(value string) *MatchConditionApplyConfiguration
- type MatchResourcesApplyConfiguration
- func MatchResources() *MatchResourcesApplyConfiguration
- func (b *MatchResourcesApplyConfiguration) WithExcludeResourceRules(values ...*NamedRuleWithOperationsApplyConfiguration) *MatchResourcesApplyConfiguration
- func (b *MatchResourcesApplyConfiguration) WithMatchPolicy(value admissionregistrationv1alpha1.MatchPolicyType) *MatchResourcesApplyConfiguration
- func (b *MatchResourcesApplyConfiguration) WithNamespaceSelector(value *v1.LabelSelectorApplyConfiguration) *MatchResourcesApplyConfiguration
- func (b *MatchResourcesApplyConfiguration) WithObjectSelector(value *v1.LabelSelectorApplyConfiguration) *MatchResourcesApplyConfiguration
- func (b *MatchResourcesApplyConfiguration) WithResourceRules(values ...*NamedRuleWithOperationsApplyConfiguration) *MatchResourcesApplyConfiguration
- type MutatingAdmissionPolicyApplyConfiguration
- func ExtractMutatingAdmissionPolicy(mutatingAdmissionPolicy *admissionregistrationv1alpha1.MutatingAdmissionPolicy, fieldManager string) (*MutatingAdmissionPolicyApplyConfiguration, error)
- func ExtractMutatingAdmissionPolicyFrom(mutatingAdmissionPolicy *admissionregistrationv1alpha1.MutatingAdmissionPolicy, fieldManager string, subresource string) (*MutatingAdmissionPolicyApplyConfiguration, error)
- func MutatingAdmissionPolicy(name string) *MutatingAdmissionPolicyApplyConfiguration
- func (b *MutatingAdmissionPolicyApplyConfiguration) GetAPIVersion() *string
- func (b *MutatingAdmissionPolicyApplyConfiguration) GetKind() *string
- func (b *MutatingAdmissionPolicyApplyConfiguration) GetName() *string
- func (b *MutatingAdmissionPolicyApplyConfiguration) GetNamespace() *string
- func (b MutatingAdmissionPolicyApplyConfiguration) IsApplyConfiguration()
- func (b *MutatingAdmissionPolicyApplyConfiguration) WithAPIVersion(value string) *MutatingAdmissionPolicyApplyConfiguration
- func (b *MutatingAdmissionPolicyApplyConfiguration) WithAnnotations(entries map[string]string) *MutatingAdmissionPolicyApplyConfiguration
- func (b *MutatingAdmissionPolicyApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MutatingAdmissionPolicyApplyConfiguration
- func (b *MutatingAdmissionPolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MutatingAdmissionPolicyApplyConfiguration
- func (b *MutatingAdmissionPolicyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MutatingAdmissionPolicyApplyConfiguration
- func (b *MutatingAdmissionPolicyApplyConfiguration) WithFinalizers(values ...string) *MutatingAdmissionPolicyApplyConfiguration
- func (b *MutatingAdmissionPolicyApplyConfiguration) WithGenerateName(value string) *MutatingAdmissionPolicyApplyConfiguration
- func (b *MutatingAdmissionPolicyApplyConfiguration) WithGeneration(value int64) *MutatingAdmissionPolicyApplyConfiguration
- func (b *MutatingAdmissionPolicyApplyConfiguration) WithKind(value string) *MutatingAdmissionPolicyApplyConfiguration
- func (b *MutatingAdmissionPolicyApplyConfiguration) WithLabels(entries map[string]string) *MutatingAdmissionPolicyApplyConfiguration
- func (b *MutatingAdmissionPolicyApplyConfiguration) WithName(value string) *MutatingAdmissionPolicyApplyConfiguration
- func (b *MutatingAdmissionPolicyApplyConfiguration) WithNamespace(value string) *MutatingAdmissionPolicyApplyConfiguration
- func (b *MutatingAdmissionPolicyApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *MutatingAdmissionPolicyApplyConfiguration
- func (b *MutatingAdmissionPolicyApplyConfiguration) WithResourceVersion(value string) *MutatingAdmissionPolicyApplyConfiguration
- func (b *MutatingAdmissionPolicyApplyConfiguration) WithSpec(value *MutatingAdmissionPolicySpecApplyConfiguration) *MutatingAdmissionPolicyApplyConfiguration
- func (b *MutatingAdmissionPolicyApplyConfiguration) WithUID(value types.UID) *MutatingAdmissionPolicyApplyConfiguration
- type MutatingAdmissionPolicyBindingApplyConfiguration
- func ExtractMutatingAdmissionPolicyBinding(mutatingAdmissionPolicyBinding *admissionregistrationv1alpha1.MutatingAdmissionPolicyBinding, fieldManager string) (*MutatingAdmissionPolicyBindingApplyConfiguration, error)
- func ExtractMutatingAdmissionPolicyBindingFrom(mutatingAdmissionPolicyBinding *admissionregistrationv1alpha1.MutatingAdmissionPolicyBinding, fieldManager string, subresource string) (*MutatingAdmissionPolicyBindingApplyConfiguration, error)
- func MutatingAdmissionPolicyBinding(name string) *MutatingAdmissionPolicyBindingApplyConfiguration
- func (b *MutatingAdmissionPolicyBindingApplyConfiguration) GetAPIVersion() *string
- func (b *MutatingAdmissionPolicyBindingApplyConfiguration) GetKind() *string
- func (b *MutatingAdmissionPolicyBindingApplyConfiguration) GetName() *string
- func (b *MutatingAdmissionPolicyBindingApplyConfiguration) GetNamespace() *string
- func (b MutatingAdmissionPolicyBindingApplyConfiguration) IsApplyConfiguration()
- func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithAPIVersion(value string) *MutatingAdmissionPolicyBindingApplyConfiguration
- func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithAnnotations(entries map[string]string) *MutatingAdmissionPolicyBindingApplyConfiguration
- func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MutatingAdmissionPolicyBindingApplyConfiguration
- func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MutatingAdmissionPolicyBindingApplyConfiguration
- func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MutatingAdmissionPolicyBindingApplyConfiguration
- func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithFinalizers(values ...string) *MutatingAdmissionPolicyBindingApplyConfiguration
- func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithGenerateName(value string) *MutatingAdmissionPolicyBindingApplyConfiguration
- func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithGeneration(value int64) *MutatingAdmissionPolicyBindingApplyConfiguration
- func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithKind(value string) *MutatingAdmissionPolicyBindingApplyConfiguration
- func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithLabels(entries map[string]string) *MutatingAdmissionPolicyBindingApplyConfiguration
- func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithName(value string) *MutatingAdmissionPolicyBindingApplyConfiguration
- func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithNamespace(value string) *MutatingAdmissionPolicyBindingApplyConfiguration
- func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *MutatingAdmissionPolicyBindingApplyConfiguration
- func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithResourceVersion(value string) *MutatingAdmissionPolicyBindingApplyConfiguration
- func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithSpec(value *MutatingAdmissionPolicyBindingSpecApplyConfiguration) *MutatingAdmissionPolicyBindingApplyConfiguration
- func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithUID(value types.UID) *MutatingAdmissionPolicyBindingApplyConfiguration
- type MutatingAdmissionPolicyBindingSpecApplyConfiguration
- func MutatingAdmissionPolicyBindingSpec() *MutatingAdmissionPolicyBindingSpecApplyConfiguration
- func (b *MutatingAdmissionPolicyBindingSpecApplyConfiguration) WithMatchResources(value *MatchResourcesApplyConfiguration) *MutatingAdmissionPolicyBindingSpecApplyConfiguration
- func (b *MutatingAdmissionPolicyBindingSpecApplyConfiguration) WithParamRef(value *ParamRefApplyConfiguration) *MutatingAdmissionPolicyBindingSpecApplyConfiguration
- func (b *MutatingAdmissionPolicyBindingSpecApplyConfiguration) WithPolicyName(value string) *MutatingAdmissionPolicyBindingSpecApplyConfiguration
- type MutatingAdmissionPolicySpecApplyConfiguration
- func MutatingAdmissionPolicySpec() *MutatingAdmissionPolicySpecApplyConfiguration
- func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithFailurePolicy(value admissionregistrationv1alpha1.FailurePolicyType) *MutatingAdmissionPolicySpecApplyConfiguration
- func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithMatchConditions(values ...*MatchConditionApplyConfiguration) *MutatingAdmissionPolicySpecApplyConfiguration
- func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithMatchConstraints(value *MatchResourcesApplyConfiguration) *MutatingAdmissionPolicySpecApplyConfiguration
- func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithMutations(values ...*MutationApplyConfiguration) *MutatingAdmissionPolicySpecApplyConfiguration
- func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithParamKind(value *ParamKindApplyConfiguration) *MutatingAdmissionPolicySpecApplyConfiguration
- func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithReinvocationPolicy(value v1.ReinvocationPolicyType) *MutatingAdmissionPolicySpecApplyConfiguration
- func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithVariables(values ...*VariableApplyConfiguration) *MutatingAdmissionPolicySpecApplyConfiguration
- type MutationApplyConfiguration
- func Mutation() *MutationApplyConfiguration
- func (b *MutationApplyConfiguration) WithApplyConfiguration(value *ApplyConfigurationApplyConfiguration) *MutationApplyConfiguration
- func (b *MutationApplyConfiguration) WithJSONPatch(value *JSONPatchApplyConfiguration) *MutationApplyConfiguration
- func (b *MutationApplyConfiguration) WithPatchType(value admissionregistrationv1alpha1.PatchType) *MutationApplyConfiguration
- type NamedRuleWithOperationsApplyConfiguration
- func NamedRuleWithOperations() *NamedRuleWithOperationsApplyConfiguration
- func (b *NamedRuleWithOperationsApplyConfiguration) WithAPIGroups(values ...string) *NamedRuleWithOperationsApplyConfiguration
- func (b *NamedRuleWithOperationsApplyConfiguration) WithAPIVersions(values ...string) *NamedRuleWithOperationsApplyConfiguration
- func (b *NamedRuleWithOperationsApplyConfiguration) WithOperations(values ...admissionregistrationv1.OperationType) *NamedRuleWithOperationsApplyConfiguration
- func (b *NamedRuleWithOperationsApplyConfiguration) WithResourceNames(values ...string) *NamedRuleWithOperationsApplyConfiguration
- func (b *NamedRuleWithOperationsApplyConfiguration) WithResources(values ...string) *NamedRuleWithOperationsApplyConfiguration
- func (b *NamedRuleWithOperationsApplyConfiguration) WithScope(value admissionregistrationv1.ScopeType) *NamedRuleWithOperationsApplyConfiguration
- type ParamKindApplyConfiguration
- func ParamKind() *ParamKindApplyConfiguration
- func (b *ParamKindApplyConfiguration) WithAPIVersion(value string) *ParamKindApplyConfiguration
- func (b *ParamKindApplyConfiguration) WithKind(value string) *ParamKindApplyConfiguration
- type ParamRefApplyConfiguration
- func ParamRef() *ParamRefApplyConfiguration
- func (b *ParamRefApplyConfiguration) WithName(value string) *ParamRefApplyConfiguration
- func (b *ParamRefApplyConfiguration) WithNamespace(value string) *ParamRefApplyConfiguration
- func (b *ParamRefApplyConfiguration) WithParameterNotFoundAction(value admissionregistrationv1alpha1.ParameterNotFoundActionType) *ParamRefApplyConfiguration
- func (b *ParamRefApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *ParamRefApplyConfiguration
- type TypeCheckingApplyConfiguration
- func TypeChecking() *TypeCheckingApplyConfiguration
- func (b *TypeCheckingApplyConfiguration) WithExpressionWarnings(values ...*ExpressionWarningApplyConfiguration) *TypeCheckingApplyConfiguration
- type ValidatingAdmissionPolicyApplyConfiguration
- func ExtractValidatingAdmissionPolicy(validatingAdmissionPolicy *admissionregistrationv1alpha1.ValidatingAdmissionPolicy, fieldManager string) (*ValidatingAdmissionPolicyApplyConfiguration, error)
- func ExtractValidatingAdmissionPolicyFrom(validatingAdmissionPolicy *admissionregistrationv1alpha1.ValidatingAdmissionPolicy, fieldManager string, subresource string) (*ValidatingAdmissionPolicyApplyConfiguration, error)
- func ExtractValidatingAdmissionPolicyStatus(validatingAdmissionPolicy *admissionregistrationv1alpha1.ValidatingAdmissionPolicy, fieldManager string) (*ValidatingAdmissionPolicyApplyConfiguration, error)
- func ValidatingAdmissionPolicy(name string) *ValidatingAdmissionPolicyApplyConfiguration
- func (b *ValidatingAdmissionPolicyApplyConfiguration) GetAPIVersion() *string
- func (b *ValidatingAdmissionPolicyApplyConfiguration) GetKind() *string
- func (b *ValidatingAdmissionPolicyApplyConfiguration) GetName() *string
- func (b *ValidatingAdmissionPolicyApplyConfiguration) GetNamespace() *string
- func (b ValidatingAdmissionPolicyApplyConfiguration) IsApplyConfiguration()
- func (b *ValidatingAdmissionPolicyApplyConfiguration) WithAPIVersion(value string) *ValidatingAdmissionPolicyApplyConfiguration
- func (b *ValidatingAdmissionPolicyApplyConfiguration) WithAnnotations(entries map[string]string) *ValidatingAdmissionPolicyApplyConfiguration
- func (b *ValidatingAdmissionPolicyApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ValidatingAdmissionPolicyApplyConfiguration
- func (b *ValidatingAdmissionPolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ValidatingAdmissionPolicyApplyConfiguration
- func (b *ValidatingAdmissionPolicyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ValidatingAdmissionPolicyApplyConfiguration
- func (b *ValidatingAdmissionPolicyApplyConfiguration) WithFinalizers(values ...string) *ValidatingAdmissionPolicyApplyConfiguration
- func (b *ValidatingAdmissionPolicyApplyConfiguration) WithGenerateName(value string) *ValidatingAdmissionPolicyApplyConfiguration
- func (b *ValidatingAdmissionPolicyApplyConfiguration) WithGeneration(value int64) *ValidatingAdmissionPolicyApplyConfiguration
- func (b *ValidatingAdmissionPolicyApplyConfiguration) WithKind(value string) *ValidatingAdmissionPolicyApplyConfiguration
- func (b *ValidatingAdmissionPolicyApplyConfiguration) WithLabels(entries map[string]string) *ValidatingAdmissionPolicyApplyConfiguration
- func (b *ValidatingAdmissionPolicyApplyConfiguration) WithName(value string) *ValidatingAdmissionPolicyApplyConfiguration
- func (b *ValidatingAdmissionPolicyApplyConfiguration) WithNamespace(value string) *ValidatingAdmissionPolicyApplyConfiguration
- func (b *ValidatingAdmissionPolicyApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration
- func (b *ValidatingAdmissionPolicyApplyConfiguration) WithResourceVersion(value string) *ValidatingAdmissionPolicyApplyConfiguration
- func (b *ValidatingAdmissionPolicyApplyConfiguration) WithSpec(value *ValidatingAdmissionPolicySpecApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration
- func (b *ValidatingAdmissionPolicyApplyConfiguration) WithStatus(value *ValidatingAdmissionPolicyStatusApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration
- func (b *ValidatingAdmissionPolicyApplyConfiguration) WithUID(value types.UID) *ValidatingAdmissionPolicyApplyConfiguration
- type ValidatingAdmissionPolicyBindingApplyConfiguration
- func ExtractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *admissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error)
- func ExtractValidatingAdmissionPolicyBindingFrom(validatingAdmissionPolicyBinding *admissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding, fieldManager string, subresource string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error)
- func ValidatingAdmissionPolicyBinding(name string) *ValidatingAdmissionPolicyBindingApplyConfiguration
- func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) GetAPIVersion() *string
- func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) GetKind() *string
- func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) GetName() *string
- func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) GetNamespace() *string
- func (b ValidatingAdmissionPolicyBindingApplyConfiguration) IsApplyConfiguration()
- func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithAPIVersion(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration
- func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithAnnotations(entries map[string]string) *ValidatingAdmissionPolicyBindingApplyConfiguration
- func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ValidatingAdmissionPolicyBindingApplyConfiguration
- func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ValidatingAdmissionPolicyBindingApplyConfiguration
- func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ValidatingAdmissionPolicyBindingApplyConfiguration
- func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithFinalizers(values ...string) *ValidatingAdmissionPolicyBindingApplyConfiguration
- func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithGenerateName(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration
- func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithGeneration(value int64) *ValidatingAdmissionPolicyBindingApplyConfiguration
- func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithKind(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration
- func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithLabels(entries map[string]string) *ValidatingAdmissionPolicyBindingApplyConfiguration
- func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithName(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration
- func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithNamespace(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration
- func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ValidatingAdmissionPolicyBindingApplyConfiguration
- func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithResourceVersion(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration
- func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithSpec(value *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) *ValidatingAdmissionPolicyBindingApplyConfiguration
- func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithUID(value types.UID) *ValidatingAdmissionPolicyBindingApplyConfiguration
- type ValidatingAdmissionPolicyBindingSpecApplyConfiguration
- func ValidatingAdmissionPolicyBindingSpec() *ValidatingAdmissionPolicyBindingSpecApplyConfiguration
- func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithMatchResources(value *MatchResourcesApplyConfiguration) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration
- func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithParamRef(value *ParamRefApplyConfiguration) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration
- func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithPolicyName(value string) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration
- func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithValidationActions(values ...admissionregistrationv1alpha1.ValidationAction) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration
- type ValidatingAdmissionPolicySpecApplyConfiguration
- func ValidatingAdmissionPolicySpec() *ValidatingAdmissionPolicySpecApplyConfiguration
- func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithAuditAnnotations(values ...*AuditAnnotationApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration
- func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithFailurePolicy(value admissionregistrationv1alpha1.FailurePolicyType) *ValidatingAdmissionPolicySpecApplyConfiguration
- func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithMatchConditions(values ...*MatchConditionApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration
- func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithMatchConstraints(value *MatchResourcesApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration
- func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithParamKind(value *ParamKindApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration
- func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithValidations(values ...*ValidationApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration
- func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithVariables(values ...*VariableApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration
- type ValidatingAdmissionPolicyStatusApplyConfiguration
- func ValidatingAdmissionPolicyStatus() *ValidatingAdmissionPolicyStatusApplyConfiguration
- func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *ValidatingAdmissionPolicyStatusApplyConfiguration
- func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithObservedGeneration(value int64) *ValidatingAdmissionPolicyStatusApplyConfiguration
- func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithTypeChecking(value *TypeCheckingApplyConfiguration) *ValidatingAdmissionPolicyStatusApplyConfiguration
- type ValidationApplyConfiguration
- func Validation() *ValidationApplyConfiguration
- func (b *ValidationApplyConfiguration) WithExpression(value string) *ValidationApplyConfiguration
- func (b *ValidationApplyConfiguration) WithMessage(value string) *ValidationApplyConfiguration
- func (b *ValidationApplyConfiguration) WithMessageExpression(value string) *ValidationApplyConfiguration
- func (b *ValidationApplyConfiguration) WithReason(value v1.StatusReason) *ValidationApplyConfiguration
- type VariableApplyConfiguration
Types ¶
type ApplyConfigurationApplyConfiguration ¶
type ApplyConfigurationApplyConfiguration struct {
// expression will be evaluated by CEL to create an apply configuration.
// ref: https://github.com/google/cel-spec
//
// Apply configurations are declared in CEL using object initialization. For example, this CEL expression
// returns an apply configuration to set a single field:
//
// Object{
// spec: Object.spec{
// serviceAccountName: "example"
// }
// }
//
// Apply configurations may not modify atomic structs, maps or arrays due to the risk of accidental deletion of
// values not included in the apply configuration.
//
// CEL expressions have access to the object types needed to create apply configurations:
//
// - 'Object' - CEL type of the resource object.
// - 'Object.<fieldName>' - CEL type of object field (such as 'Object.spec')
// - 'Object.<fieldName1>.<fieldName2>...<fieldNameN>` - CEL type of nested field (such as 'Object.spec.containers')
//
// CEL expressions have access to the contents of the API request, 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.
// Required.
Expression *string `json:"expression,omitempty"`
}
ApplyConfigurationApplyConfiguration represents a declarative configuration of the ApplyConfiguration type for use with apply.
ApplyConfiguration defines the desired configuration values of an object.
func ApplyConfiguration ¶
func ApplyConfiguration() *ApplyConfigurationApplyConfiguration
ApplyConfigurationApplyConfiguration constructs a declarative configuration of the ApplyConfiguration type for use with apply.
func (*ApplyConfigurationApplyConfiguration) WithExpression ¶
func (b *ApplyConfigurationApplyConfiguration) WithExpression(value string) *ApplyConfigurationApplyConfiguration
WithExpression sets the Expression field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Expression field is set to the value of the last call.
type AuditAnnotationApplyConfiguration ¶
type AuditAnnotationApplyConfiguration struct {
// 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.
Key *string `json:"key,omitempty"`
// 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.
ValueExpression *string `json:"valueExpression,omitempty"`
}
AuditAnnotationApplyConfiguration represents a declarative configuration of the AuditAnnotation type for use with apply.
AuditAnnotation describes how to produce an audit annotation for an API request.
func AuditAnnotation ¶
func AuditAnnotation() *AuditAnnotationApplyConfiguration
AuditAnnotationApplyConfiguration constructs a declarative configuration of the AuditAnnotation type for use with apply.
func (*AuditAnnotationApplyConfiguration) WithKey ¶
func (b *AuditAnnotationApplyConfiguration) WithKey(value string) *AuditAnnotationApplyConfiguration
WithKey sets the Key field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Key field is set to the value of the last call.
func (*AuditAnnotationApplyConfiguration) WithValueExpression ¶
func (b *AuditAnnotationApplyConfiguration) WithValueExpression(value string) *AuditAnnotationApplyConfiguration
WithValueExpression sets the ValueExpression field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ValueExpression field is set to the value of the last call.
type ExpressionWarningApplyConfiguration ¶
type ExpressionWarningApplyConfiguration struct {
// fieldRef is the path to the field that refers to the expression.
// For example, the reference to the expression of the first item of
// validations is "spec.validations[0].expression"
FieldRef *string `json:"fieldRef,omitempty"`
// warning contains 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.
Warning *string `json:"warning,omitempty"`
}
ExpressionWarningApplyConfiguration represents a declarative configuration of the ExpressionWarning type for use with apply.
ExpressionWarning is a warning information that targets a specific expression.
func ExpressionWarning ¶
func ExpressionWarning() *ExpressionWarningApplyConfiguration
ExpressionWarningApplyConfiguration constructs a declarative configuration of the ExpressionWarning type for use with apply.
func (*ExpressionWarningApplyConfiguration) WithFieldRef ¶
func (b *ExpressionWarningApplyConfiguration) WithFieldRef(value string) *ExpressionWarningApplyConfiguration
WithFieldRef sets the FieldRef field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the FieldRef field is set to the value of the last call.
func (*ExpressionWarningApplyConfiguration) WithWarning ¶
func (b *ExpressionWarningApplyConfiguration) WithWarning(value string) *ExpressionWarningApplyConfiguration
WithWarning sets the Warning field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Warning field is set to the value of the last call.
type JSONPatchApplyConfiguration ¶
type JSONPatchApplyConfiguration struct {
// expression will be evaluated by CEL to create a [JSON patch](https://jsonpatch.com/).
// ref: https://github.com/google/cel-spec
//
// expression must return an array of JSONPatch values.
//
// For example, this CEL expression returns a JSON patch to conditionally modify a value:
//
// [
// JSONPatch{op: "test", path: "/spec/example", value: "Red"},
// JSONPatch{op: "replace", path: "/spec/example", value: "Green"}
// ]
//
// To define an object for the patch value, use Object types. For example:
//
// [
// JSONPatch{
// op: "add",
// path: "/spec/selector",
// value: Object.spec.selector{matchLabels: {"environment": "test"}}
// }
// ]
//
// To use strings containing '/' and '~' as JSONPatch path keys, use "jsonpatch.escapeKey". For example:
//
// [
// JSONPatch{
// op: "add",
// path: "/metadata/labels/" + jsonpatch.escapeKey("example.com/environment"),
// value: "test"
// },
// ]
//
// CEL expressions have access to the types needed to create JSON patches and objects:
//
// - 'JSONPatch' - CEL type of JSON Patch operations. JSONPatch has the fields 'op', 'from', 'path' and 'value'.
// See [JSON patch](https://jsonpatch.com/) for more details. The 'value' field may be set to any of: string,
// integer, array, map or object. If set, the 'path' and 'from' fields must be set to a
// [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901/) string, where the 'jsonpatch.escapeKey()' CEL
// function may be used to escape path keys containing '/' and '~'.
// - 'Object' - CEL type of the resource object.
// - 'Object.<fieldName>' - CEL type of object field (such as 'Object.spec')
// - 'Object.<fieldName1>.<fieldName2>...<fieldNameN>` - CEL type of nested field (such as 'Object.spec.containers')
//
// CEL expressions have access to the contents of the API request, 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.
//
// CEL expressions have access to [Kubernetes CEL function libraries](https://kubernetes.io/docs/reference/using-api/cel/#cel-options-language-features-and-libraries)
// as well as:
//
// - 'jsonpatch.escapeKey' - Performs JSONPatch key escaping. '~' and '/' are escaped as '~0' and `~1' respectively).
//
// Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.
// Required.
Expression *string `json:"expression,omitempty"`
}
JSONPatchApplyConfiguration represents a declarative configuration of the JSONPatch type for use with apply.
JSONPatch defines a JSON Patch.
func JSONPatch ¶
func JSONPatch() *JSONPatchApplyConfiguration
JSONPatchApplyConfiguration constructs a declarative configuration of the JSONPatch type for use with apply.
func (*JSONPatchApplyConfiguration) WithExpression ¶
func (b *JSONPatchApplyConfiguration) WithExpression(value string) *JSONPatchApplyConfiguration
WithExpression sets the Expression field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Expression field is set to the value of the last call.
type MatchConditionApplyConfiguration ¶
type MatchConditionApplyConfiguration struct {
// 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.
Name *string `json:"name,omitempty"`
// 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.
Expression *string `json:"expression,omitempty"`
}
MatchConditionApplyConfiguration represents a declarative configuration of the MatchCondition type for use with apply.
func MatchCondition ¶
func MatchCondition() *MatchConditionApplyConfiguration
MatchConditionApplyConfiguration constructs a declarative configuration of the MatchCondition type for use with apply.
func (*MatchConditionApplyConfiguration) WithExpression ¶
func (b *MatchConditionApplyConfiguration) WithExpression(value string) *MatchConditionApplyConfiguration
WithExpression sets the Expression field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Expression field is set to the value of the last call.
func (*MatchConditionApplyConfiguration) WithName ¶
func (b *MatchConditionApplyConfiguration) WithName(value string) *MatchConditionApplyConfiguration
WithName sets the Name field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Name field is set to the value of the last call.
type MatchResourcesApplyConfiguration ¶
type MatchResourcesApplyConfiguration struct {
// 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.
NamespaceSelector *v1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
// objectSelector decides whether to run the policy based on if the
// object has matching labels. objectSelector is evaluated against both
// the oldObject and newObject that would be sent to the policy's expression (CEL), 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.
ObjectSelector *v1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
// resourceRules describes what operations on what resources/subresources the admission policy matches.
// The policy cares about an operation if it matches _any_ Rule.
ResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"resourceRules,omitempty"`
// excludeResourceRules describes what operations on what resources/subresources the policy should not care about.
// The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
ExcludeResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"excludeResourceRules,omitempty"`
// 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"]`,
// the admission policy does not consider requests to apps/v1beta1 or extensions/v1beta1 API groups.
//
// - 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"]`,
// the admission policy **does** consider requests made to apps/v1beta1 or extensions/v1beta1
// API groups. The API server translates the request to a matched resource API if necessary.
//
// Defaults to "Equivalent"
MatchPolicy *admissionregistrationv1alpha1.MatchPolicyType `json:"matchPolicy,omitempty"`
}
MatchResourcesApplyConfiguration represents a declarative configuration of the MatchResources type for use with apply.
MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
func MatchResources ¶
func MatchResources() *MatchResourcesApplyConfiguration
MatchResourcesApplyConfiguration constructs a declarative configuration of the MatchResources type for use with apply.
func (*MatchResourcesApplyConfiguration) WithExcludeResourceRules ¶
func (b *MatchResourcesApplyConfiguration) WithExcludeResourceRules(values ...*NamedRuleWithOperationsApplyConfiguration) *MatchResourcesApplyConfiguration
WithExcludeResourceRules adds the given value to the ExcludeResourceRules field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the ExcludeResourceRules field.
func (*MatchResourcesApplyConfiguration) WithMatchPolicy ¶
func (b *MatchResourcesApplyConfiguration) WithMatchPolicy(value admissionregistrationv1alpha1.MatchPolicyType) *MatchResourcesApplyConfiguration
WithMatchPolicy sets the MatchPolicy field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the MatchPolicy field is set to the value of the last call.
func (*MatchResourcesApplyConfiguration) WithNamespaceSelector ¶
func (b *MatchResourcesApplyConfiguration) WithNamespaceSelector(value *v1.LabelSelectorApplyConfiguration) *MatchResourcesApplyConfiguration
WithNamespaceSelector sets the NamespaceSelector field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the NamespaceSelector field is set to the value of the last call.
func (*MatchResourcesApplyConfiguration) WithObjectSelector ¶
func (b *MatchResourcesApplyConfiguration) WithObjectSelector(value *v1.LabelSelectorApplyConfiguration) *MatchResourcesApplyConfiguration
WithObjectSelector sets the ObjectSelector field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ObjectSelector field is set to the value of the last call.
func (*MatchResourcesApplyConfiguration) WithResourceRules ¶
func (b *MatchResourcesApplyConfiguration) WithResourceRules(values ...*NamedRuleWithOperationsApplyConfiguration) *MatchResourcesApplyConfiguration
WithResourceRules adds the given value to the ResourceRules field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the ResourceRules field.
type MutatingAdmissionPolicyApplyConfiguration ¶
type MutatingAdmissionPolicyApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec defines the desired behavior of the MutatingAdmissionPolicy.
Spec *MutatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"`
}
MutatingAdmissionPolicyApplyConfiguration represents a declarative configuration of the MutatingAdmissionPolicy type for use with apply.
MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain.
func ExtractMutatingAdmissionPolicy ¶
func ExtractMutatingAdmissionPolicy(mutatingAdmissionPolicy *admissionregistrationv1alpha1.MutatingAdmissionPolicy, fieldManager string) (*MutatingAdmissionPolicyApplyConfiguration, error)
ExtractMutatingAdmissionPolicy extracts the applied configuration owned by fieldManager from mutatingAdmissionPolicy. If no managedFields are found in mutatingAdmissionPolicy for fieldManager, a MutatingAdmissionPolicyApplyConfiguration is returned with only the Name, Namespace (if applicable), APIVersion and Kind populated. It is possible that no managed fields were found for because other field managers have taken ownership of all the fields previously owned by fieldManager, or because the fieldManager never owned fields any fields. mutatingAdmissionPolicy must be a unmodified MutatingAdmissionPolicy API object that was retrieved from the Kubernetes API. ExtractMutatingAdmissionPolicy provides a way to perform a extract/modify-in-place/apply workflow. Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously applied if another fieldManager has updated or force applied any of the previously applied fields.
func ExtractMutatingAdmissionPolicyFrom ¶
func ExtractMutatingAdmissionPolicyFrom(mutatingAdmissionPolicy *admissionregistrationv1alpha1.MutatingAdmissionPolicy, fieldManager string, subresource string) (*MutatingAdmissionPolicyApplyConfiguration, error)
ExtractMutatingAdmissionPolicyFrom extracts the applied configuration owned by fieldManager from mutatingAdmissionPolicy for the specified subresource. Pass an empty string for subresource to extract the main resource. Common subresources include "status", "scale", etc. mutatingAdmissionPolicy must be a unmodified MutatingAdmissionPolicy API object that was retrieved from the Kubernetes API. ExtractMutatingAdmissionPolicyFrom provides a way to perform a extract/modify-in-place/apply workflow. Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously applied if another fieldManager has updated or force applied any of the previously applied fields.
func MutatingAdmissionPolicy ¶
func MutatingAdmissionPolicy(name string) *MutatingAdmissionPolicyApplyConfiguration
MutatingAdmissionPolicy constructs a declarative configuration of the MutatingAdmissionPolicy type for use with apply.
func (*MutatingAdmissionPolicyApplyConfiguration) GetAPIVersion ¶
func (b *MutatingAdmissionPolicyApplyConfiguration) GetAPIVersion() *string
GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.
func (*MutatingAdmissionPolicyApplyConfiguration) GetKind ¶
func (b *MutatingAdmissionPolicyApplyConfiguration) GetKind() *string
GetKind retrieves the value of the Kind field in the declarative configuration.
func (*MutatingAdmissionPolicyApplyConfiguration) GetName ¶
func (b *MutatingAdmissionPolicyApplyConfiguration) GetName() *string
GetName retrieves the value of the Name field in the declarative configuration.
func (*MutatingAdmissionPolicyApplyConfiguration) GetNamespace ¶
func (b *MutatingAdmissionPolicyApplyConfiguration) GetNamespace() *string
GetNamespace retrieves the value of the Namespace field in the declarative configuration.
func (MutatingAdmissionPolicyApplyConfiguration) IsApplyConfiguration ¶
func (b MutatingAdmissionPolicyApplyConfiguration) IsApplyConfiguration()
func (*MutatingAdmissionPolicyApplyConfiguration) WithAPIVersion ¶
func (b *MutatingAdmissionPolicyApplyConfiguration) WithAPIVersion(value string) *MutatingAdmissionPolicyApplyConfiguration
WithAPIVersion sets the APIVersion field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the APIVersion field is set to the value of the last call.
func (*MutatingAdmissionPolicyApplyConfiguration) WithAnnotations ¶
func (b *MutatingAdmissionPolicyApplyConfiguration) WithAnnotations(entries map[string]string) *MutatingAdmissionPolicyApplyConfiguration
WithAnnotations puts the entries into the Annotations field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, the entries provided by each call will be put on the Annotations field, overwriting an existing map entries in Annotations field with the same key.
func (*MutatingAdmissionPolicyApplyConfiguration) WithCreationTimestamp ¶
func (b *MutatingAdmissionPolicyApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MutatingAdmissionPolicyApplyConfiguration
WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the CreationTimestamp field is set to the value of the last call.
func (*MutatingAdmissionPolicyApplyConfiguration) WithDeletionGracePeriodSeconds ¶
func (b *MutatingAdmissionPolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MutatingAdmissionPolicyApplyConfiguration
WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
func (*MutatingAdmissionPolicyApplyConfiguration) WithDeletionTimestamp ¶
func (b *MutatingAdmissionPolicyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MutatingAdmissionPolicyApplyConfiguration
WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DeletionTimestamp field is set to the value of the last call.
func (*MutatingAdmissionPolicyApplyConfiguration) WithFinalizers ¶
func (b *MutatingAdmissionPolicyApplyConfiguration) WithFinalizers(values ...string) *MutatingAdmissionPolicyApplyConfiguration
WithFinalizers adds the given value to the Finalizers field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Finalizers field.
func (*MutatingAdmissionPolicyApplyConfiguration) WithGenerateName ¶
func (b *MutatingAdmissionPolicyApplyConfiguration) WithGenerateName(value string) *MutatingAdmissionPolicyApplyConfiguration
WithGenerateName sets the GenerateName field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the GenerateName field is set to the value of the last call.
func (*MutatingAdmissionPolicyApplyConfiguration) WithGeneration ¶
func (b *MutatingAdmissionPolicyApplyConfiguration) WithGeneration(value int64) *MutatingAdmissionPolicyApplyConfiguration
WithGeneration sets the Generation field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Generation field is set to the value of the last call.
func (*MutatingAdmissionPolicyApplyConfiguration) WithKind ¶
func (b *MutatingAdmissionPolicyApplyConfiguration) WithKind(value string) *MutatingAdmissionPolicyApplyConfiguration
WithKind sets the Kind field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Kind field is set to the value of the last call.
func (*MutatingAdmissionPolicyApplyConfiguration) WithLabels ¶
func (b *MutatingAdmissionPolicyApplyConfiguration) WithLabels(entries map[string]string) *MutatingAdmissionPolicyApplyConfiguration
WithLabels puts the entries into the Labels field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, the entries provided by each call will be put on the Labels field, overwriting an existing map entries in Labels field with the same key.
func (*MutatingAdmissionPolicyApplyConfiguration) WithName ¶
func (b *MutatingAdmissionPolicyApplyConfiguration) WithName(value string) *MutatingAdmissionPolicyApplyConfiguration
WithName sets the Name field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Name field is set to the value of the last call.
func (*MutatingAdmissionPolicyApplyConfiguration) WithNamespace ¶
func (b *MutatingAdmissionPolicyApplyConfiguration) WithNamespace(value string) *MutatingAdmissionPolicyApplyConfiguration
WithNamespace sets the Namespace field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Namespace field is set to the value of the last call.
func (*MutatingAdmissionPolicyApplyConfiguration) WithOwnerReferences ¶
func (b *MutatingAdmissionPolicyApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *MutatingAdmissionPolicyApplyConfiguration
WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the OwnerReferences field.
func (*MutatingAdmissionPolicyApplyConfiguration) WithResourceVersion ¶
func (b *MutatingAdmissionPolicyApplyConfiguration) WithResourceVersion(value string) *MutatingAdmissionPolicyApplyConfiguration
WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ResourceVersion field is set to the value of the last call.
func (*MutatingAdmissionPolicyApplyConfiguration) WithSpec ¶
func (b *MutatingAdmissionPolicyApplyConfiguration) WithSpec(value *MutatingAdmissionPolicySpecApplyConfiguration) *MutatingAdmissionPolicyApplyConfiguration
WithSpec sets the Spec field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Spec field is set to the value of the last call.
func (*MutatingAdmissionPolicyApplyConfiguration) WithUID ¶
func (b *MutatingAdmissionPolicyApplyConfiguration) WithUID(value types.UID) *MutatingAdmissionPolicyApplyConfiguration
WithUID sets the UID field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the UID field is set to the value of the last call.
type MutatingAdmissionPolicyBindingApplyConfiguration ¶
type MutatingAdmissionPolicyBindingApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec defines the desired behavior of the MutatingAdmissionPolicyBinding.
Spec *MutatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"`
}
MutatingAdmissionPolicyBindingApplyConfiguration represents a declarative configuration of the MutatingAdmissionPolicyBinding type for use with apply.
MutatingAdmissionPolicyBinding binds the MutatingAdmissionPolicy with parametrized resources. MutatingAdmissionPolicyBinding and the optional parameter resource together define how cluster administrators configure policies for clusters.
For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding. Each evaluation is constrained by a [runtime cost budget](https://kubernetes.io/docs/reference/using-api/cel/#runtime-cost-budget).
Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.
func ExtractMutatingAdmissionPolicyBinding ¶
func ExtractMutatingAdmissionPolicyBinding(mutatingAdmissionPolicyBinding *admissionregistrationv1alpha1.MutatingAdmissionPolicyBinding, fieldManager string) (*MutatingAdmissionPolicyBindingApplyConfiguration, error)
ExtractMutatingAdmissionPolicyBinding extracts the applied configuration owned by fieldManager from mutatingAdmissionPolicyBinding. If no managedFields are found in mutatingAdmissionPolicyBinding for fieldManager, a MutatingAdmissionPolicyBindingApplyConfiguration is returned with only the Name, Namespace (if applicable), APIVersion and Kind populated. It is possible that no managed fields were found for because other field managers have taken ownership of all the fields previously owned by fieldManager, or because the fieldManager never owned fields any fields. mutatingAdmissionPolicyBinding must be a unmodified MutatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API. ExtractMutatingAdmissionPolicyBinding provides a way to perform a extract/modify-in-place/apply workflow. Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously applied if another fieldManager has updated or force applied any of the previously applied fields.
func ExtractMutatingAdmissionPolicyBindingFrom ¶
func ExtractMutatingAdmissionPolicyBindingFrom(mutatingAdmissionPolicyBinding *admissionregistrationv1alpha1.MutatingAdmissionPolicyBinding, fieldManager string, subresource string) (*MutatingAdmissionPolicyBindingApplyConfiguration, error)
ExtractMutatingAdmissionPolicyBindingFrom extracts the applied configuration owned by fieldManager from mutatingAdmissionPolicyBinding for the specified subresource. Pass an empty string for subresource to extract the main resource. Common subresources include "status", "scale", etc. mutatingAdmissionPolicyBinding must be a unmodified MutatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API. ExtractMutatingAdmissionPolicyBindingFrom provides a way to perform a extract/modify-in-place/apply workflow. Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously applied if another fieldManager has updated or force applied any of the previously applied fields.
func MutatingAdmissionPolicyBinding ¶
func MutatingAdmissionPolicyBinding(name string) *MutatingAdmissionPolicyBindingApplyConfiguration
MutatingAdmissionPolicyBinding constructs a declarative configuration of the MutatingAdmissionPolicyBinding type for use with apply.
func (*MutatingAdmissionPolicyBindingApplyConfiguration) GetAPIVersion ¶
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) GetAPIVersion() *string
GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.
func (*MutatingAdmissionPolicyBindingApplyConfiguration) GetKind ¶
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) GetKind() *string
GetKind retrieves the value of the Kind field in the declarative configuration.
func (*MutatingAdmissionPolicyBindingApplyConfiguration) GetName ¶
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) GetName() *string
GetName retrieves the value of the Name field in the declarative configuration.
func (*MutatingAdmissionPolicyBindingApplyConfiguration) GetNamespace ¶
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) GetNamespace() *string
GetNamespace retrieves the value of the Namespace field in the declarative configuration.
func (MutatingAdmissionPolicyBindingApplyConfiguration) IsApplyConfiguration ¶
func (b MutatingAdmissionPolicyBindingApplyConfiguration) IsApplyConfiguration()
func (*MutatingAdmissionPolicyBindingApplyConfiguration) WithAPIVersion ¶
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithAPIVersion(value string) *MutatingAdmissionPolicyBindingApplyConfiguration
WithAPIVersion sets the APIVersion field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the APIVersion field is set to the value of the last call.
func (*MutatingAdmissionPolicyBindingApplyConfiguration) WithAnnotations ¶
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithAnnotations(entries map[string]string) *MutatingAdmissionPolicyBindingApplyConfiguration
WithAnnotations puts the entries into the Annotations field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, the entries provided by each call will be put on the Annotations field, overwriting an existing map entries in Annotations field with the same key.
func (*MutatingAdmissionPolicyBindingApplyConfiguration) WithCreationTimestamp ¶
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MutatingAdmissionPolicyBindingApplyConfiguration
WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the CreationTimestamp field is set to the value of the last call.
func (*MutatingAdmissionPolicyBindingApplyConfiguration) WithDeletionGracePeriodSeconds ¶
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MutatingAdmissionPolicyBindingApplyConfiguration
WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
func (*MutatingAdmissionPolicyBindingApplyConfiguration) WithDeletionTimestamp ¶
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MutatingAdmissionPolicyBindingApplyConfiguration
WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DeletionTimestamp field is set to the value of the last call.
func (*MutatingAdmissionPolicyBindingApplyConfiguration) WithFinalizers ¶
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithFinalizers(values ...string) *MutatingAdmissionPolicyBindingApplyConfiguration
WithFinalizers adds the given value to the Finalizers field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Finalizers field.
func (*MutatingAdmissionPolicyBindingApplyConfiguration) WithGenerateName ¶
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithGenerateName(value string) *MutatingAdmissionPolicyBindingApplyConfiguration
WithGenerateName sets the GenerateName field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the GenerateName field is set to the value of the last call.
func (*MutatingAdmissionPolicyBindingApplyConfiguration) WithGeneration ¶
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithGeneration(value int64) *MutatingAdmissionPolicyBindingApplyConfiguration
WithGeneration sets the Generation field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Generation field is set to the value of the last call.
func (*MutatingAdmissionPolicyBindingApplyConfiguration) WithKind ¶
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithKind(value string) *MutatingAdmissionPolicyBindingApplyConfiguration
WithKind sets the Kind field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Kind field is set to the value of the last call.
func (*MutatingAdmissionPolicyBindingApplyConfiguration) WithLabels ¶
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithLabels(entries map[string]string) *MutatingAdmissionPolicyBindingApplyConfiguration
WithLabels puts the entries into the Labels field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, the entries provided by each call will be put on the Labels field, overwriting an existing map entries in Labels field with the same key.
func (*MutatingAdmissionPolicyBindingApplyConfiguration) WithName ¶
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithName(value string) *MutatingAdmissionPolicyBindingApplyConfiguration
WithName sets the Name field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Name field is set to the value of the last call.
func (*MutatingAdmissionPolicyBindingApplyConfiguration) WithNamespace ¶
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithNamespace(value string) *MutatingAdmissionPolicyBindingApplyConfiguration
WithNamespace sets the Namespace field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Namespace field is set to the value of the last call.
func (*MutatingAdmissionPolicyBindingApplyConfiguration) WithOwnerReferences ¶
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *MutatingAdmissionPolicyBindingApplyConfiguration
WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the OwnerReferences field.
func (*MutatingAdmissionPolicyBindingApplyConfiguration) WithResourceVersion ¶
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithResourceVersion(value string) *MutatingAdmissionPolicyBindingApplyConfiguration
WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ResourceVersion field is set to the value of the last call.
func (*MutatingAdmissionPolicyBindingApplyConfiguration) WithSpec ¶
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithSpec(value *MutatingAdmissionPolicyBindingSpecApplyConfiguration) *MutatingAdmissionPolicyBindingApplyConfiguration
WithSpec sets the Spec field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Spec field is set to the value of the last call.
func (*MutatingAdmissionPolicyBindingApplyConfiguration) WithUID ¶
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithUID(value types.UID) *MutatingAdmissionPolicyBindingApplyConfiguration
WithUID sets the UID field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the UID field is set to the value of the last call.
type MutatingAdmissionPolicyBindingSpecApplyConfiguration ¶
type MutatingAdmissionPolicyBindingSpecApplyConfiguration struct {
// policyName references a MutatingAdmissionPolicy name which the MutatingAdmissionPolicyBinding binds to.
// If the referenced resource does not exist, this binding is considered invalid and will be ignored
// Required.
PolicyName *string `json:"policyName,omitempty"`
// paramRef specifies the parameter resource used to configure the admission control policy.
// It should point to a resource of the type specified in spec.ParamKind of the bound MutatingAdmissionPolicy.
// 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 MutatingAdmissionPolicy applied.
// If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.
ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"`
// matchResources limits what resources match this binding and may be mutated by it.
// Note that if matchResources matches a resource, the resource must also match a policy's matchConstraints and
// matchConditions before the resource may be mutated.
// When matchResources is unset, it does not constrain resource matching, and only the policy's matchConstraints
// and matchConditions must match for the resource to be mutated.
// Additionally, matchResources.resourceRules are optional and do not constraint matching when unset.
// Note that this is differs from MutatingAdmissionPolicy matchConstraints, where resourceRules are required.
// The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched.
// '*' matches CREATE, UPDATE and CONNECT.
MatchResources *MatchResourcesApplyConfiguration `json:"matchResources,omitempty"`
}
MutatingAdmissionPolicyBindingSpecApplyConfiguration represents a declarative configuration of the MutatingAdmissionPolicyBindingSpec type for use with apply.
MutatingAdmissionPolicyBindingSpec is the specification of the MutatingAdmissionPolicyBinding.
func MutatingAdmissionPolicyBindingSpec ¶
func MutatingAdmissionPolicyBindingSpec() *MutatingAdmissionPolicyBindingSpecApplyConfiguration
MutatingAdmissionPolicyBindingSpecApplyConfiguration constructs a declarative configuration of the MutatingAdmissionPolicyBindingSpec type for use with apply.
func (*MutatingAdmissionPolicyBindingSpecApplyConfiguration) WithMatchResources ¶
func (b *MutatingAdmissionPolicyBindingSpecApplyConfiguration) WithMatchResources(value *MatchResourcesApplyConfiguration) *MutatingAdmissionPolicyBindingSpecApplyConfiguration
WithMatchResources sets the MatchResources field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the MatchResources field is set to the value of the last call.
func (*MutatingAdmissionPolicyBindingSpecApplyConfiguration) WithParamRef ¶
func (b *MutatingAdmissionPolicyBindingSpecApplyConfiguration) WithParamRef(value *ParamRefApplyConfiguration) *MutatingAdmissionPolicyBindingSpecApplyConfiguration
WithParamRef sets the ParamRef field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ParamRef field is set to the value of the last call.
func (*MutatingAdmissionPolicyBindingSpecApplyConfiguration) WithPolicyName ¶
func (b *MutatingAdmissionPolicyBindingSpecApplyConfiguration) WithPolicyName(value string) *MutatingAdmissionPolicyBindingSpecApplyConfiguration
WithPolicyName sets the PolicyName field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the PolicyName field is set to the value of the last call.
type MutatingAdmissionPolicySpecApplyConfiguration ¶
type MutatingAdmissionPolicySpecApplyConfiguration struct {
// 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 MutatingAdmissionPolicyBinding, the params variable will be null.
ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"`
// matchConstraints specifies what resources this policy is designed to validate.
// The MutatingAdmissionPolicy 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
// MutatingAdmissionPolicy cannot match MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding.
// The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched.
// '*' matches CREATE, UPDATE and CONNECT.
// Required.
MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"`
// 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.
Variables []VariableApplyConfiguration `json:"variables,omitempty"`
// mutations contain operations to perform on matching objects.
// mutations may not be empty; a minimum of one mutation is required.
// mutations are evaluated in order, and are reinvoked according to
// the reinvocationPolicy.
// The mutations of a policy are invoked for each binding of this policy
// and reinvocation of mutations occurs on a per binding basis.
Mutations []MutationApplyConfiguration `json:"mutations,omitempty"`
// 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 paramKind refers to a non-existent Kind.
// A binding is invalid if paramRef.name refers to a non-existent resource.
//
// failurePolicy does not define how validations that evaluate to false are handled.
//
// Allowed values are Ignore or Fail. Defaults to Fail.
FailurePolicy *admissionregistrationv1alpha1.FailurePolicyType `json:"failurePolicy,omitempty"`
// 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 matchConstraints.
// 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
MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"`
// reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding
// as part of a single admission evaluation.
// Allowed values are "Never" and "IfNeeded".
//
// Never: These mutations will not be called more than once per binding in a single admission evaluation.
//
// IfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of
// order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only
// reinvoked when mutations change the object after this mutation is invoked.
// Required.
ReinvocationPolicy *v1.ReinvocationPolicyType `json:"reinvocationPolicy,omitempty"`
}
MutatingAdmissionPolicySpecApplyConfiguration represents a declarative configuration of the MutatingAdmissionPolicySpec type for use with apply.
MutatingAdmissionPolicySpec is the specification of the desired behavior of the admission policy.
func MutatingAdmissionPolicySpec ¶
func MutatingAdmissionPolicySpec() *MutatingAdmissionPolicySpecApplyConfiguration
MutatingAdmissionPolicySpecApplyConfiguration constructs a declarative configuration of the MutatingAdmissionPolicySpec type for use with apply.
func (*MutatingAdmissionPolicySpecApplyConfiguration) WithFailurePolicy ¶
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithFailurePolicy(value admissionregistrationv1alpha1.FailurePolicyType) *MutatingAdmissionPolicySpecApplyConfiguration
WithFailurePolicy sets the FailurePolicy field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the FailurePolicy field is set to the value of the last call.
func (*MutatingAdmissionPolicySpecApplyConfiguration) WithMatchConditions ¶
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithMatchConditions(values ...*MatchConditionApplyConfiguration) *MutatingAdmissionPolicySpecApplyConfiguration
WithMatchConditions adds the given value to the MatchConditions field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the MatchConditions field.
func (*MutatingAdmissionPolicySpecApplyConfiguration) WithMatchConstraints ¶
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithMatchConstraints(value *MatchResourcesApplyConfiguration) *MutatingAdmissionPolicySpecApplyConfiguration
WithMatchConstraints sets the MatchConstraints field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the MatchConstraints field is set to the value of the last call.
func (*MutatingAdmissionPolicySpecApplyConfiguration) WithMutations ¶
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithMutations(values ...*MutationApplyConfiguration) *MutatingAdmissionPolicySpecApplyConfiguration
WithMutations adds the given value to the Mutations field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Mutations field.
func (*MutatingAdmissionPolicySpecApplyConfiguration) WithParamKind ¶
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithParamKind(value *ParamKindApplyConfiguration) *MutatingAdmissionPolicySpecApplyConfiguration
WithParamKind sets the ParamKind field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ParamKind field is set to the value of the last call.
func (*MutatingAdmissionPolicySpecApplyConfiguration) WithReinvocationPolicy ¶
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithReinvocationPolicy(value v1.ReinvocationPolicyType) *MutatingAdmissionPolicySpecApplyConfiguration
WithReinvocationPolicy sets the ReinvocationPolicy field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ReinvocationPolicy field is set to the value of the last call.
func (*MutatingAdmissionPolicySpecApplyConfiguration) WithVariables ¶
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithVariables(values ...*VariableApplyConfiguration) *MutatingAdmissionPolicySpecApplyConfiguration
WithVariables adds the given value to the Variables field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Variables field.
type MutationApplyConfiguration ¶
type MutationApplyConfiguration struct {
// patchType indicates the patch strategy used.
// Allowed values are "ApplyConfiguration" and "JSONPatch".
// Required.
PatchType *admissionregistrationv1alpha1.PatchType `json:"patchType,omitempty"`
// applyConfiguration defines the desired configuration values of an object.
// The configuration is applied to the admission object using
// [structured merge diff](https://github.com/kubernetes-sigs/structured-merge-diff).
// A CEL expression is used to create apply configuration.
ApplyConfiguration *ApplyConfigurationApplyConfiguration `json:"applyConfiguration,omitempty"`
// jsonPatch defines a [JSON patch](https://jsonpatch.com/) operation to perform a mutation to the object.
// A CEL expression is used to create the JSON patch.
JSONPatch *JSONPatchApplyConfiguration `json:"jsonPatch,omitempty"`
}
MutationApplyConfiguration represents a declarative configuration of the Mutation type for use with apply.
Mutation specifies the CEL expression which is used to apply the Mutation.
func Mutation ¶
func Mutation() *MutationApplyConfiguration
MutationApplyConfiguration constructs a declarative configuration of the Mutation type for use with apply.
func (*MutationApplyConfiguration) WithApplyConfiguration ¶
func (b *MutationApplyConfiguration) WithApplyConfiguration(value *ApplyConfigurationApplyConfiguration) *MutationApplyConfiguration
WithApplyConfiguration sets the ApplyConfiguration field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ApplyConfiguration field is set to the value of the last call.
func (*MutationApplyConfiguration) WithJSONPatch ¶
func (b *MutationApplyConfiguration) WithJSONPatch(value *JSONPatchApplyConfiguration) *MutationApplyConfiguration
WithJSONPatch sets the JSONPatch field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the JSONPatch field is set to the value of the last call.
func (*MutationApplyConfiguration) WithPatchType ¶
func (b *MutationApplyConfiguration) WithPatchType(value admissionregistrationv1alpha1.PatchType) *MutationApplyConfiguration
WithPatchType sets the PatchType field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the PatchType field is set to the value of the last call.
type NamedRuleWithOperationsApplyConfiguration ¶
type NamedRuleWithOperationsApplyConfiguration struct {
// resourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
ResourceNames []string `json:"resourceNames,omitempty"`
// RuleWithOperations is a tuple of Operations and Resources.
v1.RuleWithOperationsApplyConfiguration `json:",inline"`
}
NamedRuleWithOperationsApplyConfiguration represents a declarative configuration of the NamedRuleWithOperations type for use with apply.
NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
func NamedRuleWithOperations ¶
func NamedRuleWithOperations() *NamedRuleWithOperationsApplyConfiguration
NamedRuleWithOperationsApplyConfiguration constructs a declarative configuration of the NamedRuleWithOperations type for use with apply.
func (*NamedRuleWithOperationsApplyConfiguration) WithAPIGroups ¶
func (b *NamedRuleWithOperationsApplyConfiguration) WithAPIGroups(values ...string) *NamedRuleWithOperationsApplyConfiguration
WithAPIGroups adds the given value to the APIGroups field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the APIGroups field.
func (*NamedRuleWithOperationsApplyConfiguration) WithAPIVersions ¶
func (b *NamedRuleWithOperationsApplyConfiguration) WithAPIVersions(values ...string) *NamedRuleWithOperationsApplyConfiguration
WithAPIVersions adds the given value to the APIVersions field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the APIVersions field.
func (*NamedRuleWithOperationsApplyConfiguration) WithOperations ¶
func (b *NamedRuleWithOperationsApplyConfiguration) WithOperations(values ...admissionregistrationv1.OperationType) *NamedRuleWithOperationsApplyConfiguration
WithOperations adds the given value to the Operations field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Operations field.
func (*NamedRuleWithOperationsApplyConfiguration) WithResourceNames ¶
func (b *NamedRuleWithOperationsApplyConfiguration) WithResourceNames(values ...string) *NamedRuleWithOperationsApplyConfiguration
WithResourceNames adds the given value to the ResourceNames field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the ResourceNames field.
func (*NamedRuleWithOperationsApplyConfiguration) WithResources ¶
func (b *NamedRuleWithOperationsApplyConfiguration) WithResources(values ...string) *NamedRuleWithOperationsApplyConfiguration
WithResources adds the given value to the Resources field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Resources field.
func (*NamedRuleWithOperationsApplyConfiguration) WithScope ¶
func (b *NamedRuleWithOperationsApplyConfiguration) WithScope(value admissionregistrationv1.ScopeType) *NamedRuleWithOperationsApplyConfiguration
WithScope sets the Scope field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Scope field is set to the value of the last call.
type ParamKindApplyConfiguration ¶
type ParamKindApplyConfiguration struct {
// apiVersion is the API group version the resources belong to.
// In format of "group/version".
// Required.
APIVersion *string `json:"apiVersion,omitempty"`
// kind is the API kind the resources belong to.
// Required.
Kind *string `json:"kind,omitempty"`
}
ParamKindApplyConfiguration represents a declarative configuration of the ParamKind type for use with apply.
ParamKind is a tuple of Group Kind and Version.
func ParamKind ¶
func ParamKind() *ParamKindApplyConfiguration
ParamKindApplyConfiguration constructs a declarative configuration of the ParamKind type for use with apply.
func (*ParamKindApplyConfiguration) WithAPIVersion ¶
func (b *ParamKindApplyConfiguration) WithAPIVersion(value string) *ParamKindApplyConfiguration
WithAPIVersion sets the APIVersion field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the APIVersion field is set to the value of the last call.
func (*ParamKindApplyConfiguration) WithKind ¶
func (b *ParamKindApplyConfiguration) WithKind(value string) *ParamKindApplyConfiguration
WithKind sets the Kind field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Kind field is set to the value of the last call.
type ParamRefApplyConfiguration ¶
type ParamRefApplyConfiguration struct {
// name is the name of the resource being referenced.
//
// `name` and `selector` are mutually exclusive properties. If one is set,
// the other must be unset.
Name *string `json:"name,omitempty"`
// 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.
Namespace *string `json:"namespace,omitempty"`
// 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.
Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
// 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`
// Default to `Deny`
ParameterNotFoundAction *admissionregistrationv1alpha1.ParameterNotFoundActionType `json:"parameterNotFoundAction,omitempty"`
}
ParamRefApplyConfiguration represents a declarative configuration of the ParamRef type for use with apply.
ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.
func ParamRef ¶
func ParamRef() *ParamRefApplyConfiguration
ParamRefApplyConfiguration constructs a declarative configuration of the ParamRef type for use with apply.
func (*ParamRefApplyConfiguration) WithName ¶
func (b *ParamRefApplyConfiguration) WithName(value string) *ParamRefApplyConfiguration
WithName sets the Name field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Name field is set to the value of the last call.
func (*ParamRefApplyConfiguration) WithNamespace ¶
func (b *ParamRefApplyConfiguration) WithNamespace(value string) *ParamRefApplyConfiguration
WithNamespace sets the Namespace field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Namespace field is set to the value of the last call.
func (*ParamRefApplyConfiguration) WithParameterNotFoundAction ¶
func (b *ParamRefApplyConfiguration) WithParameterNotFoundAction(value admissionregistrationv1alpha1.ParameterNotFoundActionType) *ParamRefApplyConfiguration
WithParameterNotFoundAction sets the ParameterNotFoundAction field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ParameterNotFoundAction field is set to the value of the last call.
func (*ParamRefApplyConfiguration) WithSelector ¶
func (b *ParamRefApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *ParamRefApplyConfiguration
WithSelector sets the Selector field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Selector field is set to the value of the last call.
type TypeCheckingApplyConfiguration ¶
type TypeCheckingApplyConfiguration struct {
// expressionWarnings contains the type checking warnings for each expression.
ExpressionWarnings []ExpressionWarningApplyConfiguration `json:"expressionWarnings,omitempty"`
}
TypeCheckingApplyConfiguration represents a declarative configuration of the TypeChecking type for use with apply.
TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy
func TypeChecking ¶
func TypeChecking() *TypeCheckingApplyConfiguration
TypeCheckingApplyConfiguration constructs a declarative configuration of the TypeChecking type for use with apply.
func (*TypeCheckingApplyConfiguration) WithExpressionWarnings ¶
func (b *TypeCheckingApplyConfiguration) WithExpressionWarnings(values ...*ExpressionWarningApplyConfiguration) *TypeCheckingApplyConfiguration
WithExpressionWarnings adds the given value to the ExpressionWarnings field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the ExpressionWarnings field.
type ValidatingAdmissionPolicyApplyConfiguration ¶
type ValidatingAdmissionPolicyApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec defines the desired behavior of the ValidatingAdmissionPolicy.
Spec *ValidatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"`
// status represents the current 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.
Status *ValidatingAdmissionPolicyStatusApplyConfiguration `json:"status,omitempty"`
}
ValidatingAdmissionPolicyApplyConfiguration represents a declarative configuration of the ValidatingAdmissionPolicy type for use with apply.
ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.
func ExtractValidatingAdmissionPolicy ¶
func ExtractValidatingAdmissionPolicy(validatingAdmissionPolicy *admissionregistrationv1alpha1.ValidatingAdmissionPolicy, fieldManager string) (*ValidatingAdmissionPolicyApplyConfiguration, error)
ExtractValidatingAdmissionPolicy extracts the applied configuration owned by fieldManager from validatingAdmissionPolicy. If no managedFields are found in validatingAdmissionPolicy for fieldManager, a ValidatingAdmissionPolicyApplyConfiguration is returned with only the Name, Namespace (if applicable), APIVersion and Kind populated. It is possible that no managed fields were found for because other field managers have taken ownership of all the fields previously owned by fieldManager, or because the fieldManager never owned fields any fields. validatingAdmissionPolicy must be a unmodified ValidatingAdmissionPolicy API object that was retrieved from the Kubernetes API. ExtractValidatingAdmissionPolicy provides a way to perform a extract/modify-in-place/apply workflow. Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously applied if another fieldManager has updated or force applied any of the previously applied fields.
func ExtractValidatingAdmissionPolicyFrom ¶
func ExtractValidatingAdmissionPolicyFrom(validatingAdmissionPolicy *admissionregistrationv1alpha1.ValidatingAdmissionPolicy, fieldManager string, subresource string) (*ValidatingAdmissionPolicyApplyConfiguration, error)
ExtractValidatingAdmissionPolicyFrom extracts the applied configuration owned by fieldManager from validatingAdmissionPolicy for the specified subresource. Pass an empty string for subresource to extract the main resource. Common subresources include "status", "scale", etc. validatingAdmissionPolicy must be a unmodified ValidatingAdmissionPolicy API object that was retrieved from the Kubernetes API. ExtractValidatingAdmissionPolicyFrom provides a way to perform a extract/modify-in-place/apply workflow. Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously applied if another fieldManager has updated or force applied any of the previously applied fields.
func ExtractValidatingAdmissionPolicyStatus ¶
func ExtractValidatingAdmissionPolicyStatus(validatingAdmissionPolicy *admissionregistrationv1alpha1.ValidatingAdmissionPolicy, fieldManager string) (*ValidatingAdmissionPolicyApplyConfiguration, error)
ExtractValidatingAdmissionPolicyStatus extracts the applied configuration owned by fieldManager from validatingAdmissionPolicy for the status subresource.
func ValidatingAdmissionPolicy ¶
func ValidatingAdmissionPolicy(name string) *ValidatingAdmissionPolicyApplyConfiguration
ValidatingAdmissionPolicy constructs a declarative configuration of the ValidatingAdmissionPolicy type for use with apply.
func (*ValidatingAdmissionPolicyApplyConfiguration) GetAPIVersion ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) GetAPIVersion() *string
GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.
func (*ValidatingAdmissionPolicyApplyConfiguration) GetKind ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) GetKind() *string
GetKind retrieves the value of the Kind field in the declarative configuration.
func (*ValidatingAdmissionPolicyApplyConfiguration) GetName ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) GetName() *string
GetName retrieves the value of the Name field in the declarative configuration.
func (*ValidatingAdmissionPolicyApplyConfiguration) GetNamespace ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) GetNamespace() *string
GetNamespace retrieves the value of the Namespace field in the declarative configuration.
func (ValidatingAdmissionPolicyApplyConfiguration) IsApplyConfiguration ¶
func (b ValidatingAdmissionPolicyApplyConfiguration) IsApplyConfiguration()
func (*ValidatingAdmissionPolicyApplyConfiguration) WithAPIVersion ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) WithAPIVersion(value string) *ValidatingAdmissionPolicyApplyConfiguration
WithAPIVersion sets the APIVersion field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the APIVersion field is set to the value of the last call.
func (*ValidatingAdmissionPolicyApplyConfiguration) WithAnnotations ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) WithAnnotations(entries map[string]string) *ValidatingAdmissionPolicyApplyConfiguration
WithAnnotations puts the entries into the Annotations field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, the entries provided by each call will be put on the Annotations field, overwriting an existing map entries in Annotations field with the same key.
func (*ValidatingAdmissionPolicyApplyConfiguration) WithCreationTimestamp ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ValidatingAdmissionPolicyApplyConfiguration
WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the CreationTimestamp field is set to the value of the last call.
func (*ValidatingAdmissionPolicyApplyConfiguration) WithDeletionGracePeriodSeconds ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ValidatingAdmissionPolicyApplyConfiguration
WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
func (*ValidatingAdmissionPolicyApplyConfiguration) WithDeletionTimestamp ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ValidatingAdmissionPolicyApplyConfiguration
WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DeletionTimestamp field is set to the value of the last call.
func (*ValidatingAdmissionPolicyApplyConfiguration) WithFinalizers ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) WithFinalizers(values ...string) *ValidatingAdmissionPolicyApplyConfiguration
WithFinalizers adds the given value to the Finalizers field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Finalizers field.
func (*ValidatingAdmissionPolicyApplyConfiguration) WithGenerateName ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) WithGenerateName(value string) *ValidatingAdmissionPolicyApplyConfiguration
WithGenerateName sets the GenerateName field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the GenerateName field is set to the value of the last call.
func (*ValidatingAdmissionPolicyApplyConfiguration) WithGeneration ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) WithGeneration(value int64) *ValidatingAdmissionPolicyApplyConfiguration
WithGeneration sets the Generation field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Generation field is set to the value of the last call.
func (*ValidatingAdmissionPolicyApplyConfiguration) WithKind ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) WithKind(value string) *ValidatingAdmissionPolicyApplyConfiguration
WithKind sets the Kind field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Kind field is set to the value of the last call.
func (*ValidatingAdmissionPolicyApplyConfiguration) WithLabels ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) WithLabels(entries map[string]string) *ValidatingAdmissionPolicyApplyConfiguration
WithLabels puts the entries into the Labels field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, the entries provided by each call will be put on the Labels field, overwriting an existing map entries in Labels field with the same key.
func (*ValidatingAdmissionPolicyApplyConfiguration) WithName ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) WithName(value string) *ValidatingAdmissionPolicyApplyConfiguration
WithName sets the Name field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Name field is set to the value of the last call.
func (*ValidatingAdmissionPolicyApplyConfiguration) WithNamespace ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) WithNamespace(value string) *ValidatingAdmissionPolicyApplyConfiguration
WithNamespace sets the Namespace field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Namespace field is set to the value of the last call.
func (*ValidatingAdmissionPolicyApplyConfiguration) WithOwnerReferences ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration
WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the OwnerReferences field.
func (*ValidatingAdmissionPolicyApplyConfiguration) WithResourceVersion ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) WithResourceVersion(value string) *ValidatingAdmissionPolicyApplyConfiguration
WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ResourceVersion field is set to the value of the last call.
func (*ValidatingAdmissionPolicyApplyConfiguration) WithSpec ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) WithSpec(value *ValidatingAdmissionPolicySpecApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration
WithSpec sets the Spec field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Spec field is set to the value of the last call.
func (*ValidatingAdmissionPolicyApplyConfiguration) WithStatus ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) WithStatus(value *ValidatingAdmissionPolicyStatusApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration
WithStatus sets the Status field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Status field is set to the value of the last call.
func (*ValidatingAdmissionPolicyApplyConfiguration) WithUID ¶
func (b *ValidatingAdmissionPolicyApplyConfiguration) WithUID(value types.UID) *ValidatingAdmissionPolicyApplyConfiguration
WithUID sets the UID field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the UID field is set to the value of the last call.
type ValidatingAdmissionPolicyBindingApplyConfiguration ¶
type ValidatingAdmissionPolicyBindingApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// spec defines the desired behavior of the ValidatingAdmissionPolicyBinding.
Spec *ValidatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"`
}
ValidatingAdmissionPolicyBindingApplyConfiguration represents a declarative configuration of the ValidatingAdmissionPolicyBinding type for use with apply.
ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.
For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding.
The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.
func ExtractValidatingAdmissionPolicyBinding ¶
func ExtractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *admissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error)
ExtractValidatingAdmissionPolicyBinding extracts the applied configuration owned by fieldManager from validatingAdmissionPolicyBinding. If no managedFields are found in validatingAdmissionPolicyBinding for fieldManager, a ValidatingAdmissionPolicyBindingApplyConfiguration is returned with only the Name, Namespace (if applicable), APIVersion and Kind populated. It is possible that no managed fields were found for because other field managers have taken ownership of all the fields previously owned by fieldManager, or because the fieldManager never owned fields any fields. validatingAdmissionPolicyBinding must be a unmodified ValidatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API. ExtractValidatingAdmissionPolicyBinding provides a way to perform a extract/modify-in-place/apply workflow. Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously applied if another fieldManager has updated or force applied any of the previously applied fields.
func ExtractValidatingAdmissionPolicyBindingFrom ¶
func ExtractValidatingAdmissionPolicyBindingFrom(validatingAdmissionPolicyBinding *admissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding, fieldManager string, subresource string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error)
ExtractValidatingAdmissionPolicyBindingFrom extracts the applied configuration owned by fieldManager from validatingAdmissionPolicyBinding for the specified subresource. Pass an empty string for subresource to extract the main resource. Common subresources include "status", "scale", etc. validatingAdmissionPolicyBinding must be a unmodified ValidatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API. ExtractValidatingAdmissionPolicyBindingFrom provides a way to perform a extract/modify-in-place/apply workflow. Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously applied if another fieldManager has updated or force applied any of the previously applied fields.
func ValidatingAdmissionPolicyBinding ¶
func ValidatingAdmissionPolicyBinding(name string) *ValidatingAdmissionPolicyBindingApplyConfiguration
ValidatingAdmissionPolicyBinding constructs a declarative configuration of the ValidatingAdmissionPolicyBinding type for use with apply.
func (*ValidatingAdmissionPolicyBindingApplyConfiguration) GetAPIVersion ¶
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) GetAPIVersion() *string
GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.
func (*ValidatingAdmissionPolicyBindingApplyConfiguration) GetKind ¶
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) GetKind() *string
GetKind retrieves the value of the Kind field in the declarative configuration.
func (*ValidatingAdmissionPolicyBindingApplyConfiguration) GetName ¶
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) GetName() *string
GetName retrieves the value of the Name field in the declarative configuration.
func (*ValidatingAdmissionPolicyBindingApplyConfiguration) GetNamespace ¶
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) GetNamespace() *string
GetNamespace retrieves the value of the Namespace field in the declarative configuration.
func (ValidatingAdmissionPolicyBindingApplyConfiguration) IsApplyConfiguration ¶
func (b ValidatingAdmissionPolicyBindingApplyConfiguration) IsApplyConfiguration()
func (*ValidatingAdmissionPolicyBindingApplyConfiguration) WithAPIVersion ¶
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithAPIVersion(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration
WithAPIVersion sets the APIVersion field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the APIVersion field is set to the value of the last call.
func (*ValidatingAdmissionPolicyBindingApplyConfiguration) WithAnnotations ¶
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithAnnotations(entries map[string]string) *ValidatingAdmissionPolicyBindingApplyConfiguration
WithAnnotations puts the entries into the Annotations field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, the entries provided by each call will be put on the Annotations field, overwriting an existing map entries in Annotations field with the same key.
func (*ValidatingAdmissionPolicyBindingApplyConfiguration) WithCreationTimestamp ¶
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ValidatingAdmissionPolicyBindingApplyConfiguration
WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the CreationTimestamp field is set to the value of the last call.
func (*ValidatingAdmissionPolicyBindingApplyConfiguration) WithDeletionGracePeriodSeconds ¶
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ValidatingAdmissionPolicyBindingApplyConfiguration
WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
func (*ValidatingAdmissionPolicyBindingApplyConfiguration) WithDeletionTimestamp ¶
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ValidatingAdmissionPolicyBindingApplyConfiguration
WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DeletionTimestamp field is set to the value of the last call.
func (*ValidatingAdmissionPolicyBindingApplyConfiguration) WithFinalizers ¶
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithFinalizers(values ...string) *ValidatingAdmissionPolicyBindingApplyConfiguration
WithFinalizers adds the given value to the Finalizers field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Finalizers field.
func (*ValidatingAdmissionPolicyBindingApplyConfiguration) WithGenerateName ¶
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithGenerateName(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration
WithGenerateName sets the GenerateName field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the GenerateName field is set to the value of the last call.
func (*ValidatingAdmissionPolicyBindingApplyConfiguration) WithGeneration ¶
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithGeneration(value int64) *ValidatingAdmissionPolicyBindingApplyConfiguration
WithGeneration sets the Generation field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Generation field is set to the value of the last call.
func (*ValidatingAdmissionPolicyBindingApplyConfiguration) WithKind ¶
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithKind(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration
WithKind sets the Kind field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Kind field is set to the value of the last call.
func (*ValidatingAdmissionPolicyBindingApplyConfiguration) WithLabels ¶
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithLabels(entries map[string]string) *ValidatingAdmissionPolicyBindingApplyConfiguration
WithLabels puts the entries into the Labels field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, the entries provided by each call will be put on the Labels field, overwriting an existing map entries in Labels field with the same key.
func (*ValidatingAdmissionPolicyBindingApplyConfiguration) WithName ¶
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithName(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration
WithName sets the Name field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Name field is set to the value of the last call.
func (*ValidatingAdmissionPolicyBindingApplyConfiguration) WithNamespace ¶
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithNamespace(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration
WithNamespace sets the Namespace field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Namespace field is set to the value of the last call.
func (*ValidatingAdmissionPolicyBindingApplyConfiguration) WithOwnerReferences ¶
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ValidatingAdmissionPolicyBindingApplyConfiguration
WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the OwnerReferences field.
func (*ValidatingAdmissionPolicyBindingApplyConfiguration) WithResourceVersion ¶
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithResourceVersion(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration
WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ResourceVersion field is set to the value of the last call.
func (*ValidatingAdmissionPolicyBindingApplyConfiguration) WithSpec ¶
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithSpec(value *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) *ValidatingAdmissionPolicyBindingApplyConfiguration
WithSpec sets the Spec field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Spec field is set to the value of the last call.
func (*ValidatingAdmissionPolicyBindingApplyConfiguration) WithUID ¶
func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithUID(value types.UID) *ValidatingAdmissionPolicyBindingApplyConfiguration
WithUID sets the UID field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the UID field is set to the value of the last call.
type ValidatingAdmissionPolicyBindingSpecApplyConfiguration ¶
type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct {
// 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.
PolicyName *string `json:"policyName,omitempty"`
// 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.
ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"`
// 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.
MatchResources *MatchResourcesApplyConfiguration `json:"matchResources,omitempty"`
// 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.
ValidationActions []admissionregistrationv1alpha1.ValidationAction `json:"validationActions,omitempty"`
}
ValidatingAdmissionPolicyBindingSpecApplyConfiguration represents a declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use with apply.
ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
func ValidatingAdmissionPolicyBindingSpec ¶
func ValidatingAdmissionPolicyBindingSpec() *ValidatingAdmissionPolicyBindingSpecApplyConfiguration
ValidatingAdmissionPolicyBindingSpecApplyConfiguration constructs a declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use with apply.
func (*ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithMatchResources ¶
func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithMatchResources(value *MatchResourcesApplyConfiguration) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration
WithMatchResources sets the MatchResources field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the MatchResources field is set to the value of the last call.
func (*ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithParamRef ¶
func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithParamRef(value *ParamRefApplyConfiguration) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration
WithParamRef sets the ParamRef field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ParamRef field is set to the value of the last call.
func (*ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithPolicyName ¶
func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithPolicyName(value string) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration
WithPolicyName sets the PolicyName field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the PolicyName field is set to the value of the last call.
func (*ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithValidationActions ¶
func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithValidationActions(values ...admissionregistrationv1alpha1.ValidationAction) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration
WithValidationActions adds the given value to the ValidationActions field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the ValidationActions field.
type ValidatingAdmissionPolicySpecApplyConfiguration ¶
type ValidatingAdmissionPolicySpecApplyConfiguration struct {
// 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.
ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"`
// 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.
MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"`
// 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.
Validations []ValidationApplyConfiguration `json:"validations,omitempty"`
// 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.
FailurePolicy *admissionregistrationv1alpha1.FailurePolicyType `json:"failurePolicy,omitempty"`
// 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.
AuditAnnotations []AuditAnnotationApplyConfiguration `json:"auditAnnotations,omitempty"`
// 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
MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"`
// 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.
Variables []VariableApplyConfiguration `json:"variables,omitempty"`
}
ValidatingAdmissionPolicySpecApplyConfiguration represents a declarative configuration of the ValidatingAdmissionPolicySpec type for use with apply.
ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.
func ValidatingAdmissionPolicySpec ¶
func ValidatingAdmissionPolicySpec() *ValidatingAdmissionPolicySpecApplyConfiguration
ValidatingAdmissionPolicySpecApplyConfiguration constructs a declarative configuration of the ValidatingAdmissionPolicySpec type for use with apply.
func (*ValidatingAdmissionPolicySpecApplyConfiguration) WithAuditAnnotations ¶
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithAuditAnnotations(values ...*AuditAnnotationApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration
WithAuditAnnotations adds the given value to the AuditAnnotations field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the AuditAnnotations field.
func (*ValidatingAdmissionPolicySpecApplyConfiguration) WithFailurePolicy ¶
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithFailurePolicy(value admissionregistrationv1alpha1.FailurePolicyType) *ValidatingAdmissionPolicySpecApplyConfiguration
WithFailurePolicy sets the FailurePolicy field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the FailurePolicy field is set to the value of the last call.
func (*ValidatingAdmissionPolicySpecApplyConfiguration) WithMatchConditions ¶
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithMatchConditions(values ...*MatchConditionApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration
WithMatchConditions adds the given value to the MatchConditions field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the MatchConditions field.
func (*ValidatingAdmissionPolicySpecApplyConfiguration) WithMatchConstraints ¶
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithMatchConstraints(value *MatchResourcesApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration
WithMatchConstraints sets the MatchConstraints field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the MatchConstraints field is set to the value of the last call.
func (*ValidatingAdmissionPolicySpecApplyConfiguration) WithParamKind ¶
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithParamKind(value *ParamKindApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration
WithParamKind sets the ParamKind field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ParamKind field is set to the value of the last call.
func (*ValidatingAdmissionPolicySpecApplyConfiguration) WithValidations ¶
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithValidations(values ...*ValidationApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration
WithValidations adds the given value to the Validations field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Validations field.
func (*ValidatingAdmissionPolicySpecApplyConfiguration) WithVariables ¶
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithVariables(values ...*VariableApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration
WithVariables adds the given value to the Variables field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Variables field.
type ValidatingAdmissionPolicyStatusApplyConfiguration ¶
type ValidatingAdmissionPolicyStatusApplyConfiguration struct {
// observedGeneration is the generation observed by the controller.
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
// typeChecking contains the results of type checking for each expression.
// Presence of this field indicates the completion of the type checking.
TypeChecking *TypeCheckingApplyConfiguration `json:"typeChecking,omitempty"`
// conditions represent the latest available observations of a policy's current state.
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
}
ValidatingAdmissionPolicyStatusApplyConfiguration represents a declarative configuration of the ValidatingAdmissionPolicyStatus type for use with apply.
ValidatingAdmissionPolicyStatus represents the status of a ValidatingAdmissionPolicy.
func ValidatingAdmissionPolicyStatus ¶
func ValidatingAdmissionPolicyStatus() *ValidatingAdmissionPolicyStatusApplyConfiguration
ValidatingAdmissionPolicyStatusApplyConfiguration constructs a declarative configuration of the ValidatingAdmissionPolicyStatus type for use with apply.
func (*ValidatingAdmissionPolicyStatusApplyConfiguration) WithConditions ¶
func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *ValidatingAdmissionPolicyStatusApplyConfiguration
WithConditions adds the given value to the Conditions field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Conditions field.
func (*ValidatingAdmissionPolicyStatusApplyConfiguration) WithObservedGeneration ¶
func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithObservedGeneration(value int64) *ValidatingAdmissionPolicyStatusApplyConfiguration
WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ObservedGeneration field is set to the value of the last call.
func (*ValidatingAdmissionPolicyStatusApplyConfiguration) WithTypeChecking ¶
func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithTypeChecking(value *TypeCheckingApplyConfiguration) *ValidatingAdmissionPolicyStatusApplyConfiguration
WithTypeChecking sets the TypeChecking field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the TypeChecking field is set to the value of the last call.
type ValidationApplyConfiguration ¶
type ValidationApplyConfiguration struct {
// 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.
Expression *string `json:"expression,omitempty"`
// 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}".
Message *string `json:"message,omitempty"`
// 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.
Reason *v1.StatusReason `json:"reason,omitempty"`
// 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)+")"
MessageExpression *string `json:"messageExpression,omitempty"`
}
ValidationApplyConfiguration represents a declarative configuration of the Validation type for use with apply.
Validation specifies the CEL expression which is used to apply the validation.
func Validation ¶
func Validation() *ValidationApplyConfiguration
ValidationApplyConfiguration constructs a declarative configuration of the Validation type for use with apply.
func (*ValidationApplyConfiguration) WithExpression ¶
func (b *ValidationApplyConfiguration) WithExpression(value string) *ValidationApplyConfiguration
WithExpression sets the Expression field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Expression field is set to the value of the last call.
func (*ValidationApplyConfiguration) WithMessage ¶
func (b *ValidationApplyConfiguration) WithMessage(value string) *ValidationApplyConfiguration
WithMessage sets the Message field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Message field is set to the value of the last call.
func (*ValidationApplyConfiguration) WithMessageExpression ¶
func (b *ValidationApplyConfiguration) WithMessageExpression(value string) *ValidationApplyConfiguration
WithMessageExpression sets the MessageExpression field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the MessageExpression field is set to the value of the last call.
func (*ValidationApplyConfiguration) WithReason ¶
func (b *ValidationApplyConfiguration) WithReason(value v1.StatusReason) *ValidationApplyConfiguration
WithReason sets the Reason field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Reason field is set to the value of the last call.
type VariableApplyConfiguration ¶
type VariableApplyConfiguration struct {
// 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`
Name *string `json:"name,omitempty"`
// 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.
Expression *string `json:"expression,omitempty"`
}
VariableApplyConfiguration represents a declarative configuration of the Variable type for use with apply.
Variable is the definition of a variable that is used for composition.
func Variable ¶
func Variable() *VariableApplyConfiguration
VariableApplyConfiguration constructs a declarative configuration of the Variable type for use with apply.
func (*VariableApplyConfiguration) WithExpression ¶
func (b *VariableApplyConfiguration) WithExpression(value string) *VariableApplyConfiguration
WithExpression sets the Expression field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Expression field is set to the value of the last call.
func (*VariableApplyConfiguration) WithName ¶
func (b *VariableApplyConfiguration) WithName(value string) *VariableApplyConfiguration
WithName sets the Name field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Name field is set to the value of the last call.
Source Files ¶
applyconfiguration.go auditannotation.go expressionwarning.go jsonpatch.go matchcondition.go matchresources.go mutatingadmissionpolicy.go mutatingadmissionpolicybinding.go mutatingadmissionpolicybindingspec.go mutatingadmissionpolicyspec.go mutation.go namedrulewithoperations.go paramkind.go paramref.go typechecking.go validatingadmissionpolicy.go validatingadmissionpolicybinding.go validatingadmissionpolicybindingspec.go validatingadmissionpolicyspec.go validatingadmissionpolicystatus.go validation.go variable.go
- Version
- v0.36.0 (latest)
- Published
- Apr 22, 2026
- Platform
- linux/amd64
- Imports
- 8 packages
- Last checked
- 3 minutes ago –
Tools for package owners.