astefanutti commented on issue #554: resources: add options to configure mount path and key URL: https://github.com/apache/camel-k/pull/554#issuecomment-472607296 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). 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 ```
---------------------------------------------------------------- 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
