Skip to content

feat(helm): add namespace override capability for multi-namespace deployments#1640

Merged
Slach merged 1 commit intoAltinity:0.25.0from
bwdmr:namespaceoverride
Feb 25, 2025
Merged

feat(helm): add namespace override capability for multi-namespace deployments#1640
Slach merged 1 commit intoAltinity:0.25.0from
bwdmr:namespaceoverride

Conversation

@bwdmr
Copy link
Copy Markdown
Contributor

@bwdmr bwdmr commented Feb 17, 2025

Adds a new helper template "altinity-clickhouse-operator.namespace" that allows overriding the release namespace via Values.namespaceOverride. Updates all resource templates to use this helper instead of directly referencing .Release.Namespace. This change enables multi-namespace deployments in combined charts while maintaining backward compatibility.

@Slach Slach self-requested a review February 17, 2025 09:32
Copy link
Copy Markdown
Collaborator

@Slach Slach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look to dev/generate_helm_chart.sh

all templates/generated shall be changed from this script

@bwdmr bwdmr force-pushed the namespaceoverride branch from db20c8a to 7c412fb Compare February 21, 2025 06:24
…loyments

Adds a new helper template "altinity-clickhouse-operator.namespace" that allows
overriding the release namespace via Values.namespaceOverride. Updates all
resource templates to use this helper instead of directly referencing
.Release.Namespace. This change enables multi-namespace deployments in combined
charts while maintaining backward compatibility.
@bwdmr bwdmr force-pushed the namespaceoverride branch from 7c412fb to 3aa503c Compare February 21, 2025 06:27
@Slach Slach changed the base branch from master to 0.25.0 February 21, 2025 07:27
@Slach
Copy link
Copy Markdown
Collaborator

Slach commented Feb 21, 2025

Sorry for disturbing you again

Could you clarify?
What is the goal for these changes?

Do you want to install helm chart to some namespace but install rendered manifest to another namespace?
Why?

Which behavior you try to achieve?

If you want to change operator watched namespace for example and install operator in one namespace but watch custom resources in another namespaces

just change values.yaml

  files:
    config.yaml:
      # empty value will watch all namespaces
      namespaces: [""]

@bwdmr
Copy link
Copy Markdown
Contributor Author

bwdmr commented Feb 25, 2025

no, according to this issue: kubernetes-sigs/kustomize#5566
kustomize helm chart inflator is not capable of detecting the variable Release.Namespace
iirc it has something to do with the variable does not "really" exists, but this has been years ago so i am not totally sure on this. (i have to point it out twice, three times now and so on...)

what i want is compatibility across all current tooling to respect the namespace set for the helm chart to install the resources to. the only change current users would be affected of, is to define the namespace the operator should be installed to in the values.yaml instead of using the not detectable variable {{Release.Namespace}}

namespaceOverride: ""

operator:
...

@Slach Slach merged commit 6bcda27 into Altinity:0.25.0 Feb 25, 2025
2 checks passed
@Slach
Copy link
Copy Markdown
Collaborator

Slach commented Feb 25, 2025

@bwdmr thanks for contribution

Slach added a commit that referenced this pull request Feb 25, 2025
@Slach Slach mentioned this pull request Feb 25, 2025
3 tasks
Slach added a commit that referenced this pull request Feb 25, 2025
Slach added a commit that referenced this pull request Feb 26, 2025
Slach added a commit that referenced this pull request Feb 26, 2025
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.

2 participants