pub struct ValidatingAdmissionPolicySpec {
pub failure_policy: Option<String>,
pub match_constraints: Option<MatchResources>,
pub param_kind: Option<ParamKind>,
pub validations: Vec<Validation>,
}
Expand description
ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.
Fields§
§failure_policy: Option<String>
FailurePolicy defines how to handle failures for the admission policy. Failures can occur from 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. Allowed values are Ignore or Fail. Defaults to Fail.
match_constraints: Option<MatchResources>
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.
param_kind: Option<ParamKind>
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.
validations: Vec<Validation>
Validations contain CEL expressions which is used to apply the validation. A minimum of one validation is required for a policy definition. Required.
Trait Implementations§
source§impl Clone for ValidatingAdmissionPolicySpec
impl Clone for ValidatingAdmissionPolicySpec
source§fn clone(&self) -> ValidatingAdmissionPolicySpec
fn clone(&self) -> ValidatingAdmissionPolicySpec
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl DeepMerge for ValidatingAdmissionPolicySpec
impl DeepMerge for ValidatingAdmissionPolicySpec
source§fn merge_from(&mut self, other: Self)
fn merge_from(&mut self, other: Self)
other
into self
.source§impl Default for ValidatingAdmissionPolicySpec
impl Default for ValidatingAdmissionPolicySpec
source§fn default() -> ValidatingAdmissionPolicySpec
fn default() -> ValidatingAdmissionPolicySpec
source§impl<'de> Deserialize<'de> for ValidatingAdmissionPolicySpec
impl<'de> Deserialize<'de> for ValidatingAdmissionPolicySpec
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
source§impl PartialEq<ValidatingAdmissionPolicySpec> for ValidatingAdmissionPolicySpec
impl PartialEq<ValidatingAdmissionPolicySpec> for ValidatingAdmissionPolicySpec
source§fn eq(&self, other: &ValidatingAdmissionPolicySpec) -> bool
fn eq(&self, other: &ValidatingAdmissionPolicySpec) -> bool
self
and other
values to be equal, and is used
by ==
.