roboll / helmfile

Deploy Kubernetes Helm Charts
MIT License
4.03k stars 567 forks source link

exec function passing arguments to shell script #2173

Open raje312 opened 1 year ago

raje312 commented 1 year ago

I am trying to pass value from Environment values.yaml to shell script to get the version of server using curl command. The value is passed on to the script since I can echo first argument in script but curl does not recognize ${endpoint} and returns null. I can also echo $endpoint (returns "serverInfo") . Is there something I am missing

helmfile.yaml:

{{ $version := exec "./get-version.sh" (list "{{ .Environment.Values.env.urlendpoint }}" ) }} ; ; environments: default: values:

values.yaml ( environment) env: urlendpoint: "serverInfo"

get-version.sh

endpoint=$1 curl -s -L https://testserver.com/${endpoint} # returns version of the server

yxxhero commented 10 months ago

@raje312 please an new issue into helmfile/helmfile.