125 lines
3.5 KiB
YAML
125 lines
3.5 KiB
YAML
---
|
|
kind: DaemonSet
|
|
apiVersion: apps/v1
|
|
metadata:
|
|
name: csi-smb-node
|
|
namespace: kube-system
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: csi-smb-node
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: csi-smb-node
|
|
spec:
|
|
nodeSelector:
|
|
kubernetes.io/os: linux
|
|
priorityClassName: system-node-critical
|
|
tolerations:
|
|
- operator: "Exists"
|
|
containers:
|
|
- name: liveness-probe
|
|
volumeMounts:
|
|
- mountPath: /csi
|
|
name: socket-dir
|
|
image: mcr.microsoft.com/oss/kubernetes-csi/livenessprobe:v1.1.0
|
|
args:
|
|
- --csi-address=/csi/csi.sock
|
|
- --connection-timeout=3s
|
|
- --health-port=29643
|
|
- --v=5
|
|
resources:
|
|
limits:
|
|
cpu: 100m
|
|
memory: 100Mi
|
|
requests:
|
|
cpu: 10m
|
|
memory: 20Mi
|
|
- name: node-driver-registrar
|
|
image: mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar:v1.2.0
|
|
args:
|
|
- --csi-address=$(ADDRESS)
|
|
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
|
|
- --v=5
|
|
lifecycle:
|
|
preStop:
|
|
exec:
|
|
command: ["/bin/sh", "-c", "rm -rf /registration/smb.csi.k8s.io-reg.sock /csi/csi.sock"]
|
|
env:
|
|
- name: ADDRESS
|
|
value: /csi/csi.sock
|
|
- name: DRIVER_REG_SOCK_PATH
|
|
value: /var/lib/kubelet/plugins/smb.csi.k8s.io/csi.sock
|
|
volumeMounts:
|
|
- name: socket-dir
|
|
mountPath: /csi
|
|
- name: registration-dir
|
|
mountPath: /registration
|
|
resources:
|
|
limits:
|
|
cpu: 100m
|
|
memory: 100Mi
|
|
requests:
|
|
cpu: 10m
|
|
memory: 20Mi
|
|
- name: smb
|
|
image: mcr.microsoft.com/k8s/csi/smb-csi:v0.3.0
|
|
imagePullPolicy: IfNotPresent
|
|
args:
|
|
- "--v=5"
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
|
- "--nodeid=$(KUBE_NODE_NAME)"
|
|
ports:
|
|
- containerPort: 29643
|
|
name: healthz
|
|
protocol: TCP
|
|
- containerPort: 29645
|
|
name: metrics
|
|
protocol: TCP
|
|
livenessProbe:
|
|
failureThreshold: 5
|
|
httpGet:
|
|
path: /healthz
|
|
port: healthz
|
|
initialDelaySeconds: 30
|
|
timeoutSeconds: 10
|
|
periodSeconds: 30
|
|
env:
|
|
- name: CSI_ENDPOINT
|
|
value: unix:///csi/csi.sock
|
|
- name: KUBE_NODE_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: spec.nodeName
|
|
securityContext:
|
|
privileged: true
|
|
volumeMounts:
|
|
- mountPath: /csi
|
|
name: socket-dir
|
|
- mountPath: /var/lib/kubelet/
|
|
mountPropagation: Bidirectional
|
|
name: mountpoint-dir
|
|
resources:
|
|
limits:
|
|
cpu: 200m
|
|
memory: 200Mi
|
|
requests:
|
|
cpu: 10m
|
|
memory: 20Mi
|
|
volumes:
|
|
- hostPath:
|
|
path: /var/lib/kubelet/plugins/smb.csi.k8s.io
|
|
type: DirectoryOrCreate
|
|
name: socket-dir
|
|
- hostPath:
|
|
path: /var/lib/kubelet/
|
|
type: DirectoryOrCreate
|
|
name: mountpoint-dir
|
|
- hostPath:
|
|
path: /var/lib/kubelet/plugins_registry/
|
|
type: DirectoryOrCreate
|
|
name: registration-dir
|
|
---
|