Missing namespace on Helm manifests cause issues with Kustomize
Nobody has claimed this yet.
- Dominant language
- Go Template
- Stars
- 534
- Forks
- 314
- Avg merge
- 42m
- Merged PRs (30d)
- 1
Description
Many Helm resources do not specify the namespace, which can cause issues with Kustomize in some deployments. I have to add it at the "top" level, which automatically applies the desired namespace to all Kustomize resources. Unfortunately, I have a few resources that have to be applied to a different namespace, which this breaks.
I have highlighted the issue in my Nextcloud deployment manifests: : https://github.com/kenlasko/k8s/blob/main/manifests/apps/nextcloud/base/kustomization.yaml
I should be able to define the namespace at the Helm chart level and it should apply the namespace to all namespaced resources.
I recommend that:
namespace: {{ .Release.namespace }}
be added to all namespaced resources, such as:
- deployment
- secret
- service
- serviceAccount
I'd offer to do this myself, but I'm not a developer and not familiar with the process to do such things.
EDIT: Think I managed to submit a pull request to fix this for all objects. Crossing fingers!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the chart's Helm templates for the namespaced resources listed in the issue, then compare their rendered output with the linked Nextcloud kustomization.yaml. Done means namespaced resources receive the Helm release namespace so Kustomize can preserve different namespaces where needed, while the chart's other objects remain correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100