-
Notifications
You must be signed in to change notification settings - Fork 779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: document mutations name matcher #2168
fix: document mutations name matcher #2168
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also modify the same docs in https://github.com/open-policy-agent/gatekeeper/tree/master/website/versioned_docs?
Done :) |
@@ -73,6 +73,7 @@ The `match` section is common to all mutators. It supports the following match c | |||
- namespaces - list of allowed namespaces, only resources in listed namespaces will be mutated | |||
- namespaceSelector - filters resources by namespace selector | |||
- excludedNamespaces - list of excluded namespaces, resources in listed namespaces will not be mutated | |||
- name - the name of an object. If defined, it matches against objects with the specified name. Name also supports a prefix-based glob. For example, `name: pod-*` matches both `pod-a` and `pod-b`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add this to yaml example above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've pushed it there. Does that look like what you meant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also added to example in the versioned_docs
@@ -70,6 +70,7 @@ The `match` section is common to both Assign and AssignMetadata. It supports the | |||
- namespaces - list of allowed namespaces, only resources in listed namespaces will be mutated | |||
- namespaceSelector - filters resources by namespace selector | |||
- excludedNamespaces - list of excluded namespaces, resources in listed namespaces will not be mutated | |||
- name - the name of an object. If defined, it matches against objects with the specified name. Name also supports a prefix-based glob. For example, `name: pod-*` matches both `pod-a` and `pod-b`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like #1542 was added for v3.7.0+. Let's remove it for 3.6 docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should only be added for version-v3.7.x
, version-v3.8.x
and version-v3.9.x
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I think I misunderstood what was meant here. I've updated again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Nicholas Blott <blottn@tcd.ie>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for the PR!
What this PR does / why we need it:
Documents the name matcher which exists and functions but is unmentioned in the mutations documents.
Which issue(s) this PR fixes (optional, using
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when the PR gets merged):N/A
Uncertain if I should also go and add this to the versioned docs. Would that be the right thing to do here?