Struct k8s_openapi::api::admissionregistration::v1::MatchCondition
source · pub struct MatchCondition {
pub expression: String,
pub name: String,
}
Expand description
MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook.
Fields§
§expression: String
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.
name: String
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.
Trait Implementations§
source§impl Clone for MatchCondition
impl Clone for MatchCondition
source§fn clone(&self) -> MatchCondition
fn clone(&self) -> MatchCondition
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MatchCondition
impl Debug for MatchCondition
source§impl DeepMerge for MatchCondition
impl DeepMerge for MatchCondition
source§fn merge_from(&mut self, other: Self)
fn merge_from(&mut self, other: Self)
other
into self
.source§impl Default for MatchCondition
impl Default for MatchCondition
source§fn default() -> MatchCondition
fn default() -> MatchCondition
source§impl<'de> Deserialize<'de> for MatchCondition
impl<'de> Deserialize<'de> for MatchCondition
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 for MatchCondition
impl PartialEq for MatchCondition
source§impl Serialize for MatchCondition
impl Serialize for MatchCondition
impl StructuralPartialEq for MatchCondition
Auto Trait Implementations§
impl Freeze for MatchCondition
impl RefUnwindSafe for MatchCondition
impl Send for MatchCondition
impl Sync for MatchCondition
impl Unpin for MatchCondition
impl UnwindSafe for MatchCondition
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)