#helmfile (2021-08)
Questions and discussion around helmfile https://github.com/roboll/helmfile and https://github.com/cloudposse/helmfiles
Archive: https://archive.sweetops.com/helmfile/
2021-08-03

Has anyone used helmfile and helm-x together had problems with crds (the helm release trying to create/take ownership of them, they already exist from non helm-x install)?
2021-08-05

could somebody please share a transformers example for deployment where set spec/strategy ? Thanks

Hello, I am having difficulties loading remote values files from a private GitLab repository using this proposed syntax: https://github.com/roboll/helmfile/tree/v0.140.0#loading-remote-environment-values-files
I try to use the following URLs:
<https://gitlab.com/><company>/<project>/<repo_name>/-/raw/{{ env "CI_COMMIT_SHA" | default "-" }}/config/config.yaml?private_token={{ env "CI_JOB_TOKEN" }}
git::<https://gitlab.com/><company>/<project>/<repo_name>.git@config/config.yaml?ref={{ env "CI_COMMIT_SHA" | default "-" }}
Interestingly when calling directly
go-getter "<https://gitlab.com/><company>/<project>/<repo_name>/-/raw/<CI_COMMIT_SHA>/config/config.yaml?private_token=<SECRET>" ./foo
it works.
Any ideas?

The solution was in the test code here:
Use an @
to separate the path from the GIT url…

The following syntax using an @
worked for me:
environments:
cluster-azure-us-west:
values:
- git::<https://gitlab.com/org/repository-name.git@/config/config.test.yaml?ref=main> # Public Gilab Repo
cluster-gcp-europe-west:
values:
- git::<https://ci>:{{ env "CI_JOB_TOKEN" }}@gitlab.com/org/repository-name.git@/config.dev.yaml?ref={{ env "APP_COMMIT_SHA" }} # Private Gitlab Repo

@rei hi! by any chance, can you please share the syntax that you used in the end? I mean an example with an actual Gitlab instance

been trying to solve the same problem for hours(

This are actual working examples.
git::<https://ci:[email protected]/company/mycode.git@/config.dev.yaml?ref=aaaabbbbccccddddd>
I used this very same strings like documented and just replaced the private stuff with example strings


2021-08-06

I have the following values:
service:
- servicea:
db:
enabled: true
- serviceb:
something:
another: "hello"
servicegroup:
group1:
callerservice:
db:
enabled: true
group2:
db:
enabled: false
something:
another: "hi"
Now I need to range over these values and find only the keys with “db”. Later the value of the key db should be passed to a template
This is what I have so far.
{{- range $db:= .Values }}
{{ printf "%s" $db }}
{{- if hasKey $db "db" }}
{{ printf "success: %s" $db }}
{{- end }}
{{- if not (kindIs "string" $db) }}
{{- range $db2:= $db }}
{{ printf "%s" $db2 }}
{{- if hasKey $db2 "db" }}
{{ printf "success: %s" $db2 }}
{{- end }}
{{- if not (kindIs "string" $db2) }}
{{- range $db3:= $db2 }}
{{ printf "%s" $db3 }}
{{- if hasKey $db3 "db" }}
{{ printf "success: %s" $db3 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
the problem i have is that i have arrays and they cause the following error: executing “stringTemplate” at <$db>: wrong type for value; expected map[string]interface {}; got string
besides, it doesn’t look very nice either, if that could be solved recursively somehow I would be very grateful.
2021-08-09

Does anyone have any recommendations for diff
‘ing helm chart changes against live helm charts?
helm-diff
is nice, but I’m convinced it runs everything synchronously rather than concurrently? :sob:
(even tho this line is here) (ah, this for loop might be the synchronous part.. hmm)
I have 41 releases at the moment that takes about 2m 30s to complete with helm-diff
, which is really slow
I usually run it like helmfile -f stuff.yaml diff

could you just use background tasks to run multiple diffs at once?
2021-08-10
2021-08-19

Do anyone know how to add cloudwatch as data source in grafana using this helm chart https://github.com/prometheus-community/helm-charts?
Prometheus community Helm charts. Contribute to prometheus-community/helm-charts development by creating an account on GitHub.

Tried with this but didnt worked out ,
grafana:additionalDataSources:
- name: Cloudwatch
type: cloudwatch
jsonData:
authType: arn
assumeRoleArn: "${ASSUME_ROLE_ARN}"
defaultRegion: "${CLUSTER_REGION}"
2021-08-21

Hi – I feel like I’m missing something simple here, hoping someone can help me out.
If I define an ingress in a paperless_values.yml.gotmpl
file like so:
ingress:
main: # see: <https://github.com/k8s-at-home/charts/blob/master/charts/stable/paperless/values.yaml#L39>
enabled: true
<SNIP>
env:
PAPERLESS_TIME_ZONE: America/Los_Angeles
And reference from my helmfile:
- name: paperless
namespace: {{ .Values.paperless.namespace }}
chart: k8s-at-home/paperless
version: 7.0.0
values:
- paperless_values.yml.gotmpl
Everything works swimmingly. But if I move the ingress
key inline into the helmfile as follows, helmfile-diff
tells me there’s no longer an ingress for that release.
- name: paperless
namespace: {{ .Values.paperless.namespace }}
chart: k8s-at-home/paperless
version: 7.0.0
values:
- paperless_values.yml.gotmpl
- ingress:
main: # see: <https://github.com/k8s-at-home/charts/blob/master/charts/stable/paperless/values.yaml#L39>
enabled: true
<SNIP>
What am I missing here?
2021-08-31

Running into an issue with the bitnami/redis
chart.
My release:
- name: redis
version: 15.0.4
atomic: false
cleanupOnFail: false
chart: bitnami/redis
labels:
app: "{{`{{ .Release.Name }}`}}"
namespace: default
missingFileHandler: Error
dependencies:
- chart: bitnami/common
version: 1.8.0
alias: common
values:
- values-infra/redis.values.yaml.gotmpl
redis.values.yaml.gotmpl
is the default values file with a couple tweaks, and I’m getting this error:
in helmfiles/local-infra.yaml: [failed to render values files "values-infra/redis.values.yaml.gotmpl": failed to render [values-infra/redis.values.yaml.gotmpl], because of template: stringTemplate:1220:47: executing "stringTemplate" at <{{template "common.names.fullname" .}}>: template "common.names.fullname" not defined]
If I don’t try to include a values file it works fine. Any ideas?