Class MatchResources
- java.lang.Object
-
- io.fabric8.kubernetes.api.model.admissionregistration.v1alpha1.MatchResources
-
- All Implemented Interfaces:
io.fabric8.kubernetes.api.builder.Editable<MatchResourcesBuilder>,io.fabric8.kubernetes.api.model.KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class MatchResources extends Object implements io.fabric8.kubernetes.api.builder.Editable<MatchResourcesBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
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)- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MatchResources()No args constructor for use in serializationMatchResources(List<NamedRuleWithOperations> excludeResourceRules, String matchPolicy, io.fabric8.kubernetes.api.model.LabelSelector namespaceSelector, io.fabric8.kubernetes.api.model.LabelSelector objectSelector, List<NamedRuleWithOperations> resourceRules)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MatchResourcesBuilderedit()Map<String,Object>getAdditionalProperties()List<NamedRuleWithOperations>getExcludeResourceRules()ExcludeResourceRules describes what operations on what resources/subresources the policy should not care about.StringgetMatchPolicy()matchPolicy defines how the "MatchResources" list is used to match incoming requests.io.fabric8.kubernetes.api.model.LabelSelectorgetNamespaceSelector()MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria.io.fabric8.kubernetes.api.model.LabelSelectorgetObjectSelector()MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria.List<NamedRuleWithOperations>getResourceRules()ResourceRules describes what operations on what resources/subresources the admission policy matches.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetExcludeResourceRules(List<NamedRuleWithOperations> excludeResourceRules)ExcludeResourceRules describes what operations on what resources/subresources the policy should not care about.voidsetMatchPolicy(String matchPolicy)matchPolicy defines how the "MatchResources" list is used to match incoming requests.voidsetNamespaceSelector(io.fabric8.kubernetes.api.model.LabelSelector namespaceSelector)MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria.voidsetObjectSelector(io.fabric8.kubernetes.api.model.LabelSelector objectSelector)MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria.voidsetResourceRules(List<NamedRuleWithOperations> resourceRules)ResourceRules describes what operations on what resources/subresources the admission policy matches.MatchResourcesBuildertoBuilder()
-
-
-
Constructor Detail
-
MatchResources
public MatchResources()
No args constructor for use in serialization
-
MatchResources
public MatchResources(List<NamedRuleWithOperations> excludeResourceRules, String matchPolicy, io.fabric8.kubernetes.api.model.LabelSelector namespaceSelector, io.fabric8.kubernetes.api.model.LabelSelector objectSelector, List<NamedRuleWithOperations> resourceRules)
-
-
Method Detail
-
getExcludeResourceRules
public List<NamedRuleWithOperations> getExcludeResourceRules()
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)
-
setExcludeResourceRules
public void setExcludeResourceRules(List<NamedRuleWithOperations> excludeResourceRules)
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)
-
getMatchPolicy
public String getMatchPolicy()
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"
-
setMatchPolicy
public void setMatchPolicy(String matchPolicy)
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"
-
getNamespaceSelector
public io.fabric8.kubernetes.api.model.LabelSelector getNamespaceSelector()
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)
-
setNamespaceSelector
public void setNamespaceSelector(io.fabric8.kubernetes.api.model.LabelSelector namespaceSelector)
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)
-
getObjectSelector
public io.fabric8.kubernetes.api.model.LabelSelector getObjectSelector()
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)
-
setObjectSelector
public void setObjectSelector(io.fabric8.kubernetes.api.model.LabelSelector objectSelector)
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)
-
getResourceRules
public List<NamedRuleWithOperations> getResourceRules()
ResourceRules describes what operations on what resources/subresources the admission policy matches. The policy cares about an operation if it matches _any_ Rule.
-
setResourceRules
public void setResourceRules(List<NamedRuleWithOperations> resourceRules)
ResourceRules describes what operations on what resources/subresources the admission policy matches. The policy cares about an operation if it matches _any_ Rule.
-
edit
public MatchResourcesBuilder edit()
- Specified by:
editin interfaceio.fabric8.kubernetes.api.builder.Editable<MatchResourcesBuilder>
-
toBuilder
public MatchResourcesBuilder toBuilder()
-
-