Make HostPath CSI driver persistent across restart.

The driver dynamically provisions its volumes in /tmp. To preserve the data
across driver restarts, the directory must be mapped to more persistent
place, /tmp on the host seems to be the safest choice.
pull/564/head
Jan Safranek 2018-11-26 12:45:01 +01:00
parent 51fc7930d6
commit 8fb3e9fe2a
2 changed files with 12 additions and 0 deletions

View File

@ -55,6 +55,8 @@ spec:
- mountPath: /var/lib/kubelet/pods
mountPropagation: Bidirectional
name: mountpoint-dir
- mountPath: /tmp
name: tmp
volumes:
- hostPath:
path: /var/lib/kubelet/plugins/csi-hostpath-v0
@ -68,3 +70,7 @@ spec:
path: /var/lib/kubelet/plugins
type: Directory
name: registration-dir
- name: tmp
hostPath:
path: /tmp
type: Directory

View File

@ -55,6 +55,8 @@ spec:
- mountPath: /var/lib/kubelet/pods
mountPropagation: Bidirectional
name: mountpoint-dir
- mountPath: /tmp
name: tmp
volumes:
- hostPath:
path: /var/lib/kubelet/plugins/csi-hostpath
@ -68,3 +70,7 @@ spec:
path: /var/lib/kubelet/plugins_registry
type: Directory
name: registration-dir
- name: tmp
hostPath:
path: /tmp
type: Directory