Closed
Description
Odo will have a need for multiple components to mount the same volume. There isn’t an option in devfiles right now to define a volume once, and have multiple components mount that same volume.
To work around this, we’re proposing adding a way to the devfile spec that allows you to define a volume once (a top level ‘volumes’ field), then easily add it to other components via a ‘volumeMount’ field. This is similar to how Kubernetes pods handle volumes.
Example:
---
projects:
- name: "my-project"
components:
- container:
image: "busybox"
name: "mycontainer"
memoryLimit: "128M"
mountSources: true
volumeMount:
- name: my-data-volume
path: /some/folder
- kubernetes:
referenceContent: |
kind: Pod
metadata:
name: sample-pod
spec:
containers:
image: docker.io/my-sample-image:latest
volumeMounts:
- mountPath: /some/path
name: my-data-volume
- volume:
name: my-data-volume
size: 5Gi
Metadata
Metadata
Assignees
Labels
No labels