MatchResources class
MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded).
Constructors
-
MatchResources({List<
NamedRuleWithOperations> ? excludeResourceRules, String? matchPolicy, LabelSelector? namespaceSelector, LabelSelector? objectSelector, List<NamedRuleWithOperations> ? resourceRules}) -
Default constructor.
const
-
MatchResources.fromJson(Map<
String, dynamic> json) -
Creates a MatchResources from JSON data.
factory
Properties
-
excludeResourceRules
→ List<
NamedRuleWithOperations> ? -
ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- matchPolicy → String?
-
matchPolicy defines how the "MatchResources" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".
final
- namespaceSelector → LabelSelector?
-
NamespaceSelector decides whether to run the admission control policy on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the policy.
final
- objectSelector → LabelSelector?
-
ObjectSelector decides whether to run the validation based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the cel validation, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.
final
-
resourceRules
→ List<
NamedRuleWithOperations> ? -
ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches any Rule.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object> - Converts a MatchResources instance to JSON data.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited