-
Notifications
You must be signed in to change notification settings - Fork 7k
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
feat: implement export-values #10059
base: main
Are you sure you want to change the base?
Conversation
Hi @ilya-lesikov. I'm going to re-express the same concerns I had with the last PR (#7477) that there was not enough supporting documentation provided to better understand
With that said, I believe this proposal should go through the HIP process BEFORE any further code review. The process helps answer some basic questions like "how does this address backwards compatibility?" and "how is this feature expected to be useful?" which I haven't seen answered in either #3242, #7477, or this PR. And I think that would help alleviate a lot of the concerns I expressed earlier. Let me know if you have any questions about the process. Thanks! |
I'll do the docs, although I thought I might get some hints about the overall design before writing them. The usage could've been found in tests and the first post. |
While I understand the sentiment, we (the maintainers) have a very limited amount of time we can spend each week to review code. Documenting your feature means we can spend more time reviewing your code. If I have to read your unit tests and attempt to make assumptions about how your feature is supposed to work, I'm going to spend my time looking at the other 150+ PRs in the queue that are ready for testing until I can find the time to schedule a longer review - and that time is getting harder to find.
Honestly, that's up to you. This is open source - you the author have the authority to choose how it works. Though that also comes with the burden to document and teach others how it works. Especially if you want to get it merged :) |
6eec2a6
to
f1ef65b
Compare
Use case: forwarding of |
May I politely ask about the state of this PR? Has a HIP been created already? Any idea as to when this might be available in a released version of Helm (like are we talking weeks, months, years or even "we don't know if this gets merged at all")? If I've followed the breadcrumbs correctly, this and similar though more generic proposals have been asked for and discusses for years. This approach seems to follow a compatibility oriented approach while fixing a from my point of view significant deficiency with regards to compositionality of Helm charts / abstraction around parent and child charts. It would be really great to get |
Hello @loewenstein In werf this feature was really useful since we inject in Helm some values at runtime and the user does not have direct control of these values. Because of this, we needed something truly dynamic to be able to actually map these values from one place to another. For us it worked well. |
FYI we've created a HIP for export-values. helm/community#242 |
I think we did figure out that this PR would not yet readily provide an implementation though. |
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.
Lets resolve the issue with old PR but otherwise lgtm
I understood from @c0d1ngm0nk3y and others that this PR would not be a full implementation of the HIP we provided. I’d rather put this on hold (at least until they had a chance to comment). We might just provide a separate PR with a proper implementation - potentially based of of this proposal. cc @phil9909 |
@loewenstein - is this a partial implementation? Would you be able to push your changes for HIP 16 directly onto this PR? |
We'll discuss how to continue tomorrow 9 CET. We are not related to @ilya-lesikov at all, just need the feature, found the existing approaches and decided to pick up the request for a HIP as prerequisite for am implementation. |
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.
revoking approve until the HIP is fully implemented
f1ef65b
to
ab15bcb
Compare
Signed-off-by: Ilya Lesikov <ilya@lesikov.com>
Refactor export-values/import-values logic. Now export-values expand from the top chart to the most nested ones, unlike import-values that have it reversed (import-values flow didn't change). Now export-values can be chained and passed through multiple charts, where you define export-values directive in each chart of the chain. Import-values already work like that. Signed-off-by: Ilya Lesikov <ilya@lesikov.com>
ab15bcb
to
8ff63f8
Compare
Complete refactoring required to make --set's work correctly with export-values and when export-values chained through charts. Order of precedence with combinations of multiple --set's/values.yaml/export-values is as required. Signed-off-by: Ilya Lesikov <ilya@lesikov.com>
8ff63f8
to
68fa67f
Compare
@jdolitsky Now I believe the HIP is implemented in this PR. I had to rewrite it from scratch basically, but now it should be fine. The only thing that was implemented differently is this:
In current implementation you can use both The reason for this is that import-values implementation is not very good and import-values breaks whatever runs after it (export-values in our case). I believe it's due to messing up Values tree of charts, maybe something wrong with Other than that should work as expected. Chaining of |
…harts Values When we defined some Values in the subchart and also some of these Values defined in this chart's parents and we are passing some values via export-values to the same keys, then the merge result was wrong. Signed-off-by: Ilya Lesikov <ilya@lesikov.com>
What is the state of play here? |
The other PR (#10804) is waiting to be reviewed I think. |
@ilya-lesikov Can you rebase this? |
Is there any progress? This would be sooo useful and I was looking forward to make use of this feature since 2021 ... |
#10804 is being moved from milestone to milestone,..., I am curious if it will eventually get merged. All in all, quite a frustrating experience. |
What this PR does / why we need it:
This PR implements
export-values
directive which is similar to the import-values directive, but instead of importing the values of the subchart into the current chart it exports the values of the current chart into subchart.Initially the change was discussed here #3242. There were several attempts to implement this: #7477, #3243.
Usage:
In the full form of
export-values
you specify which value tree to export (withparent:
) and where it should be exported in the subchart (withchild:
).In the short form of
export-values
you only specify a relative path inside of theexports:
key of the parent chart values: specified values will be exported to the root of the subchart values (same as with theimport-values
). This allows to export/import values defined inexports:
both to the parent chart or to the child chart depending on the directive used (import-values
orexport-values
).Unlike
import-values
,export-values
can export not only the trees of values (maps), but other types of values too (strings, ints, etc).Example:
Result of
helm template
:If applicable: