Class MatchCondition
- java.lang.Object
-
- io.fabric8.kubernetes.api.model.admissionregistration.v1beta1.MatchCondition
-
- All Implemented Interfaces:
io.fabric8.kubernetes.api.builder.Editable<MatchConditionBuilder>,io.fabric8.kubernetes.api.model.KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class MatchCondition extends Object implements io.fabric8.kubernetes.api.builder.Editable<MatchConditionBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
MatchCondition represents a condition which must be fulfilled for a request to be sent to a webhook.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MatchCondition()No args constructor for use in serializationMatchCondition(String expression, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MatchConditionBuilderedit()Map<String,Object>getAdditionalProperties()StringgetExpression()Expression represents the expression which will be evaluated by CEL.StringgetName()Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetExpression(String expression)Expression represents the expression which will be evaluated by CEL.voidsetName(String name)Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes.MatchConditionBuildertoBuilder()
-
-
-
Method Detail
-
getExpression
public String getExpression()
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.
-
setExpression
public void setExpression(String expression)
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.
-
getName
public String getName()
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.
-
setName
public void setName(String name)
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.
-
edit
public MatchConditionBuilder edit()
- Specified by:
editin interfaceio.fabric8.kubernetes.api.builder.Editable<MatchConditionBuilder>
-
toBuilder
public MatchConditionBuilder toBuilder()
-
-