-
Notifications
You must be signed in to change notification settings - Fork 73
feat: introduce namespaceOverride #126
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
base: main
Are you sure you want to change the base?
feat: introduce namespaceOverride #126
Conversation
Extended the Helm chart to allow for a namespace override via the new `namespaceOverride` value. This ensures that a custom namespace can be specified and used, otherwise defaults to the release namespace. This update enhances deployment flexibility in different Kubernetes environments.
Hi @khaledCNTXT! helm install localstack localstack/localstack -n this-is-my-custom-namespace --create-namespace |
Hi @alexrashed |
Interesting. Helm would use the same namespace for dependencies as well, so why wouldn't LocalStack as a dependency of the chart you mentioned not be installed in the same? Maybe the chart you mean has some special namespace handling? |
We have a Helm chart with multiple dependencies as follows:
Key Points:
|
Interesting, thanks a lot for the explanation. I can see that this can be useful, and it seems to be a somewhat-best-practice used in multiple charts. In fact, there's a utility function in I would suggest to modify your PR such that:
What do you think? |
sure i will update the PR |
I reviewed the documentation at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed the documentation at
https://github.com/novuhq/community-k8s/tree/fb860df320ee6b47cc109355aa1e117b16cc5d1b/helm
and it appears that common.names.namespace is not a valid option for us to use. Is there something I might be missing
I am not sure what you mean by that to be honest. We - same as the novu
chart - both have the bitnami commons chart in our dependencies. Novu already uses the common.names.namespace
in their chart (as linked above). We could do the exact same thing (see the suggested change in the comment).
Does that answer your question?
Updated various Kubernetes resource templates to use the 'common.names.namespace' helper instead of '.Release.Namespace'. This change standardizes the namespace declaration across all templates for consistency and maintainability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a bit of a misunderstanding. I tried to explain that in the comments, but imho you should be able to just remove the two sections I commented on, and it should work just fine with the value you initially proposed (namespaceOverride
).
Would you mind giving this a try? Do you have any questions on that? :)
charts/localstack/values.yaml
Outdated
common: | ||
names: | ||
namespaces: "" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we can use common.names.namespaces from the subchart, this isn't necessary:
common: | |
names: | |
namespaces: "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry it took a while to pick this PR up again, it slipped through because you didn't re-request a review (see step 5 in this GitHub doc).
The chagnes are looking good, but there are still two templates that do not use the new way to determine the namespace to deploy the resource in:
charts/localstack/templates/tests/test-connection.yaml
(line 6)charts/localstack/templates/tests/test-s3.yaml
(line 6)
If you change these two lines, we are good to go! I already tested this locally on my machine.
If you want, I can also take this PR over, but right now I am not allowed to push changes to your PR.
@khaledCNTXT do you think you will have the capacity to fix the last two issues highlighted in the comment above? |
Motivation
Extended the Helm chart to allow for a namespace override via the new
namespaceOverride
value. This ensures that a custom namespace can be specified and used, otherwise defaults to the release namespace. This update enhances deployment flexibility in different Kubernetes environments.Changes
add namespaceOverride to Values