I'm using a Helm chart to deploy an app in the Kubernetes. After deployment, I want to copy a file from the chart repository to the container.
Currently I am doing this manually:
kubectl cp custom-samples.json che-8467596d54-7c2hg:/data/templates
But I want to make this step a part of the deployment that will be performed automatically. Note that I took a look at post-install hooks but I'm not sure it's a good solution.
[UPD] I created this init container:
- name: add-custom-samples
image: alpine:3.5
command: ["sh", "-c", "cd /data/templates; touch custom.json;"]
volumeMounts: [{
"mountPath": "/data",
"name": "che-data-volume"
}]
But the file custom.json is missing in the mounted volume.