Skip to content
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

Merged
merged 2 commits into from Jul 30, 2022
Merged

fix: document mutations name matcher #2168

merged 2 commits into from Jul 30, 2022

Conversation

blottn
Copy link
Contributor

@blottn blottn commented Jul 14, 2022

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?

Copy link
Member

@chewong chewong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blottn
Copy link
Contributor Author

blottn commented Jul 15, 2022

Done :)

chewong
chewong previously approved these changes Jul 15, 2022
@@ -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`.
Copy link
Member

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?

Copy link
Contributor Author

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?

Copy link
Contributor Author

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

@chewong chewong dismissed their stale review July 15, 2022 18:30

See comment above

@@ -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`.
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

@ritazh ritazh left a 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>
@ritazh ritazh requested a review from maxsmythe July 26, 2022 23:16
Copy link
Contributor

@maxsmythe maxsmythe left a 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!

@maxsmythe maxsmythe merged commit 20aa6c4 into open-policy-agent:master Jul 30, 2022
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.

None yet

5 participants