Skip to content

Commit

Permalink
Merge pull request #20 from peter-wangxu/fixes/persist_provisioner_root
Browse files Browse the repository at this point in the history
Make provisioner root persistent across reboot
  • Loading branch information
k8s-ci-robot authored Mar 8, 2019
2 parents 51278a4 + d699be7 commit d541b21
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions deploy/hostpath/csi-hostpath-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ spec:
name: socket-dir
- mountPath: /registration
name: registration-dir
- mountPath: /csi-data-dir
name: csi-data-dir

- name: hostpath
image: quay.io/k8scsi/hostpathplugin:v1.0.1
Expand Down Expand Up @@ -104,3 +106,8 @@ spec:
path: /var/lib/kubelet/plugins
type: Directory
name: plugins-dir
# 'path' is where PV data is persisted on host.
# using /tmp is also possible while the PVs will not available after plugin container recreation or host reboot
path: /var/lib/csi-hostpath-data/
type: DirectoryOrCreate
name: csi-data-dir
4 changes: 2 additions & 2 deletions pkg/hostpath/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ import (

const (
deviceID = "deviceID"
provisionRoot = "/tmp/"
snapshotRoot = "/tmp/"
provisionRoot = "/csi-data-dir"
snapshotRoot = "/csi-data-dir"
maxStorageCapacity = tib
)

Expand Down

0 comments on commit d541b21

Please sign in to comment.