aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2022-09-07 01:41:40 -0700
committerGitHub <noreply@github.com>2022-09-07 01:41:40 -0700
commitbe376232f1f05f73673966290a0958c70e9e6d3a (patch)
treee15598b4a6eda90de49fb0895c61e7134d194771
parent78d6ce732aaa87a8f6a18084ffe97bfbf4eadd25 (diff)
parent93fbf9c9c15b3439d285f3863323aa84c1598b76 (diff)
downloadseaweedfs-csi-driver-be376232f1f05f73673966290a0958c70e9e6d3a.tar.xz
seaweedfs-csi-driver-be376232f1f05f73673966290a0958c70e9e6d3a.zip
Merge pull request #86 from thedataflows/master
add non standard volumes for seaweedfs-csi-driver node; improve helm…
-rw-r--r--.gitignore2
-rw-r--r--README.md25
-rw-r--r--deploy/helm/seaweedfs-csi-driver/Chart.yaml2
-rw-r--r--deploy/helm/seaweedfs-csi-driver/templates/daemonset.yml8
-rw-r--r--deploy/helm/seaweedfs-csi-driver/values.yaml12
5 files changed, 28 insertions, 21 deletions
diff --git a/.gitignore b/.gitignore
index d132cb8..1c659fb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
-
+.vscode
*.iml
diff --git a/README.md b/README.md
index 7897bd6..20ab423 100644
--- a/README.md
+++ b/README.md
@@ -44,7 +44,7 @@ $ kubectl apply -f deploy/kubernetes/sample-busybox-pod.yaml
```
$ kubectl exec my-csi-app -- df -h
```
-8. Clean up
+8. Clean up
```
$ kubectl delete -f deploy/kubernetes/sample-busybox-pod.yaml
$ kubectl delete -f deploy/kubernetes/sample-seaweedfs-pvc.yaml
@@ -53,7 +53,7 @@ $ kubectl delete -f deploy/kubernetes/seaweedfs-csi.yaml
# Deployment by helm chart
-1. Clone project
+1. Clone project
```bash
git clone https://github.com/seaweedfs/seaweedfs-csi-driver.git
```
@@ -68,16 +68,17 @@ helm uninstall seaweedfs-csi-driver
```
# Safe rollout update
-When update DaemonSet ( DS ) break processes who implements fuse mount.
-And now new pod not remount net device
-
-For better safe update use ``node.updateStrategy.type: OnDelete`` in this need manual update. Steps:
- - delete DS pods on node where no exists seaweedfs PV
- - cordon or taint node
- - evict or delete pods with seaweedfs PV
- - delete DS pod on node
- - uncordon or remove taint on node
- - repeat all steps on [all nodes
+Updating seaweed-csi-driver DaemonSet (DS) will break processeses who implement fuse mount:
+newly created pods will not remount net device.
+
+For safe update set `node.updateStrategy.type: OnDelete` for manual update. Steps:
+
+ 1. delete DS pods on the node where there is no seaweedfs PV
+ 2. cordon or taint node
+ 3. evict or delete pods with seaweedfs PV
+ 4. delete DS pod on node
+ 5. uncordon or remove taint on node
+ 6. repeat all steps on [all nodes]
# Static and dynamic provisioning
diff --git a/deploy/helm/seaweedfs-csi-driver/Chart.yaml b/deploy/helm/seaweedfs-csi-driver/Chart.yaml
index ac9c7aa..449ad42 100644
--- a/deploy/helm/seaweedfs-csi-driver/Chart.yaml
+++ b/deploy/helm/seaweedfs-csi-driver/Chart.yaml
@@ -2,5 +2,5 @@ apiVersion: v2
name: seaweedfs-csi-driver
description: A Helm chart for Kubernetes
type: application
-version: 0.1.1
+version: 0.1.2
appVersion: latest
diff --git a/deploy/helm/seaweedfs-csi-driver/templates/daemonset.yml b/deploy/helm/seaweedfs-csi-driver/templates/daemonset.yml
index 7c47649..f903535 100644
--- a/deploy/helm/seaweedfs-csi-driver/templates/daemonset.yml
+++ b/deploy/helm/seaweedfs-csi-driver/templates/daemonset.yml
@@ -105,19 +105,19 @@ spec:
volumes:
- name: registration-dir
hostPath:
- path: /var/lib/kubelet/plugins_registry/
+ path: {{ .Values.node.volumes.registration_dir }}
type: DirectoryOrCreate
- name: plugin-dir
hostPath:
- path: /var/lib/kubelet/plugins/{{ .Values.driverName }}
+ path: {{ .Values.node.volumes.plugins_dir }}/{{ .Values.driverName }}
type: DirectoryOrCreate
- name: plugins-dir
hostPath:
- path: /var/lib/kubelet/plugins
+ path: {{ .Values.node.volumes.plugins_dir }}
type: Directory
- name: pods-mount-dir
hostPath:
- path: /var/lib/kubelet/pods
+ path: {{ .Values.node.volumes.pods_mount_dir }}
type: Directory
- name: device-dir
hostPath:
diff --git a/deploy/helm/seaweedfs-csi-driver/values.yaml b/deploy/helm/seaweedfs-csi-driver/values.yaml
index bb5af07..80637d6 100644
--- a/deploy/helm/seaweedfs-csi-driver/values.yaml
+++ b/deploy/helm/seaweedfs-csi-driver/values.yaml
@@ -30,7 +30,7 @@ seaweedfsCsiPlugin:
image: chrislusf/seaweedfs-csi-driver:latest
resources: {}
-# NOT Change, for future releases. Must be equal Name in GetPluginInfoResponse
+# DO NOT Change. Reserved for future releases. Must be equal Name in GetPluginInfoResponse
driverName: seaweedfs-csi-driver
controller:
@@ -40,11 +40,17 @@ controller:
node:
# Deploy node daemonset
enabled: true
- # When pod on node be recreated all pod on same node lost PV.
- # For safe update use updateStrategy.type: OnDelete and manual move pods who use PV and delete damonset pod
+ # When seaweedfs-csi-driver-node pod on node is recreated, all pods on same node using seaweed-csi PV will stop working.
+ # For safe update set updateStrategy.type: OnDelete and manually move pods who use seaweed-csi PV, then delete seaweedfs-csi-driver-node damonset pod
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
affinity: {}
tolerations: {}
+
+ ## Change if not using standard kubernetes deployments, like k0s
+ volumes:
+ registration_dir: /var/lib/kubelet/plugins_registry
+ plugins_dir: /var/lib/kubelet/plugins
+ pods_mount_dir: /var/lib/kubelet/pods