-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow volumes to be shared across components #19
Comments
@johnmcollier will provide another example using a component of type Kubernetes |
Does it duplicate #16 ? There is another interesting option to think about - add an ability to specify PVC name for volume eclipse-che/che#15652 |
@sleshchenko Yeah it's the same, since there's already some discussion here, I'll close out my issue in favour of this one. |
Sample with Kubernetes component: ---
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 In this scenario, the Kubernetes component references the |
Reviewed and approved the version provided on this comment. |
Signed-off-by: David Festal <dfestal@redhat.com>
* Implement agreement on issue #18 * Implement agreement on issue #17 * Implement agreement on issue #21 * Implement agreement on issue #22 * Implement agreement on issue #27 * Implement agreement on issue #9 * Implement agreement on issue #10 * Fix PR comments about issue #9 PR comment #35 (comment) * Fix PR comments about issue #17 PR comment #35 (comment) * Implement agreement on issue #14 and #19 * Add the spring boot example * Implement agreement on issue #32 * Fix last PR comments Signed-off-by: David Festal <dfestal@redhat.com> Co-Authored-By: Sergii Leshchenko <sleshche@redhat.com>
implemented |
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:
The text was updated successfully, but these errors were encountered: