Files
seaweedfs/seaweed-block/deploy/k8s/alpha/csi-node.yaml
T
Ping Qiu 5c4f995c55 v0.2 alpha: Day-1 activation and first-volume loop (#48)
Package the Kubernetes alpha into a script-based Day-1 activation loop: activate the stack, create the first PVC-backed volume, verify writer/reader data, collect product-owned observation evidence, render a local read-only report, and clean up.

Includes multi-node-safe activation defaults, first-volume example automation, read-only ops report output, README/quickstart/release note updates, and review-driven hardening for fail-fast configuration, promotion evidence, inventory fail-closed behavior, and test guards.

Validated by Day-1 activation run 20260517-205252-04e9 and read-only report run 20260517-212358-bfba. Local targeted tests passed.
2026-05-18 16:43:35 -07:00

101 lines
3.0 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
dnsPolicy: ClusterFirstWithHostNet
hostPID: true
initContainers:
- name: load-iscsi-tcp
image: sw-block-csi:local
imagePullPolicy: Never
command: ["/bin/sh", "-c"]
args:
- "modprobe iscsi_tcp || true; modprobe nvme_tcp || true; modprobe dm_multipath || true; modprobe scsi_dh_alua || true"
securityContext:
privileged: true
volumeMounts:
- name: modules-dir
mountPath: /lib/modules
readOnly: true
containers:
- name: block-csi
image: sw-block-csi:local
imagePullPolicy: Never
args:
- "--endpoint=unix:///csi/csi.sock"
- "--master=$(BLOCKMASTER_ADDR)"
- "--node-id=$(NODE_NAME)"
env:
- name: BLOCKMASTER_ADDR
value: "blockmaster.kube-system.svc.cluster.local:9333"
- 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: udev-run
mountPath: /run/udev
readOnly: true
- name: csi-node-driver-registrar
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.13.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: udev-run
hostPath:
path: /run/udev
type: Directory
- name: modules-dir
hostPath:
path: /lib/modules
type: Directory
- name: registration-dir
hostPath:
path: /var/lib/kubelet/plugins_registry
type: Directory