Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing namespace in Helm templates #358

Open
andridzi opened this issue Jan 27, 2025 · 2 comments
Open

Missing namespace in Helm templates #358

andridzi opened this issue Jan 27, 2025 · 2 comments

Comments

@andridzi
Copy link
Contributor

There is a namespace field missing for namespaced objects in Helm templates (for example in Deployment template).

Was it done for some reason or can be easily added? (namespace: {{ .Release.Namespace }})

@djeebus
Copy link
Collaborator

djeebus commented Jan 27, 2025

Normally it gets added by helm, no? It's not omitted for strong reasons, just felt it was unnecessary. In what situation is this causing issues?

@andridzi
Copy link
Contributor Author

andridzi commented Jan 27, 2025

if you're using kustomize build --enable helm it will produce manifests without the namespace.
And if namespace field will be set in kustomization.yaml, it will affect Role/Rolebinding namespace and {{ .Values.argocd.namespace }} will be overriden.

UPD: found the way how to workaround this, but still will be nice to have

transformers:
  - |-
    apiVersion: builtin
    kind: NamespaceTransformer
    metadata:
      name: add-missing-namespace
      namespace: kubechecks
    unsetOnly: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants