-
Notifications
You must be signed in to change notification settings - Fork 67
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
Support templates in ingress host #121
Support templates in ingress host #121
Conversation
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.
HI @yahel2410
Thanks a lot for the contribution! But I am honestly a bit confused by motivation for the change.
Why would it be necessary to run one var through another? Why not just set the proper value in the first place?
Hi @alexrashed, let me elaborate a bit more about our use-case e.g my-values.yaml
Helm cmd
|
That is understandable, but why don't you just use the value directly in the values file?
|
Along with Being able to resuse the |
Can you maybe give us more concrete examples for this? I still don't see the clear value, and this argument can be made for each and every single value in the chart... |
Sure. So would need to hold this 2 blocks in our per dev values file
|
Hi @alexrashed, do you think we can merge that? it can help us a lot |
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 took a closer look and we are already using the templating functions for some of the inputs already. I don't want to overboard with that (because as I mentioned you could do this for each and every single value), but your use case seems fine.
I added a few comments to fix your test values and simplify the code. Once the suggestions have been implemented, I'm happy to merge and release your changes.
But since the invalid test values indicate that you did not test your changes upfront: Please make sure to do so. This chart is used by a lot of users, and we don't want to break anything. 😉
Thank you for the review and comments @alexrashed. |
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.
Thanks for applying the comments, one more iteration and we should be good to go.
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.
Thanks for addressing the comments, now we are good to go!
Thanks again for your contribution, I'll directly move forward and merge + release this change.
FYI: These changes are now contained in version |
Amazing. Thanks a lot! @alexrashed |
Motivation
Added support for templates in ingress host field.
Changes
Run the hosts through
tpl
function. I had to save thebase
template in a var, to use it inside therange
loopTesting
Added test values