More configuration options for the validatingwebhookconfiguration #64
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Deploying this chart with GitOps operator (like Rancher's fleet) may cause some dissonance between the generated Manifests for the
ValidatingWebhookConfiguration
and the actual object, which has some additional fields present in itsspec
field.Even though those fields are the sensible defaults today, the GitOps operator just does a simple diff between the expected helm-chart based manifest and the actual manifest and it's spotting a difference.
Adding those fields to the chart and also being able to manipulate them is something that serves a double purpose. Avoid the bug with any GitOps operators who can't do diffs and also allow our users to change the values of the validatingwebhookconfiguration, if needed.
More details
A diff between the expected (what's generated from helm) and what's running shows what's missing. The metadata fields are ignored of course, but the spec isn't always ignored by fleet:
It can be argued, that is more of a fleet issue rather than a cosignwebhook per se, but adding the modification possibility to some of those fields is a quick and simple win.
Changes
Tests done
Signed-off-by: Bruno Bressi [email protected]