mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-01 21:59:44 +00:00
CP6-2 wires the CSI driver to SeaweedFS master/volume-server control plane: - Proto: block volume messages in master.proto/volume_server.proto, codegen - Master registry: in-memory BlockVolumeRegistry with Pending->Active status, full/delta heartbeat, inflight lock, placement (fewest volumes) - VS gRPC: AllocateBlockVolume/DeleteBlockVolume handlers, shared naming - Master RPCs: CreateBlockVolume (retry up to 3 servers), Delete, Lookup - Heartbeat: block volume fields wired into bidirectional stream - CSI Controller: VolumeBackend interface (Local + Master), returns volume_context - CSI Node: reads volume_context for remote targets, staged map + IQN derivation - Mode flag: --mode=controller/node/all, --master for control-plane - K8s manifests: csi-driver.yaml, csi-controller.yaml, csi-node.yaml csi-sanity conformance (33 pass, 58 skip) found 6 bugs: - BUG-SANITY-1/2/3: missing VolumeCapabilities/VolumeCapability validation - BUG-SANITY-4: NodePublish used mount instead of bind mount - BUG-SANITY-5: NodeUnpublish didn't remove target path - BUG-SANITY-6: NodeUnpublish failed on unmounted path k3s Level 4 (PVC->Pod data persistence) found 1 bug: - BUG-K3S-1: IsLoggedIn didn't handle iscsiadm exit code 21 226 CSI tests + 54 server tests = 280 new tests, all passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
74 lines
2.1 KiB
YAML
74 lines
2.1 KiB
YAML
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: sw-block-csi-node
|
|
namespace: kube-system
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: sw-block-csi-node
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: sw-block-csi-node
|
|
spec:
|
|
serviceAccountName: sw-block-csi
|
|
hostNetwork: true
|
|
hostPID: true
|
|
containers:
|
|
- name: block-csi
|
|
image: sw-block-csi:local
|
|
imagePullPolicy: Never
|
|
args:
|
|
- "-endpoint=unix:///csi/csi.sock"
|
|
- "-mode=node"
|
|
- "-node-id=$(NODE_NAME)"
|
|
env:
|
|
- name: NODE_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
securityContext:
|
|
privileged: true
|
|
volumeMounts:
|
|
- name: socket-dir
|
|
mountPath: /csi
|
|
- name: kubelet-dir
|
|
mountPath: /var/lib/kubelet
|
|
mountPropagation: Bidirectional
|
|
- name: dev
|
|
mountPath: /dev
|
|
- name: iscsi-dir
|
|
mountPath: /etc/iscsi
|
|
- name: csi-node-driver-registrar
|
|
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.12.0
|
|
args:
|
|
- "--csi-address=/csi/csi.sock"
|
|
- "--kubelet-registration-path=/var/lib/kubelet/plugins/block.csi.seaweedfs.com/csi.sock"
|
|
volumeMounts:
|
|
- name: socket-dir
|
|
mountPath: /csi
|
|
- name: registration-dir
|
|
mountPath: /registration
|
|
volumes:
|
|
- name: socket-dir
|
|
hostPath:
|
|
path: /var/lib/kubelet/plugins/block.csi.seaweedfs.com
|
|
type: DirectoryOrCreate
|
|
- name: kubelet-dir
|
|
hostPath:
|
|
path: /var/lib/kubelet
|
|
type: Directory
|
|
- name: dev
|
|
hostPath:
|
|
path: /dev
|
|
type: Directory
|
|
- name: iscsi-dir
|
|
hostPath:
|
|
path: /etc/iscsi
|
|
type: DirectoryOrCreate
|
|
- name: registration-dir
|
|
hostPath:
|
|
path: /var/lib/kubelet/plugins_registry
|
|
type: Directory
|