Hide `release plan` diffs for chosen fields
Before proceeding
- [x] I didn't find a similar issue
Problem
Need a way to ignore some changes in "nelm release plan install" diff. Helm has --suppress-output-line-regex flag for that. It would be perfect if resource will be completely hidden from diff when it only differs by lines suppressed by this option.
Solution (if you have one)
No response
Additional information
No response
Can be solved with annotation like werf.io/no-diff-paths: $.spec.template.spec.containers[*].env[*].value, which will allow to hide some fields of the resources, or resources as a whole, from release plan diff output.
This is a long-awaited feature. Would really appreciate the implementation! @ilya-lesikov variant looks good.
We've recently added werf.io/sensitive-paths, which is probably exactly what you need. I guess I can close this issue.
The werf.io/sensitive-paths label is for masking sensitive data without being able to see that it was changed. A very useful feature, we use it, but for other scenarios.
I would really like to hide from the release plan report usual changes that occur with every project deployment. For example, if only $.spec.template.spec.containers[*].image changed in the plan, then hide these changes and not display them in diff.
This would make it more visible when unusual changes occur, allowing for faster plan reviews and more focused analysis.
Sure, +1 for previous post, we need to completely hide some changes as if they doesn't exist at all. Here is how helm diff does it:
test, web-app, ExternalSecret (external-secrets.io) has changed:
Just one line about a change, with empty content part.
And here is nelm:
┌ Update ExternalSecret/web-app
│ kind: ExternalSecret
│ metadata:
│ annotations:
│ - force-sync: SENSITIVE (19 bytes, aa42432d7a8d)
│ + force-sync: SENSITIVE (19 bytes, 0743801c1b95)
│ labels:
│ app: web-app
│ app.kubernetes.io/instance: preprod
└ Update ExternalSecret/web-app
The task initially was to hide all of these lines.
It may be acceptable like:
┌ Update ExternalSecret/web-app
│ <hidden insignificant changes>
└ Update ExternalSecret/web-app
but definitely not as werf.io/sensitive-paths annotation does
Alright, reopening.
From the technical standpoint we just need to hide matching paths from both objects before we diff them. It will then automatically produce a diff like this if no other changes:
┌ Update ExternalSecret/web-app
│ <hidden insignificant changes>
└ Update ExternalSecret/web-app
Basically we already do this for werf.io and most helm.sh annotations, it's just hardcoded.