From 8fb3e9fe2a985a0b7364bea2f809055b641a2a4d Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Mon, 26 Nov 2018 12:45:01 +0100 Subject: [PATCH] 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. --- .../hostpath/hostpath-v0/csi-hostpathplugin.yaml | 6 ++++++ .../storage-csi/hostpath/hostpath/csi-hostpathplugin.yaml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/test/e2e/testing-manifests/storage-csi/hostpath/hostpath-v0/csi-hostpathplugin.yaml b/test/e2e/testing-manifests/storage-csi/hostpath/hostpath-v0/csi-hostpathplugin.yaml index a8f34832d1d..f2b12c44153 100644 --- a/test/e2e/testing-manifests/storage-csi/hostpath/hostpath-v0/csi-hostpathplugin.yaml +++ b/test/e2e/testing-manifests/storage-csi/hostpath/hostpath-v0/csi-hostpathplugin.yaml @@ -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 diff --git a/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpathplugin.yaml b/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpathplugin.yaml index 237b759a1c3..338be0ee8f1 100644 --- a/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpathplugin.yaml +++ b/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpathplugin.yaml @@ -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