Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make provisioner root persistent across reboot #20

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions deploy/hostpath/csi-hostpath-plugin.yaml
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/
peter-wangxu marked this conversation as resolved.
Show resolved Hide resolved
type: DirectoryOrCreate
name: csi-data-dir
4 changes: 2 additions & 2 deletions pkg/hostpath/controllerserver.go
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