-
Notifications
You must be signed in to change notification settings - Fork 70
Add namespace metadata option in templates #247
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?
Conversation
This sets the namespace key in metadata for all kubernetes manifests. The `.Release.Namespace` is a built-in variable in helm, that can be passed with` --namespace` on `install` or `template` step. If not set it defaults to `default`. *Why?* When using `helm install` with the `--namespace` argument the templates are applied into the chosen namespace. When using helm only as a template engine, in combination with GitOps tools like Flux, the namespace property must be set in the rendered manifests to be applied. For `--namespace` to have an effect when using `helm template`, it must be present like this in the templates. This change should not have any effect/change for `helm install` approach as far as I know.
@meilisearch sync-manifest |
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.
bors merge
Thanks for this improvement @MannerMan :)
247: Add namespace metadata option in templates r=brunoocasali a=MannerMan This sets the namespace key in metadata for all kubernetes manifests. The `.Release.Namespace` is a built-in variable in helm, that can be passed with `--namespace` on `install` or `template` step. If not set it defaults to `default`. **Why?** When using `helm install` with the `--namespace` argument the templates are applied into the chosen namespace. When using helm only as a template engine, in combination with GitOps tools like Flux, the namespace property must be set in the rendered manifests to be applied. For `--namespace` to have an effect when using `helm template`, it must be present like this in the templates. This change should not have any effect/change for `helm install` approach as far as I know. # Pull Request ## Related issue Possibly a fix for #230 ## What does this PR do? - Sets the namespace key in metadata for all kubernetes manifests ## PR checklist Please check if your PR fulfills the following requirements: - [ x ] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [ x ] Have you read the contributing guidelines? - [ x ] Have you made sure that the title is accurate and descriptive of the changes? Co-authored-by: Oscar <oscar@eth1.nu> Co-authored-by: Bruno Casali <brunoocasali@gmail.com> Co-authored-by: brunoocasali <brunoocasali@users.noreply.github.com>
Build failed: |
@brunoocasali or @MannerMan can you fix the conflict please? sorry for that |
This is a bit more complex than just fixing the conflicts @curquiza the change breaks the test, and I didn't find a solution at that time. I need to get back to this when I got some time :) |
This sets the namespace key in metadata for all kubernetes manifests. The
.Release.Namespace
is a built-in variable in helm, that can be passed with--namespace
oninstall
ortemplate
step. If not set it defaults todefault
.Why?
When using
helm install
with the--namespace
argument the templates are applied into the chosen namespace.When using helm only as a template engine, in combination with GitOps tools like Flux, the namespace property must be set in the rendered manifests to be applied. For
--namespace
to have an effect when usinghelm template
, it must be present like this in the templates.This change should not have any effect/change for
helm install
approach as far as I know.Pull Request
Related issue
Possibly a fix for #230
What does this PR do?
PR checklist
Please check if your PR fulfills the following requirements: