6 messages
Questions and discussion around helmfile https://github.com/roboll/helmfile and https://github.com/cloudposse/helmfiles
Archive: https://archive.sweetops.com/helmfile/
KimJohn Quinnalmost 4 years ago
I am really wrestling with helmfile in application. I think i understand what I can do but the values are killing me.
Using Redis chart as an example:
I have a
My
And my
My issues are:
1. It seems I have to "replicate" the properties inside the
2. Just within the Redis chart itself I seem to have to do # 1 as well - even if i get rid of the
My
And all it is doing is repeating the values from the environment files.
Using Redis chart as an example:
I have a
hemlfile.yamlbases:
- ../common.yml
- environments.yml
---
repositories:
- name: bitnami
url: <https://charts.bitnami.com/bitnami>
releases:
- name: redis
chart: bitnami/redis
force: true
installed: {{ env "REDIS_INSTALLED" | default .Values.installed }}
version: 16.4.5
labels:
managed: true
values:
- values.gotmplMy
environments.yml looks like (truncated):environments:
default:
values:
- ../globals.gotmpl
- defaults.yml
develop:
values:
- ../globals.gotmpl
- defaults.ymlAnd my
defaults.yml looks like (i have a production one as well):installed: true
architecture: standalone
master:
persistence:
enabled: false
replica:
persistence:
enabled: false
replicaCount: 0My issues are:
1. It seems I have to "replicate" the properties inside the
values.gotmpl when I would of expected them to be inherited from globals.yml2. Just within the Redis chart itself I seem to have to do # 1 as well - even if i get rid of the
values.gotmpl I would of expected it to use one of the environment filesMy
values.gotmpl looks like this:architecture: {{ .Values.architecture }}
master:
persistence:
enabled: {{ .Values.master.persistence.enabled }}
replica:
persistence:
enabled: {{ .Values.replica.persistence.enabled }}
replicaCount: {{ .Values.replica.replicaCount }}And all it is doing is repeating the values from the environment files.
KimJohn Quinnalmost 4 years ago
The reason I am asking here is because it seems like you are heavy users of Helmfile and honestly the only real resource I seem to be able to locate.
Johanalmost 4 years ago
Does anyone know how to ensure a release is not installed when a flag is set?
condition: mychart.disabled ?Loukas Agorgianitisalmost 4 years ago(edited)
Hello! In my helmfile.yaml I have this:
in order to source all top level {{ .Values }}.
Can I somehow make this conditional and check first if the values are defined from --values (or environment variables) and then fall back to this?
values:
- .env.yamlin order to source all top level {{ .Values }}.
Can I somehow make this conditional and check first if the values are defined from --values (or environment variables) and then fall back to this?
brandonalmost 4 years ago
Hello. I have a question about the tpl function. Is it possible to have locally defined variables be used within a templated textfile?
Where
The only example I see in the docs does not use the
https://helm.sh/docs/howto/charts_tips_and_tricks/
# alerting.yaml.gotmpl
{{- $deadMansSwitchEndpoint := printf "myString" }}
receivers:
{{ tpl ( readFile "../prom-rules/alertmanager/alertmanager-receivers.yaml") . }}Where
# ../prom-rules/alertmanager/alertmanager-receivers.yaml
- name: deadmanswitch
webhook_configs:
- url: {{ $deadMansSwitchEndpoint }}
send_resolved: falsehelmfile --file alerting.yaml template
failed to render values files "alerting.yaml.gotmpl": failed to render [alerting.yaml.gotmpl], because of template: stringTemplate:70:3: executing "stringTemplate" at <tpl (readFile "../prom-rules/alertmanager/alertmanager-receivers.yaml") .>: error calling tpl: template: stringTemplate:4: undefined variable "$deadMansSwitchEndpoint"The only example I see in the docs does not use the
$variable syntax. And even then this example is for base helm, and not helmfile.https://helm.sh/docs/howto/charts_tips_and_tricks/