<p>I know how to mount git repo when I start pod. See: </p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: server
spec:
  containers:
  - image: nginx
    name: nginx
    volumeMounts:
    - mountPath: /mypath
      name: git-volume
  volumes:
  - name: git-volume
    gitRepo:
      repository: "git@somewhere:me/my-git-repository.git"
      revision: "22f1d8406d464b0c0874075539c1f2e96c253775"  
</code></pre>

<p>That's perfect, but it means that I need to clone whole repository. What I need is to obtain "clone" only one file. </p>

<pre><code>  - name: git-volume
        gitRepo:
          repository: "git@somewhere:me/my-git-repository.git/some/long/path/to/specific/file/configuration.cfg"
</code></pre>

<p>Is it possible?</p>

<p>Or can I mount some volume and execute some command in it? Something like: </p>

<pre><code>...
  containers:
  - image: nginx
    name: nginx
    volumeMounts:
    - mountPath: /mypath
      name: git-volume
      command: wget htttp://gitrepo/path/to/file/config.conf
</code></pre>

<p>Thanks.</p>

<p>You can't clone only one file. <code>gitRepo</code> executes <code>git clone</code> which only allows you to clone the entire repository. </p>

<p><code>volumeMounts</code> doesn't support executing command in it.</p>
