Not able to fetch the ZIP file in Helm chart

5/24/2018

Inside my helm chart in a custom directory which has a zip file and the same file needs to pass to API which is being called from a sh file on post-install hook. I am trying to get the file as below but it returns the content of zip file which is not supported by the API.

value: {{ .Files.Get "scripts/ParameterAndSource.zip" }}

How to access the file location directly so that file can be available to the API instead of file content.

-- Akib Ali
docker
java
kubernetes
kubernetes-helm

1 Answer

5/28/2018

I guess your shell script is run in a Job. If so I think you could is put the file in a ConfigMap and then mount the ConfigMap as a Volume for your Job.

(I don't have a Job-based example but for a Deployment see https://github.com/ryandawsonuk/secrets-treasurehunt/blob/master/charts/treasurehunt/templates/config.yaml and and https://github.com/ryandawsonuk/secrets-treasurehunt/blob/master/charts/treasurehunt/templates/deployment.yaml )

-- Ryan Dawson
Source: StackOverflow