-
Notifications
You must be signed in to change notification settings - Fork 179
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
hip introducing export-values
for better composability
#242
hip introducing export-values
for better composability
#242
Conversation
Co-authored-by: Johannes Dillmann <[email protected]> Co-authored-by: Ralf Pannemans <[email protected]> Co-authored-by: Pavel Busko <[email protected]> Co-authored-by: Jan von Löwenstein <[email protected]> Co-authored-by: Philipp Stehle <[email protected]> Co-authored-by: I546443 <[email protected]> Signed-off-by: Ralf Pannemans <[email protected]>
a2b9f12
to
39abfc9
Compare
@hickeyma , @marckhouzam HI. Is there anything missing? It would be great to get some feedback for this HIP, but we cannot add reviewers. What is the preferred approach? |
Would really be great to get any reaction at all. Is the |
It's currently next to impossible to use the parent - subchart pattern with the helmfile values that jenkins-x passes to each release. This would unblock me in that scenario and also enable me to make a bunch of my other chart values way more DRY. |
Discussion in March 17, 2022 helm developer call: https://docs.google.com/document/d/1d-6xJEx0C78csIYSPKJzRPeWaHG_8W1Hjl72OJggwdc/edit?usp=sharing |
Looks like the next available number for a HIP is "0016". @c0d1ngm0nk3y you can replace the "9999" with "0016" in the file and in the name of the file. |
Signed-off-by: Philipp Stehle <[email protected]>
f5c7ea6
to
23aeb73
Compare
Done |
Co-authored-by: Sumit Kulhadia <[email protected]> Signed-off-by: Ralf Pannemans <[email protected]>
6a5d241
to
1b66ff5
Compare
@jdolitsky anything missing to get this HIP merged? |
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 have some concerns about backwards compatibility. How will older Helm clients handle this situation? Older versions are widely in use.
hips/hip-0016.md
Outdated
|
||
## Backwards Compatibility | ||
|
||
This change won't break any existing Helm chart since it only adds new mechanisms. |
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.
How will older Helm clients (e.g. v3.6.2) work with charts generated with these properties. Older versions of Helm are in wide use.
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.
This is indeed a tricky problem.
My first idea was: We need to bump the apiVersion
of the Chart.yaml
and make the feature only available, if the newer version is used. But I noticed that my local helm installation happily templates my dummy chart, even if I set apiVersion: v100
in the Chart.yaml
(which IMHO is a bug).
One alternative I see is recommending to chart authors who use the feature (in the docs of that feature) to include something like this in their templates (maybe in min-version.yaml
by convention):
{{- if semverCompare ">3.10.0" .Capabilities.HelmVersion.Version }}
{{- fail "This chart requires helm version 3.10.0 or higher" }}
{{- end }}
3.10.0
is obviously only a placeholder for whatever version we will include this in.
Another way could be to make it only available, if you target a Kubernetes version to high for older helm versions (as defined in Supported Version Skew) by setting kubeVersion
in the Chart.yaml
. But this would be rather hard to document and I also don't think that the helm cli enforces this in any way. But at least it is documented as "not recommended" for a long time.
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.
How about introducing a new function minimumHelmVersion
?
The export-values
would be only avilalbe, if you called minimumHelmVersion
with 3.10.0
or higher.
That way, people using an older version of helm would get an error message function "minimumHelmVersion" not defined
which should be a good hint that they might need to upgrade their helm version.
This approach could allow other changes, that couldn't otherwise be delivered in a backwards compatible way.
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.
See #242 (review)
child: "serverPort" | ||
- name: server | ||
version: 1.0.0 | ||
export-values: |
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.
How will older versions of Helm (e.g., v3.6.2) handle running into this? What will the chart do if someone tries to install it?
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.
Matt good point. See my suggestion here #242 (review)
HIPs need two approvals to get merged |
This is a bit unorthodox because (logically) the gfd daemonset template should live inside the gfd chart. However, there is currently no good way to pass values from a parent chart into a subchart without jumping through alot of undesirabe hoops. This makes it hard to support the new shared config we have between gfd and the plugin. By moving the gfd daemonset into the plugin chart, we now have the ability to share values from the plugin into gfd. Note, that we don't move the contents of the values.yml from the gfd subchart into the plugin's values.yml. This is done on purpose, so that once proper suppport is in place to share values from a parent to a subchart, there won't be much work to move this file back where it belongs. A subsequent commit will show how we access these subchart values from gfd.yml, such that minimal code changes will be needed once we move gfd.yml back into the subchart. Below is a link to the Helm Improvement Proposal (HIP) that (once available) will allow us to move gfd.yml back where it belongs: helm/community#242 Signed-off-by: Kevin Klues <[email protected]>
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 met with @phil9909 to better understand the use case, and now I see the value here beyond requiring users of parent charts to specify the same value over and over in the way that child charts require. This is essentially a mapping function that does the reverse of import-values
. Phiiip, would you please write up the use case with the personas you mentioned? It would be faster for you to do this than for me right now.
I just have one suggestion for the HIP backwards compatibility section below, which addresses concerns @mattfarina mentioned. Otherwise, I think this looks good!
Signed-off-by: Philipp Stehle <[email protected]> Co-authored-by: Pavel Busko <[email protected]> Co-authored-by: Scott Rigby <[email protected]>
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 think this is looking good now for merging as a draft HIP 👍
@mattfarina How is this looking from your side? I think this has been addressed now in the HIP.
With two approvals (from @scottrigby & @jdolitsky) and @mattfarina's comments supposedly addressed, could we maybe proceed and try to get this HIP merged soon and the implementation into 3.11.0?
|
This hip proposes an
export-values
structure to address this issue.