zun/template/capsule/capsule-volume.yaml
Kevin Zhao d4a5f9c5e9 Add detailed parameters for Capsule create
Currently we don't have detailed parameters checking
when creating a capsule, this patch add the volume
parameters type checking and several test cases.

Also modify the related template file and design document.
Change some parameters in the template to Kubernetes
friendly.

Modify the field check from "spec" to "template" in
check_capsule_template, since there already a low level spec
field in capsule yaml. Will also modify the python-zunclient.

Part of blueprint introduce-compose

Change-Id: I88c1c248d83d0a27f5a291fcf9d952bb70234dff
Signed-off-by: Kevin Zhao <kevin.zhao@arm.com>
2018-01-12 10:10:36 +08:00

35 lines
672 B
YAML

# use "-" because that the fields have many items
capsuleVersion: beta
kind: capsule
metadata:
name: capsule-volume
labels:
foo: bar
restartPolicy: always
spec:
containers:
- image: test
command:
- "/bin/bash"
workDir: /root
labels:
app: web
volumeMounts:
- name: volume1
mountPath: /data1
- name: volume2
mountPath: /data2
- name: volume3
mountPath: /data3
volumes:
- name: volume1
cinder:
size: 3
autoRemove: True
- name: volume2
cinder:
volumeID: 473e4a6a-99f2-4b42-88ce-5ab03a00b756
- name: volume3
cinder:
volumeID: f4246aa1-1c87-479c-a2ab-4dbaf0c3c7bb