lburgazzoli commented on issue #554: resources: add options to configure mount path and key URL: https://github.com/apache/camel-k/pull/554#issuecomment-472616690 the problem with subpath is that it is not allowed in knative On Wed, 13 Mar 2019 at 22:12, Antonin Stefanutti <[email protected]> wrote: > if subPath is empty, it defaults to \, that the corresponding volume root > directory gets mounted, which for a config map is all the keys (c.f. > kubernetes/kubernetes#22575 > <https://github.com/kubernetes/kubernetes/pull/22575>). In that case > mountPath must be a directory. > > An alternative would be to use the path field to specify the file path > for a specific ConfigMap item, e.g.: > > resources: > - configMap: > name: nexus3 > items: > - key: nexus3-persistent-template.yaml > path: keys > mountPath: /etc/camel/resources/n3/ > type: data > > See: > https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#add-configmap-data-to-a-specific-path-in-the-volume > . > > But the added value of subPath is that you can project a config map key > into an existing directory without overriding the whole directory. > > We could also reuse the configMapRef field name as in k8s.io/api/core/v1, > e.g.: > > resources: > - configMapRef: > name: nexus3 > subPath: nexus3-persistent-template.yaml > mountPath: /etc/camel/resources/n3/nexus.yaml > type: data > > — > > > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/apache/camel-k/pull/554#issuecomment-472607296>, or mute > the thread > <https://github.com/notifications/unsubscribe-auth/AByEhcgGFAp3YeX67MAkucVHg89PQ4Kyks5vWWmggaJpZM4buTm-> > . > -- -- Luca Burgazzoli
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
