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

proposal: Add mutation support for the kyverno CLI #62

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aerosouund
Copy link

Proposal document that addresses kyverno/kyverno#4354

Signed-off-by: aerosouund <aerosound161@gmail.com>
proposals/mutation-support-cli.md Outdated Show resolved Hide resolved
proposals/mutation-support-cli.md Outdated Show resolved Hide resolved
proposals/mutation-support-cli.md Show resolved Hide resolved
proposals/mutation-support-cli.md Outdated Show resolved Hide resolved
@aerosouund aerosouund force-pushed the mutate-cli-support branch 2 times, most recently from 949ffa6 to 53d64b3 Compare September 30, 2024 12:47
proposals/mutation-support-cli.md Outdated Show resolved Hide resolved
request.operation: UPDATE
```

The `targetResources` key will be added, with an array of objects containing two keys: name (a string) and values (a `map[string]interface{}`).
Copy link
Member

Choose a reason for hiding this comment

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

You need an unique identifier for the target resource. Having the name only could cause the confusion if two resources are with the same name but different namespaces.

Copy link
Author

Choose a reason for hiding this comment

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

This is how currently resources are being identified for policy variables as well.
We can improve this by adding a namespace variable to this schema. This will apply to target resource variables and policy variables

Copy link
Member

Choose a reason for hiding this comment

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

The current solution needs to be improved. Though this is not a major use case, duplicate resource names could be provided to the CLI.

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, which is why i was kinda reluctant to consider this case. because it's already a pretty niche case and i didn't know if the complexity of the change will equal the value gained from addressing it.
I will include it and we can change it back later

Signed-off-by: aerosouund <aerosound161@gmail.com>
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