Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 3.09 KB

File metadata and controls

32 lines (25 loc) · 3.09 KB

V1alpha1MatchResources

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)

Properties

Name Type Description Notes
exclude_resource_rules List[V1alpha1NamedRuleWithOperations] excludeResourceRules describes what operations on what resources/subresources the policy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded) [optional]
match_policy str matchPolicy defines how the "MatchResources" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, the admission policy does not consider requests to apps/v1beta1 or extensions/v1beta1 API groups. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, the admission policy does consider requests made to apps/v1beta1 or extensions/v1beta1 API groups. The API server translates the request to a matched resource API if necessary. Defaults to "Equivalent" [optional]
namespace_selector V1LabelSelector [optional]
object_selector V1LabelSelector [optional]
resource_rules List[V1alpha1NamedRuleWithOperations] resourceRules describes what operations on what resources/subresources the admission policy matches. The policy cares about an operation if it matches any Rule. [optional]

Example

from kubernetes.client.models.v1alpha1_match_resources import V1alpha1MatchResources

# TODO update the JSON string below
json = "{}"
# create an instance of V1alpha1MatchResources from a JSON string
v1alpha1_match_resources_instance = V1alpha1MatchResources.from_json(json)
# print the JSON string representation of the object
print(V1alpha1MatchResources.to_json())

# convert the object into a dict
v1alpha1_match_resources_dict = v1alpha1_match_resources_instance.to_dict()
# create an instance of V1alpha1MatchResources from a dict
v1alpha1_match_resources_from_dict = V1alpha1MatchResources.from_dict(v1alpha1_match_resources_dict)

[Back to Model list] [Back to API list] [Back to README]