Class V1ValidatingAdmissionPolicySpec
java.lang.Object
io.kubernetes.client.openapi.models.V1ValidatingAdmissionPolicySpec
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2025-02-12T23:08:31.638427Z[Etc/UTC]")
public class V1ValidatingAdmissionPolicySpec
extends Object
ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAuditAnnotationsItem
(V1AuditAnnotation auditAnnotationsItem) addMatchConditionsItem
(V1MatchCondition matchConditionsItem) addValidationsItem
(V1Validation validationsItem) addVariablesItem
(V1Variable variablesItem) auditAnnotations
(List<V1AuditAnnotation> auditAnnotations) boolean
failurePolicy
(String failurePolicy) 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.failurePolicy defines how to handle failures for the admission policy.MatchConditions is a list of conditions that must be met for a request to be validated.Get matchConstraintsGet paramKindValidations contain CEL expressions which is used to apply the validation.Variables contain definitions of variables that can be used in composition of other expressions.int
hashCode()
matchConditions
(List<V1MatchCondition> matchConditions) matchConstraints
(V1MatchResources matchConstraints) paramKind
(V1ParamKind paramKind) void
setAuditAnnotations
(List<V1AuditAnnotation> auditAnnotations) void
setFailurePolicy
(String failurePolicy) void
setMatchConditions
(List<V1MatchCondition> matchConditions) void
setMatchConstraints
(V1MatchResources matchConstraints) void
setParamKind
(V1ParamKind paramKind) void
setValidations
(List<V1Validation> validations) void
setVariables
(List<V1Variable> variables) toString()
validations
(List<V1Validation> validations) variables
(List<V1Variable> variables)
-
Field Details
-
SERIALIZED_NAME_AUDIT_ANNOTATIONS
- See Also:
-
SERIALIZED_NAME_FAILURE_POLICY
- See Also:
-
SERIALIZED_NAME_MATCH_CONDITIONS
- See Also:
-
SERIALIZED_NAME_MATCH_CONSTRAINTS
- See Also:
-
SERIALIZED_NAME_PARAM_KIND
- See Also:
-
SERIALIZED_NAME_VALIDATIONS
- See Also:
-
SERIALIZED_NAME_VARIABLES
- See Also:
-
-
Constructor Details
-
V1ValidatingAdmissionPolicySpec
public V1ValidatingAdmissionPolicySpec()
-
-
Method Details
-
auditAnnotations
-
addAuditAnnotationsItem
public V1ValidatingAdmissionPolicySpec addAuditAnnotationsItem(V1AuditAnnotation auditAnnotationsItem) -
getAuditAnnotations
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.- Returns:
- auditAnnotations
-
setAuditAnnotations
-
failurePolicy
-
getFailurePolicy
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.- Returns:
- failurePolicy
-
setFailurePolicy
-
matchConditions
-
addMatchConditionsItem
-
getMatchConditions
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- Returns:
- matchConditions
-
setMatchConditions
-
matchConstraints
-
getMatchConstraints
Get matchConstraints- Returns:
- matchConstraints
-
setMatchConstraints
-
paramKind
-
getParamKind
Get paramKind- Returns:
- paramKind
-
setParamKind
-
validations
-
addValidationsItem
-
getValidations
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.- Returns:
- validations
-
setValidations
-
variables
-
addVariablesItem
-
getVariables
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.- Returns:
- variables
-
setVariables
-
equals
-
hashCode
public int hashCode() -
toString
-