-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcirros-vm-volume-mount.yaml
43 lines (42 loc) · 1.54 KB
/
cirros-vm-volume-mount.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
37
38
39
40
41
42
43
apiVersion: v1
kind: Pod
metadata:
name: cirros-vm-volume-mount
annotations:
kubernetes.io/target-runtime: virtlet.cloud
VirtletVCPUCount: "1"
VirtletDiskDriver: virtio
VirtletSSHKeys: |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCaJEcFDXEK2ZbX0ZLS1EIYFZRbDAcRfuVjpstSc0De8+sV1aiu+dePxdkuDRwqFtCyk6dEZkssjOkBXtri00MECLkir6FcH3kKOJtbJ6vy3uaJc9w1ERo+wyl6SkAh/+JTJkp7QRXj8oylW5E20LsbnA/dIwWzAF51PPwF7A7FtNg9DnwPqMkxFo1Th/buOMKbP5ZA1mmNNtmzbMpMfJATvVyiv3ccsSJKOiyQr6UG+j7sc/7jMVz5Xk34Vd0l8GwcB0334MchHckmqDB142h/NCWTr8oLakDNvkfC1YneAfAO41hDkUbxPtVBG5M/o7P4fxoqiHEX+ZLfRxDtHB53 me@localhost
# cloud-init user data
# @virtlet-mount-script@ is replaced with commands that mount
# volumes into this VM
VirtletCloudInitUserDataScript: "@virtlet-mount-script@"
spec:
nodeSelector:
extraRuntime: virtlet
containers:
- name: cirros-vm
image: virtlet.cloud/cirros
imagePullPolicy: IfNotPresent
tty: true
stdin: true
resources:
limits:
memory: 160Mi
# volumeMounts are handled by means of @virtlet-mount-script@ here.
# They can also be handled by means of cloud-init if the image supports it,
# but this is not the case with CirrOS.
volumeMounts:
- name: somevol
mountPath: /somevol
volumes:
# Define an ephemeral volume to be mounted under /somevol
# This can only be used to add some extra disk space
# as it'll be removed with this VM.
- name: somevol
flexVolume:
driver: "virtlet/flexvolume_driver"
options:
type: qcow2
capacity: 40MB