Skip to content

Set default values for matchConstraints - #20

Merged
naoki9911 merged 3 commits into
mainfrom
default-values
Jul 1, 2026
Merged

Set default values for matchConstraints#20
naoki9911 merged 3 commits into
mainfrom
default-values

Conversation

@naoki9911

Copy link
Copy Markdown
Collaborator

Configure matchConstraints default values for MAP and VAP.
This is a follow-up of #13

$ kubectl explain validatingadmissionpolicy.spec.matchConstraints
GROUP:      admissionregistration.k8s.io
KIND:       ValidatingAdmissionPolicy
VERSION:    v1

FIELD: matchConstraints <MatchResources>

...

FIELDS:
  ...
  matchPolicy   <string>
  enum: Equivalent, Exact
    ...
    
    Defaults to "Equivalent"
    ...

  namespaceSelector     <LabelSelector>
    ...
    
    Default to the empty LabelSelector, which matches everything.

  objectSelector        <LabelSelector>
    ...
    Default to the empty LabelSelector, which matches everything.
$ kubectl explain mutatingadmissionpolicy.spec.matchConstraints
GROUP:      admissionregistration.k8s.io
KIND:       MutatingAdmissionPolicy
VERSION:    v1beta1

FIELD: matchConstraints <MatchResources>


...
FIELDS:
   ...

  matchPolicy   <string>
    ...

    Defaults to "Equivalent"

  namespaceSelector     <LabelSelector>
    ...
    
    Default to the empty LabelSelector, which matches everything.

  objectSelector        <LabelSelector>
    ...
    Default to the empty LabelSelector, which matches everything.

naoki9911 added 3 commits July 1, 2026 09:54
These refelects defalut values
MatchPolicy: Equivalent
NamespaceSelector: emtpty LabelSelector
ObjectSelector: empty LabelSelector
These refelects defalut values
MatchPolicy: Equivalent
NamespaceSelector: emtpty LabelSelector
ObjectSelector: empty LabelSelector
@naoki9911
naoki9911 requested a review from superbrothers July 1, 2026 01:12
@naoki9911
naoki9911 merged commit ec4583c into main Jul 1, 2026
4 checks passed
@naoki9911
naoki9911 deleted the default-values branch July 1, 2026 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants