helmfile
helmfile copied to clipboard
No way to ignore missing file for "values:" in helmfile
Hello @mumoshu !
I'm trying to set missingFileHandler: Warn for values: section of my helmfile:
bases:
- ../_lib/defaults.yaml.gotmpl
---
{{ readFile "../_lib/templates.yaml.gotmpl" }}
values:
- hosts: []
# - name: "example"
# ingressClass: "nginx"
# port: "80"
# targetPort: "80"
# upstreamAddress: "192.168.0.1"
# upstreamVhost: "www.example.com"
# hostname: "www.example.com"
- ../../config/dbcc-external-services/{{ .Environment.Name }}/values.yaml.gotmpl # Import env-specific list of hosts
releases:
- name: dbcc-external-services
<<: *dbcc
chart: incubator/raw
namespace: miscellaneous-extra
version: 0.2.3
I cannot use Environments: here, because it's complimentary helmfile included in a few entry-level helmfiles with different sets of environments... I've checked #548, but no solution provided for my case, or I'm doing something wrong?
Any advice is much appreciated!
I'm also stuck with this.
Setting it under environments is ignored completely
environments:
common:
missingFileHandler: Warn
->
Adding repo grafana https://grafana.github.io/helm-charts
"grafana" has been added to your repositories
Building dependency release=loki-infrastructure, chart=charts/gcp-infrastructure
in ./monitoring.loki.yaml: failed processing release loki: values file matching "environments/common/loki.yaml" does not exist in "."
Though using it under releases works:
releases:
- name: loki
namespace: loki
chart: grafana/loki
missingFileHandler: Warn
values:
- defaults/loki.yaml
- environments/{{ .Environment.Name }}/loki.yaml
->
Adding repo grafana https://grafana.github.io/helm-charts
"grafana" has been added to your repositories
Building dependency release=loki-infrastructure, chart=charts/gcp-infrastructure
skipping missing values file matching "environments/common/loki.yaml"
Comparing release=loki, chart=grafana/loki
I'm using the latest release:
helmfile version v0.137.0
+1 for ability to either conditionally skip importing release values, or ignore selected missing value files.
@rubenhak You can ignore release values load failures by setting releases[].missingFileHandler. Probably you meant anything else?
Setting it under environments is ignored completely
@muffl0n Maybe you're trying to set releases' default missingFileHandler value? I thought it was possible thru helmDefaults.
environments.Name.missingFileHandler is for making some environment values file optional.
@dene14 try to use information that I wrote at #2063
having the same problem with version v0.142.0
I would like to set missingFileHandler per environment so environments.<name>.missingFileHandler but this is completely ignored
setting missingFileHandler under helmDefaults produces:
failed to read helmfile.yaml: reading document at index 1: yaml: unmarshal errors:
line 8: field missingFileHandler not found in type state.HelmSpec