-
Notifications
You must be signed in to change notification settings - Fork 11
Add ability to share common / global env and secrets #7
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
Comments
Maybe globals work? |
This looks more promosing: https://github.com/kubernetes/helm/blob/master/docs/chart_template_guide/named_templates.md |
Just to give some context: Charts are parsed as Golang text/template strings. On top of that, an extra superset of template functions is injected using the Sprig library. In this case, named templates come from the standard Go library, so this can be used, without any requirements from Helm. Having said that, the current implementation of Kubecrt considers This can be fixed though, so you make a good point, this should work as expected 👍 |
I just tested this in a test chart: {{- define "contacts" }}
contacts:
- jean@blendle.com
{{- end }}
apiVersion: v1
charts:
- blendle/web:
version: ~> 0
values:
{{- template "contacts" }} This works as expected when passed into The problem, as you can see, is that you need to match the spacing in the define block, instead of in the template call. Ideally, you'd want to do something like
Now, this is expected, because
This seems fixable, but I haven't found the cause yet. |
Some projects (especially the old ones), have a lot of envs & secrets configured. If you have a couple of deployments, you need to change them for all those deployments. Having a way of centralising those values would be very helpful.
Some ideas:
The text was updated successfully, but these errors were encountered: