When you’re using Skaffold to manage your helm releases, and the values key in helm chart’s values.yaml and in the values file defined in skaffold.yaml are the same, the value from the former takes precedence.
For example, based on the configuration and manifests below, mongodb-1 will be the final value in the deployment.
deployment template from helm chart’s template:
env:
- name: MONGODB_HOST
value: { { .Values.global.mongodb.host | quote } }
values.yaml
global:
mongodb:
host: mongodb-1
skaffold.yaml
deploy:
helm:
releases:
- name: api
chartPath: k8s/charts/api
valuesFiles:
- skaffold-global-values.yaml
skaffold-global-values.yaml
global:
mongodb:
host: mongodb-2