fix(helm): Set namespace on templates that does not contain a namespace#6108
fix(helm): Set namespace on templates that does not contain a namespace#6108Skaronator wants to merge 3 commits intokubernetes-sigs:masterfrom
Conversation
|
This PR has multiple commits, and the default merge method is: merge. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Hi @Skaronator. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
…erated resources Track namespace propagation for Helm-generated resources.
…related resources
550b572 to
6605d1b
Compare
…nd update related tests
1dcdb51 to
6ee2d4b
Compare
|
/ok-to-test |
mfredenhagen
left a comment
There was a problem hiding this comment.
Built from source and tested manually 👍
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: davinkevin, mfredenhagen, Skaronator The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This PR ensures a namespace is set on Helm-generated resources only if the field is completely missing. This fixes #6058 and fixes #6077 and provides the best of both worlds: Helm charts with pre-defined namespaces remain untouched, while charts lacking a namespace field now function as expected.
The namespace is now set in the following priority:
helmChart[].namespace(if set)namespacekustomization.yaml (If Set)We don't modify any Namespaces relevant fields outside the metadata block. Helm Charts should already take care of that. (e.g. spec field for ClusterRoleBinding)
Checked the issue in #6058 and it is fixed.
Checked the issue #6077 and it is fixed.