Class ValidatingAdmissionPolicyBindingSpec
- java.lang.Object
-
- io.fabric8.kubernetes.api.model.admissionregistration.v1.ValidatingAdmissionPolicyBindingSpec
-
- All Implemented Interfaces:
io.fabric8.kubernetes.api.builder.Editable<ValidatingAdmissionPolicyBindingSpecBuilder>,io.fabric8.kubernetes.api.model.KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class ValidatingAdmissionPolicyBindingSpec extends Object implements io.fabric8.kubernetes.api.builder.Editable<ValidatingAdmissionPolicyBindingSpecBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ValidatingAdmissionPolicyBindingSpec()No args constructor for use in serializationValidatingAdmissionPolicyBindingSpec(MatchResources matchResources, ParamRef paramRef, String policyName, List<String> validationActions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValidatingAdmissionPolicyBindingSpecBuilderedit()Map<String,Object>getAdditionalProperties()MatchResourcesgetMatchResources()ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.ParamRefgetParamRef()ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.StringgetPolicyName()PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to.List<String>getValidationActions()validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetMatchResources(MatchResources matchResources)ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.voidsetParamRef(ParamRef paramRef)ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.voidsetPolicyName(String policyName)PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to.voidsetValidationActions(List<String> validationActions)validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced.ValidatingAdmissionPolicyBindingSpecBuildertoBuilder()
-
-
-
Constructor Detail
-
ValidatingAdmissionPolicyBindingSpec
public ValidatingAdmissionPolicyBindingSpec()
No args constructor for use in serialization
-
ValidatingAdmissionPolicyBindingSpec
public ValidatingAdmissionPolicyBindingSpec(MatchResources matchResources, ParamRef paramRef, String policyName, List<String> validationActions)
-
-
Method Detail
-
getMatchResources
public MatchResources getMatchResources()
ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
-
setMatchResources
public void setMatchResources(MatchResources matchResources)
ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
-
getParamRef
public ParamRef getParamRef()
ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
-
setParamRef
public void setParamRef(ParamRef paramRef)
ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
-
getPolicyName
public String getPolicyName()
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.
-
setPolicyName
public void setPolicyName(String policyName)
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.
-
getValidationActions
public List<String> getValidationActions()
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.
-
setValidationActions
public void setValidationActions(List<String> validationActions)
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.
-
edit
public ValidatingAdmissionPolicyBindingSpecBuilder edit()
- Specified by:
editin interfaceio.fabric8.kubernetes.api.builder.Editable<ValidatingAdmissionPolicyBindingSpecBuilder>
-
toBuilder
public ValidatingAdmissionPolicyBindingSpecBuilder toBuilder()
-
-