Is there an already built in j2 template processor in kubernetes or docker? I am doing the configuration below and wanted to plugin the values on the template.
Note that using hostPath is not an option since this is using openshift and no pv/pvc can be used.
- image: some-docker-image:latest
- mountPath: /etc/app/conf
. Do some j2 template processing here if possible.
- name: configuration-volume
There isn't any templating support built into Kubernetes. You can easily build a templating system on top of the yaml/json files that you pass into
kubectl -f create though. I know some folks that are using jsonnet to accomplish this.
The discussion around adding templates is happening in https://github.com/kubernetes/kubernetes/issues/23896 if you'd like to contribute.