forked from oam-dev/rudr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvolumes.yaml
36 lines (36 loc) · 932 Bytes
/
volumes.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# This is a stand-alone example of using a volume with a component.
apiVersion: core.oam.dev/v1alpha1
kind: ComponentSchematic
metadata:
name: server-with-volume-v1
spec:
workloadType: core.oam.dev/v1alpha1.Server
containers:
- name: server
image: nginx:latest
resources:
volumes:
- name: myvol
mountPath: /myvol
disk:
required: "50M"
ephemeral: false
cpu:
required: 0.1
memory:
required: "128"
---
apiVersion: core.oam.dev/v1alpha1
kind: ApplicationConfiguration
metadata:
name: example-server-with-volume
spec:
components:
- componentName: server-with-volume-v1
instanceName: example-server-with-volume
traits:
- name: volume-mounter.core.oam.dev/v1alpha1
properties:
volumeName: myvol
storageClass: default
# TODO: Add trait to bind a PVC