helm icon indicating copy to clipboard operation
helm copied to clipboard

Missing namespace on Helm manifests cause issues with Kustomize

Open kenlasko opened this issue 4 months ago • 0 comments

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!

kenlasko avatar Oct 21 '25 15:10 kenlasko