<p>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.</p>

<p>Note that using hostPath is not an option since this is using openshift and no pv/pvc can be used. </p>

<pre><code>containers:
    - image: some-docker-image:latest
      name: some-docker-image
      volumeMounts:
        - mountPath: /etc/app/conf
          name: configuration-volume
.
. Do some j2 template processing here if possible.
.

volumes:
    - name: configuration-volume
      gitRepo:
        repository: "https://gitrepo/repo/example.git
</code></pre>

<p>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 <code>kubectl -f create</code> though. I know some folks that are using <a href="http://jsonnet.org" rel="nofollow">jsonnet</a> to accomplish this. </p>

<p>The discussion around adding templates is happening in <a href="https://github.com/kubernetes/kubernetes/issues/23896" rel="nofollow">https://github.com/kubernetes/kubernetes/issues/23896</a> if you'd like to contribute. </p>
