-
Notifications
You must be signed in to change notification settings - Fork 566
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
Namespace template doesn't render any value #351
Comments
@dtshepherd Hey! Thanks for the report. Yeah |
I wanted to use it to build a URL that includes the namespace. That value is used in my chart templates. |
@dtshepherd Makes sense! Meanwhile you can use something like below as a work-around: releases:
- name: myapp
# ...
set:
- name: foo.bar.ns
value: {{.Namespace}} |
Yeah once you said I could use in the helmfile, that pointed to a workaround. Thanks! |
Nice! Glad it worked for you. One gotcha is that So, do you expect releases:
- name: myapp
# ...
namespace: foo |
Yeah, that's a good point. Ideally, it would work that way. I'm not quite clear on the |
I'm after this functionality too - My use case is related to two different environments:
So for example
so it can be overriden with env vars if necessary, and then I refer to it like so:
Finally, this is how i'm trying to use
|
Is there a different workaround? I'm looking for a similar setup as @acaire and since it's quite a few settings with a substring of namespace (also release name) it's a bit heavy handed to set all of those specifically in the helmfile. |
Is there a way to get access to the namespace in ...
releases:
...
namespace: bla
values:
- namespace: bla
- values.gotmpl In the context of |
@Morriz I think you're confusing the context of We'll need what we're discussing in #745 in order to elegantly write it. Until then, #756 (comment) is the only known work-around. |
Even in helmfile.yaml I got the issue, except if I specify a The context I use got a namespace |
Yep, I could not find a way to pick the targeting namespace and use it on the values section. My use case is to specify the value for |
@daper Here's what works for me.
|
@mumoshu, as @Tlzps commented, it works when you specify the |
When I try to use
{{ .Namespace }}
in avalues.yaml.gotmpl
template, it just renders as an empty string. It doesn't throw an error. This happens if I lethelmfile
use the default namespace or specify a namespace override with--namespace
on the CLI.Maybe I'm missing something?
The text was updated successfully, but these errors were encountered: