roboll / helmfile

Deploy Kubernetes Helm Charts
MIT License
4.04k stars 566 forks source link

Helmfile - overriding values from a parent chart value using Helmfile #2015

Open abramovi opened 2 years ago

abramovi commented 2 years ago

I am trying to do simple helm config using helmfile but no success. as mention here (overriding-values-from-a-parent-chart) I would like to provide one parent configuration and override release value. this is a release configmap

charts/microservice-a/templates/configmap.yaml

apiVersion: v1
kind: ConfigMap
metadata:
   labels: {{- include "microservice-a.labels" . | nindent 4 }}
   name: {{ include "microservice-a.fullname" . }}-config
   namespace: {{ .Release.Namespace }}
data:
   MODEL.EN: {{ .Values.model.en }}

this is my helmfile.yaml

releases:
   - name: microservice-a
     chart: ../charts/microservice-a
     values:
       - "./environments/{{ .Environment.Name }}/values.yaml"

and this is my environments/default/values.yaml

microservice-a:
  model:
    en: "model-en-1.0.mdl"

I found that the {{ .Values.model.en }} in the configmap can not be reslove. What am I doing wrong ?

jduepmeier commented 2 years ago

The values.yaml should look like this:

model:
  en: "model-en-1.0.mdl"

Helmfile calls each release as if the release would be as single helm release (not as subcharts). microservice-a is no subchart. Values can be given without the microservice-a key.