-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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(chart): Provide config secret and use tpl function for providers and extraArgs #3144
Conversation
@jkroepke thanks for the PR but I'm not sure we can accept this, the way the In the case of Helm KISS often beats DRY; but an alternative that does work is using a type check and allowing values to either be an object in which case no |
Do you have an example for such a complex object in that uses cases here? In any case, the
I have the feeling that the approch using I agree with your that it should be not used for all variables. |
I'd suggest that you give it a try with a local dummy chart as you will see where it falls over.
I'd be interested where in the KPS this is done as I've personally been part of removing it from that chart a number of times. The Loki charts were the first place where I saw this pattern have a major issue, AFAIK they use the type filter test or YAML object merge patterns. I also wouldn't use the Bitnami charts as an argument to use a pattern. |
https://github.com/jkroepke/homelab/tree/main/helm-chart-examples/to-yaml - here we are. No fails over. Feel free to add your sharing as PR here.
Here is a another PR on loki, which is the same approach as this PR. None of the current maintainers of the loki charts debate this pattern. It feels like acceptable. From external-dns point of view, define a map on .Values.provider or define any thing except list of string .Values.extraArgs would break the deployment, too. Independently if I guess we reach a point now where is more personal related discussion then technically. I would recommend that you or @njuettner do a review and based on the result we may proceed or fully decline the pull request. |
@jkroepke this isn't a personal discussion, it's purely technical. The Your examples meet the simple string requirements so they work. The Loki example is the same or similar to ones which have either been removed from other Grafana Loki charts or replaced with similar but different patterns (look at how affinity is dealt with as a string in the same chart). The specific Loki example is made safer by the fact that it isn't replacing the selector labels template but it's still misleading in what it would actually do given anything other than an explicit string map. |
679740a
to
b804036
Compare
I redesign the PR to introduce the tpl function only on safe string scenarios. It should now meet your requirements. On top, helm validates now, if a string is passed. |
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've added a couple of comments.
b804036
to
bf2ec78
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.
This is looking good.
For consistency would it be best to have a secretConfiguration.enabled
value? That's generally how these are defined once they're more than a single key.
bf2ec78
to
34299cd
Compare
|
6730c0a
to
1543323
Compare
/lgtm |
@Raffo @seanmalloy could one of you approve the GH workflow? |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jkroepke, seanmalloy 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 |
/retest |
@seanmalloy could you re-run the failing test? |
@stevehipwell the issue is in master, see #3180 (comment) . We can revert sooner if you need this out, the user did not answer yet. |
@Raffo I think this PR can wait. |
@jkroepke can you merge master in? |
Signed-off-by: Jan-Otto Kröpke <[email protected]>
1543323
to
4d67573
Compare
@Raffo @stevehipwell PR rebased. |
@Raffo could you approve the GH workflows? |
/lgtm |
Description
This wrapper the content of some helm values through the helm tpl function.
This is needed in some helm umbrella charts situation. For example I have a secret named
{{ include "external-dns.fullname" . }}
, but I can not reference it inextraVolumes
. Instead I have to use a static secret name.Checklist