-
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
inner templates context #817
Comments
@mumoshu do you have any advice for such use case please ? |
Nope! It isn't possible. We're discussing about a potential feature to allow you to pass arbitrary context to templates in #745. See |
@mumoshu thanks for clarifying it out. |
@eddycharly Adding |
@mumoshu i could write something like :
This way i can control the inner template processing and context. |
Ah that makes sense! You need
|
Ah, see #504 - It seems like we already have |
Not sure if i need to indent as it is manipulating objects but even if we need to specify the correct indent that's not a big deal, we do this with helm all the time. |
It is manipulating objects to be rendered as text. Please note that Helmfile templates are rendered before loading |
Makes sense :) As we already have |
I'm testing it right now, it seems to be working, i just need to make an additionnal test to ensure it's working the same way as in helm and come back to you. |
@mumoshu it's almost working ;)
In the inner template, we should be able to refer to the root context by prefixing the accessor with The |
@eddycharly Can you try And based on my knowledge about how |
@mumoshu I looked through the helm source code and i don't see anyting related to the root context i was talking about, i guess i was wrong. |
I close this issue, all is clear and already implemented. |
Is it possible to pass a context to an inner template ?
My use case is like this :
In
alb.yaml.gotmpl
i have :So i need to access
$ingress
, that is, the current element that is processed in the main helmfile.yaml file.The text was updated successfully, but these errors were encountered: