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
Can't refer to aliased subcharts by alias names in master chart #2993
Comments
I believe the attached file is a minimal reproducer for showing the issue -- from what I understand, it should work, but instead throws a render error. |
@omkensey Thanks for doing the due diligence to reproduce this one. I'll try to get around to fixing this. If it isn't a huge blocker, we may wait until 2.7.1 to fix |
I think I have a workaround I can use for now, and can PR it to something cleaner later. |
@omkensey That would be great! If you don't get around to it, let me know and I'll try to take it on |
I just hit this problem majorly. I'm writing a wrapper chart and the hyphens in the upstream chart name are killing me. Fixing this would logically fix the fact that range ops don't appear to work any better using "index".. Re: #2192 |
This also seems to indicate that aliasing two of the same upstream chart for different purposes with unique alias-named values.yaml trees is impossible. I would go so far as to say the default at values.yaml should be the alias if alias exists. If alias DOES exist, then canonical name shouldn't work IMHO -- because collisions. (Unless we intelligently scope (and fall through) "global" usage of an aliased chart via its canonical name -- apart from alias config). |
As I understand it, that's how aliasing is supposed to work, actually -- see #2508. The workaround I've been using is to set a variable at the top of the template, e.g.:
Then further down you can refer to $newname.whatever. @thomastaylor312 that's the workaround I was referring to above; I've not got the coding chops to actually fix this in the helm code. |
Over in my chart PR helm/charts#1719, unguiculus just said
So maybe that's the issue with what I (and @josdotso?) am doing -- but if that's the case, IMHO directly-added charts should be aliasable just like charts retrieved dynamically, so I'd argue there's still a bug here. |
Absolutely @omkensey ! Ranging on the index-based variable wasn't working for me last night when I tried it. Are you ranging over any such variables? EDIT: also, my requirements.yaml deps are dynamic. My parent chart ships with no charts dir. |
No, I'm not ranging anything in my chart. |
@omkensey I think that the comment from unguiculus was correct. The requirements file doesn't care what you have explicitly put in your @josdotso So you are having this issue even with dynamic deps? |
@thomastaylor312, Yes -- I believe so. I'm using requirements.yaml and EDIT: That is, my Helm parent chart repo clone (one chart in a bare git repo) has no charts dir when I start. |
@josdotso It actually only does the "renaming" inside of helm when putting together the manifests to send to tiller |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle rotten |
I believe I just hit this bug, but with a twist. In my scenario, I have a chart for my test harness. It needs to enable or disable various features of its subchart. However, the values being modified show up both in |
Here's how I reproduce this bug: 1. Create a chart that uses the same sub chart twice (individually named/aliased to
2. Set up different values for the different sub charts:
3. Double-check the default values of the sub chart:
4. Check the computed values for the sub charts: ...where you can see that the
...whereas I'm only expecting this:
...and in turn that the right a/b values would be applied to their respective aliased subchart. 😊 |
@omkensey / @thomastaylor312 Were any of you able to take a stab at this? |
@MPV Yeah, I have found the same issue here: #7093 (comment) |
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs. |
Hi all! I'm willing to reward with 1000 USD to the first person who fixes this part of the code so aliases can be overridden from a parent chart. Is anyone with me? We are discussing in this issue #7093 |
I have a chart with two subcharts in progress. The subcharts have hyphenated names, so to avoid working around hyphens in YAML keys, I aliased them to non-hyphenated names. However, when I try to use the alias names in the parent chart's templates, I get a render error if the values.yaml has the unaliased names for the subchart value keys; if the aliased names are used, then the subchart value keys are not actually computed into the subchart templates, leaving everything that isn't a global value blank.
The text was updated successfully, but these errors were encountered: