skaffold
skaffold copied to clipboard
How to let helm version read environment variables when using skaffold deploy
apiVersion: skaffold/v2beta28
kind: Config
metadata:
name: vmstack
deploy:
helm:
flags:
upgrade:
- --timeout
- 600s
- --debug
install:
- --debug
releases:
- name: vm-operator
repo: https://victoriametrics.github.io/helm-charts/
remoteChart: victoria-metrics-operator
version: {{ .CHART_VERSION }}
I tried to configure as above and deploy as follows, but an error was reported during the deployment process
$ skaffold deploy
parsing skaffold config: error parsing skaffold configuration file: unable to re-marshal YAML without dotted keys: unable to parse YAML: yaml: invalid map key: map[string]interface {}{".CHART_VERSION":interface {}(nil)}
How to dynamically select the version to be deployed?
I ran into this error when trying to use setValueTemplates. In case it helps, the solution was to quote the template string:
version: "{{ .CHART_VERSION }}"