Skip to content

[kubitodev/servarr] Set explicit namespace on all rendered resources#68

Open
thiagocrepaldi wants to merge 1 commit into
kubitodev:mainfrom
thiagocrepaldi:feat/servarr-explicit-namespace
Open

[kubitodev/servarr] Set explicit namespace on all rendered resources#68
thiagocrepaldi wants to merge 1 commit into
kubitodev:mainfrom
thiagocrepaldi:feat/servarr-explicit-namespace

Conversation

@thiagocrepaldi

@thiagocrepaldi thiagocrepaldi commented Jul 10, 2026

Copy link
Copy Markdown

What

Adds namespace: {{ .Release.Namespace }} to the metadata of every template in the servarr chart (65 metadata blocks across 59 files), and bumps the chart version to 1.5.3 per the contributing guidelines.

Why

Plain helm install / helm upgrade users see no behavior change — helm already applies manifests into the release namespace, and .Release.Namespace resolves identically.

The change matters for render-then-apply pipelines, which are increasingly common:

The chart already uses .Release.Namespace in the jellyfin RoleBinding subjects, so this just applies the same pattern consistently. Several widely-used charts (metallb, argo-cd) set metadata namespace explicitly for the same reason.

Verification

  • helm lint passes.
  • helm template servarr . (no -n) → all docs render namespace: default, matching previous install-time behavior.
  • helm template servarr . -n media with a real-world values file (11 sub-apps enabled) → all 48 docs render namespace: media, including the RoleBinding subjects path with jellyfin.tailscale.enabled=true.
  • End-to-end repro of the kustomize bug: kustomize build --enable-helm (v5.8.1) over this chart previously produced 48 namespace-less objects; with this change every object, ingresses included, carries the release namespace.

Add namespace: {{ .Release.Namespace }} to the metadata of every
template. Plain `helm install`/`helm upgrade` behavior is unchanged
(helm already applies manifests into the release namespace), but the
rendered manifests now carry the namespace explicitly, which fixes
deployments through render-then-apply pipelines:

- kustomize `helmCharts` inflation: since kustomize v5.8.0 the
  `namespace:` transformer skips helm-generated resources
  (kubernetes-sigs/kustomize#6058), so charts that do not template
  .Release.Namespace end up in the kubectl default namespace.
- Argo CD / Flux and `helm template | kubectl apply` flows benefit the
  same way.

Verified with `helm lint`, `helm template` (with and without -n), and
a kustomize v5.8.1 build: all 48 rendered objects, ingresses included,
now land in the release namespace.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Thiago Crepaldi <thiago@thiagocrepaldi.com>
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

Successfully merging this pull request may close these issues.

1 participant