feat(agent,rapid-response): set metadata.namespace on all namespaced items #1259
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.
What this PR does / why we need it:
There were a handful of places in the charts related to
sysdig-deploy
where themetadata.namespace
field was not being explicitly set. This is works out fine as Helm will set those fields itself during thehelm install
process, but does not do so during a call tohelm template
. This has been found to cause issues with come CI platforms that generate manifest files viahelm template
and then apply them later withkubectl apply -f ...
. What has been observed is that these select CI platforms will patch the manifests of namespaced items that do not havemetadata.namespace
set, and will do so with an unexpected value. When the subsequentkubectl apply -f ...
command is run that supplies the desired namespace, the command fails because the namespace field is already set on these items and is different from what is being requested. This change ensures that all namespaced items have the values ofmetadata.namespace
explicitly set to prevent the above issue.Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
Check Contribution guidelines in README.md for more insight.