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

add non standard volumes for seaweedfs-csi-driver node; improve helm… #86

Merged
merged 2 commits into from
Sep 7, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

.vscode
*.iml
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
```
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/seaweedfs-csi-driver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions deploy/helm/seaweedfs-csi-driver/templates/daemonset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
12 changes: 9 additions & 3 deletions deploy/helm/seaweedfs-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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