<p>I created a deploymentconfig.yml to deploy an app and a want to mount a file which contents are stored in a ConfigMap.
When mounting, the files in the folder that is mounted are replaced.
The goal though is to only add/remove/overwrite a specific file in that folder.</p>
<pre><code>spec:
    containers:
          volumeMounts:
          - mountPath: /path/toaSubPath/
            name: somename
</code></pre>
<p>Is this possible in this deploymentconfig?
If so, how can I do that?</p>

<p>Yes, i am using this to mount default configs. Just use subPath and the file name in subPath. Find below sample it works like a charm</p>
<pre><code>spec:
  selector:
     matchLabels:
       name: some_name
  template:
    spec:
      containers:
      - args:
        - bash
        - entrypoint.sh
        image: xyz
        imagePullPolicy: IfNotPresent
        name: some_name
        volumeMounts:
        - mountPath: /full/path/to/be/mounted/default.json
          name: config
          subPath: default.json
      volumes:
      - configMap:
          defaultMode: 420
          name: config
</code></pre>
