helm provide values file from variable

10/28/2019

I'm having an ci/cd pipeline with has a yaml file, containing secrets in memory. I don't want to store the file on drive, since I have not guarantee that the file will be cleaned or is safe on the drive.

I would like to install a helm chart using helm install. Normally I would just provide the file using -f filename.yaml. But as I said, I don't have the file stored on the drive. Is there any alternative to pass a whole yaml file as string to a helm install command?

-- Florian
kubernetes-helm
parameter-passing

1 Answer

10/29/2019

To inline values.yaml in your command line, you can use the following:

helm install <chart-name> -f - <<EOF
<your-inlined-values-yaml>
EOF

For example:

helm install --name my-release hazelcast/hazelcast -f - <<EOF
service:
  type: LoadBalancer
EOF
-- RafaƂ Leszko
Source: StackOverflow