Skip to content

Conversation

@ElayGelbart
Copy link

Thanks for submitting a PR! Please check the boxes below:

  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?

Changes

Added namespaceOverride support to allow deploying Flagsmith to a specific namespace when used as a sub-chart.

Closes #452

  • Added flagsmith.namespace helper in _helpers.tpl that returns namespaceOverride if set, otherwise falls back to .Release.Namespace
  • Updated all resource templates to use {{ include "flagsmith.namespace" . }} for the namespace field

How did you test this code?

  1. Added the Flagsmith chart as a dependency in a parent chart:
   # Chart.yaml
   dependencies:
     - name: flagsmith
       version: "x.x.x"
       repository: "file://../flagsmith"
  1. Set the namespace override in the parent chart's values:
   # values.yaml
   flagsmith:
     namespaceOverride: "flagsmith-ns"
  1. Ran helm template and verified all Flagsmith resources have namespace: flagsmith-ns in their metadata

  2. Deployed to minikube and verified all resources are created in the correct namespace and functioning properly

  3. Verified default behavior (without namespaceOverride) still uses the release namespace

@ElayGelbart ElayGelbart requested a review from a team as a code owner December 29, 2025 14:09
@ElayGelbart ElayGelbart requested review from khvn26 and removed request for a team December 29, 2025 14:09
@ElayGelbart
Copy link
Author

@khvn26

@khvn26
Copy link
Member

khvn26 commented Jan 6, 2026

Hi @ElayGelbart, thanks for your contribution, and for the nudge.

Is overriding namespaces like this a common pattern in Helm world? I was under the impression that additional templating/orchestration is used when users need to deploy to multiple namespaces, e.g. Helmfile.

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.

Add namespaceOverride support for sub-chart deployments

2 participants