err: error during helmfile.yaml.part.1 parsing: template: stringTemplate:41:27: executing "stringTemplate" at <.Values.service_monitor_enabled>: map has no entry for key "service_monitor_enabled"
in ./helmfile.yaml: error during helmfile.yaml.part.1 parsing: template: stringTemplate:41:27: executing "stringTemplate" at <.Values.service_monitor_enabled>: map has no entry for key "service_monitor_enabled"
When the defaults.yaml has a false value (service_monitor_enabled: false), this fails:
enabled: {{ .Values.service_monitor_enabled }}
The map is:
map[chart_version:7.2.0 cluster_name:some-eks-cluster installed:true
provider:aws region:us-east-2 service_account_name:autoscaler]
I can change the value to "false" (service_monitor_enabled: "false"), it works:
map[chart_version:7.2.0 cluster_name:some-eks-cluster installed:true
provider:aws region:us-east-2 service_account_name:autoscaler service_monitor_enabled:false]
This also works too regardless of surrounding the bool in quotes:
enabled: {{ .Values | get "service_monitor_enabled" false }}
I tested the exact same code (no quotes, just service_monitor_enabled: false) works perfectly fine in version 0.100.0 with enabled: {{ .Values.service_monitor_enabled }}.
helmfile.yaml
bases:
- ../helm-defaults.yaml
- ../environments.yaml
---
repositories:
# Stable repo of official helm charts
- name: "stable"
url: "https://kubernetes-charts.storage.googleapis.com"
releases:
# - https://github.com/kubernetes/charts/blob/master/stable/cluster-autoscaler
- name: "cluster-autoscaler"
namespace: "kube-system"
labels:
chart: "cluster-autoscaler"
repo: "stable"
component: "autoscaler"
namespace: "kube-system"
vendor: "kubernetes"
chart: "stable/cluster-autoscaler"
version: {{ .Values.chart_version | quote }}
wait: true
timeout: 180
installed: {{ .Values.installed }}
values:
- serviceMonitor:
enabled: {{ .Values.service_monitor_enabled }}
../helm-defaults.yaml
helmDefaults:
tillerless: true
environments.yaml
environments:
mystage:
values:
- defaults.yaml
defaults.yaml
chart_version: 7.2.0
provider: "aws"
region: "us-east-2"
service_account_name: "autoscaler"
service_monitor_enabled: false
I think this is resolved in v0.108.0. Could you confirm?
Seems not with service_monitor_enabled: false.
➜ ENVVAV=blah ~/Downloads/helmfile_darwin_amd64 --environment tenant --log-level debug build
err: error during helmfile.yaml.part.1 parsing: template: stringTemplate:41:27: executing "stringTemplate" at <.Values.service_monitor_enabled>: map has no entry for key "service_monitor_enabled"
in ./helmfile.yaml: error during helmfile.yaml.part.1 parsing: template: stringTemplate:41:27: executing "stringTemplate" at <.Values.service_monitor_enabled>: map has no entry for key "service_monitor_enabled"
➜ ~/Downloads/helmfile_darwin_amd64 --version
helmfile version v0.108.0
@johncblandii Thanks! I've reproduced it. #1185 worked for me.
Are you able to build it yourself with make build? If so, I'd appreciate it if you could try it out.
Sure...gimme a sec to pull it down and build then I'll check it out.
Confirmed.
@johncblandii Thanks! I'll add some regression tests and merge it asap.
@mumoshu thanks so much!
Most helpful comment
@johncblandii Thanks! I'll add some regression tests and merge it asap.