-
Notifications
You must be signed in to change notification settings - Fork 853
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
feat: support all valid jsonpatches in validation webhook #9476
Conversation
Thanks for opening your first Pull Request here! Please check out our Contributing guidelines and confirm that you Signed off. |
Signed-off-by: Lukas Wöhrl <lukas.woehrl@plentymarkets.com>
46745d6
to
731e8c8
Compare
Thanks @woehrl01 ! |
@eddycharly Absolutely, in our policy I could make use of the Potential rule: mutate:
patchesJson6902: |-
- op: move
from: /spec/containers/0/resources
path: /tmp/keepResources
- op: add
path: /spec/containers
value: {{ context.containers || `[]` }}
- op: move
from: /tmp/keepResources
path: /spec/containers/0/resources |
Sounds good, thanks for clarifying it. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #9476 +/- ##
==========================================
- Coverage 32.83% 32.82% -0.01%
==========================================
Files 326 326
Lines 26191 26193 +2
==========================================
Hits 8599 8599
- Misses 16794 16796 +2
Partials 798 798 ☔ View full report in Codecov by Sentry. |
Congratulations! 🎉Great job merging your first Pull Request here! How awesome! If you are new to this project, feel free to join our Slack community |
Explanation
This PR modifies the validation webhook so that JsonPatches can be of all valid JsonPatches operations. Adding "move", "copy" and "test"
Related issue
Milestone of this PR
Documentation (optional)
My PR contains new or altered behavior to Kyverno.
What type of PR is this
Proposed Changes
Proof Manifests
Checklist
Further Comments