-
Notifications
You must be signed in to change notification settings - Fork 42
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: helm api support for reading valuesFiles from ConfigMaps #702
feat: helm api support for reading valuesFiles from ConfigMaps #702
Conversation
Skipping CI for Draft Pull Request. |
/test all |
/assign @sdowell |
/assign @sdowell |
/hold |
08290ef
to
fc30f01
Compare
/retest |
792fed0
to
8b81bff
Compare
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.
Not a fan of the naming decisions here. See inline comments.
I've been informed that many of these naming decisions were documented in the design doc and approved by other people. So I will summarize my concerns here for posterity.
|
The goal isn't to replicate Flux's API, so we don't need to follow them. We also don't need to support Secrets now given that no users ask for it. I prefer strategy over mode as well. What should the second strategy be called, if not "merge"? It's already a term that's used by Helm users in the feature request for this functionality. How do you expect Scalars and Lists to be merged? If the concern is about the redundant mention of "merge", we can call it something like Regarding 9, I prefer Sources over Objects. |
Based on the above comments, discussed with @janetkuo and we are going to make the following naming changes:
|
Can we just leave out the kind and key? Other alternative names:
|
Another consideration: |
The customer didn't ask for it, so we could leave it out for now if we want to punt on the design. The
This still has the same issue that you mentioned above with
This SGTM. I think it is more accurate than the above
Yes you can. |
As for the “merge” strategy enum… I think there are a few approaches.
For example, in the future, we may want to allow lists to merge using a unique key field, because that’s a very common pattern in k8s config: unordered lists of maps (e.g. containers). Concatenating is only one way to merge lists and probably not the most useful. Another consideration is that current merge strategy is actually using “override” on maps. So it’s not super clear what the distinction is between those modes. As for prior art, consider CRD merge strategies: https://kubernetes.io/docs/reference/using-api/server-side-apply/#merge-strategy So maybe what we really need is type-specified strategy options… I have a couple ideas:
Option 3 would allow for specifying default and path specific merge strategies for the same type, in case that’s desired. That would more closely mirror the flexibility provided by CRD schema. |
Good point that we can add We're handling values.yaml instead of KRM yaml. Does it allow those merge strategies? The merge strategy proposed in this PR seems good for our use case. The |
AFAIK, helm values can be any data structure supported by yaml. You could have a value named |
I don't think we need to support other types of merge strategies - I would rather it to be supported by Helm. Natasha implemented this for our own use case because of the lack of support in Helm. I'm fine with renaming the current strategy from "merge" to something more descriptive. |
Are we certain that the merge behavior, as described, meets the needs of the Fleet Tenancy team? I'd doubtful that list concatenation is at all useful. I'm also unsure if "override" works like "set" or "atomic" or some new behavior unlike any existing CRD merge strategy. |
I have changed |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: janetkuo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold cancel |
version
, rather thanchart:version
.Design and context: go/cs-helm-values-from-cm