Make storage pool persistent

Closes: #4

Change-Id: I49f4ad0d9b67aa0ea00478cc9be40f5d9f427dd2
This commit is contained in:
Kostiantyn Kalynovskyi 2021-04-21 20:00:52 +00:00
parent 9cc982293b
commit f79c236c02
2 changed files with 35 additions and 12 deletions

View File

@ -31,8 +31,6 @@ spec:
- name: var-lib-libvirt - name: var-lib-libvirt
mountPath: /var/lib/libvirt mountPath: /var/lib/libvirt
mountPropagation: Bidirectional mountPropagation: Bidirectional
- name: var-lib-libvirt-images
mountPath: /var/lib/libvirt/images
- name: run - name: run
mountPath: /run mountPath: /run
- name: dev - name: dev
@ -41,8 +39,16 @@ spec:
mountPath: /sys/fs/cgroup mountPath: /sys/fs/cgroup
- name: logs - name: logs
mountPath: /var/log/libvirt mountPath: /var/log/libvirt
- name: vino-storage-pool - name: var-lib-vino-pool
mountPath: /var/lib/libvirt/vino mountPath: /var/lib/libvirt/vino-pool
- name: etc-qemu
mountPath: /etc/libvirt/qemu
- name: etc-nwfilter
mountPath: /etc/libvirt/nwfilter
- name: etc-hooks
mountPath: /etc/libvirt/hooks
- name: etc-storage
mountPath: /etc/libvirt/storage
- name: sushy - name: sushy
ports: ports:
- containerPort: 8000 - containerPort: 8000
@ -53,8 +59,8 @@ spec:
volumeMounts: volumeMounts:
- name: var-run-libvirt - name: var-run-libvirt
mountPath: /var/run/libvirt mountPath: /var/run/libvirt
- name: var-lib-libvirt-images - name: var-lib-libvirt
mountPath: /var/lib/libvirt/images mountPath: /var/lib/libvirt
- name: labeler - name: labeler
image: quay.io/airshipit/nodelabeler image: quay.io/airshipit/nodelabeler
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
@ -98,6 +104,8 @@ spec:
mountPath: /var/lib/libvirt mountPath: /var/lib/libvirt
- name: var-run-libvirt - name: var-run-libvirt
mountPath: /var/run/libvirt mountPath: /var/run/libvirt
- name: var-lib-vino-pool
mountPath: /var/lib/libvirt/vino-pool
- name: run - name: run
mountPath: /run mountPath: /run
- name: dev - name: dev
@ -113,9 +121,6 @@ spec:
- name: var-lib-libvirt - name: var-lib-libvirt
hostPath: hostPath:
path: /var/lib/libvirt path: /var/lib/libvirt
- name: var-lib-libvirt-images
hostPath:
path: /var/lib/libvirt/images
- name: run - name: run
hostPath: hostPath:
path: /run path: /run
@ -149,5 +154,23 @@ spec:
defaultMode: 0555 defaultMode: 0555
- name: pod-tmp - name: pod-tmp
emptyDir: {} emptyDir: {}
- name: vino-storage-pool - name: var-lib-vino-pool
emptyDir: {} hostPath:
path: /var/lib/vino-pool
type: DirectoryOrCreate
- name: etc-qemu
hostPath:
path: /etc/vino-qemu
type: DirectoryOrCreate
- name: etc-storage
hostPath:
path: /etc/vino-storage
type: DirectoryOrCreate
- name: etc-nwfilter
hostPath:
path: /etc/vino-nwfilter
type: DirectoryOrCreate
- name: etc-hooks
hostPath:
path: /etc/vino-hooks
type: DirectoryOrCreate

View File

@ -4,7 +4,7 @@ libvirtStorage:
<pool type='dir'> <pool type='dir'>
<name>vino-default</name> <name>vino-default</name>
<target> <target>
<path>/var/lib/libvirt/vino</path> <path>/var/lib/libvirt/vino-pool</path>
<permissions> <permissions>
<mode>0711</mode> <mode>0711</mode>
<owner>0</owner> <owner>0</owner>