153 lines
4.7 KiB
YAML
153 lines
4.7 KiB
YAML
kind: DaemonSet
|
|
apiVersion: apps/v1
|
|
metadata:
|
|
name: csi-azurefile-node
|
|
namespace: {{ .Release.Namespace }}
|
|
{{ include "azurefile.labels" . | indent 2 }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: csi-azurefile-node
|
|
template:
|
|
metadata:
|
|
{{ include "azurefile.labels" . | indent 6 }}
|
|
app: csi-azurefile-node
|
|
spec:
|
|
hostNetwork: true
|
|
nodeSelector:
|
|
kubernetes.io/os: linux
|
|
priorityClassName: system-node-critical
|
|
containers:
|
|
- name: liveness-probe
|
|
imagePullPolicy: Always
|
|
volumeMounts:
|
|
- mountPath: /csi
|
|
name: socket-dir
|
|
image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}"
|
|
args:
|
|
- --csi-address=/csi/csi.sock
|
|
- --connection-timeout=3s
|
|
- --health-port=9702
|
|
- --v=5
|
|
resources:
|
|
limits:
|
|
cpu: 200m
|
|
memory: 200Mi
|
|
requests:
|
|
cpu: 10m
|
|
memory: 20Mi
|
|
- name: node-driver-registrar
|
|
image: "{{ .Values.image.nodeDriverRegistrar.repository }}:{{ .Values.image.nodeDriverRegistrar.tag }}"
|
|
args:
|
|
- --csi-address=$(ADDRESS)
|
|
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
|
|
- --v=5
|
|
lifecycle:
|
|
preStop:
|
|
exec:
|
|
command: ["/bin/sh", "-c", "rm -rf /registration/file.csi.azure.com-reg.sock /csi/csi.sock"]
|
|
env:
|
|
- name: ADDRESS
|
|
value: /csi/csi.sock
|
|
- name: DRIVER_REG_SOCK_PATH
|
|
value: /var/lib/kubelet/plugins/file.csi.azure.com/csi.sock
|
|
volumeMounts:
|
|
- name: socket-dir
|
|
mountPath: /csi
|
|
- name: registration-dir
|
|
mountPath: /registration
|
|
resources:
|
|
limits:
|
|
cpu: 200m
|
|
memory: 200Mi
|
|
requests:
|
|
cpu: 10m
|
|
memory: 20Mi
|
|
- name: azurefile
|
|
image: "{{ .Values.image.azurefile.repository }}:{{ .Values.image.azurefile.tag }}"
|
|
args:
|
|
- "--v=5"
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
|
- "--nodeid=$(KUBE_NODE_NAME)"
|
|
ports:
|
|
- containerPort: 9702
|
|
name: healthz
|
|
protocol: TCP
|
|
livenessProbe:
|
|
failureThreshold: 5
|
|
httpGet:
|
|
path: /healthz
|
|
port: healthz
|
|
initialDelaySeconds: 30
|
|
timeoutSeconds: 10
|
|
periodSeconds: 30
|
|
env:
|
|
- name: AZURE_CREDENTIAL_FILE
|
|
value: "/etc/kubernetes/azure.json"
|
|
- name: CSI_ENDPOINT
|
|
value: unix:///csi/csi.sock
|
|
- name: KUBE_NODE_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: spec.nodeName
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
securityContext:
|
|
privileged: true
|
|
volumeMounts:
|
|
- mountPath: /csi
|
|
name: socket-dir
|
|
- mountPath: /var/lib/kubelet/
|
|
mountPropagation: Bidirectional
|
|
name: mountpoint-dir
|
|
- mountPath: /etc/kubernetes/
|
|
name: azure-cred
|
|
- mountPath: /var/lib/waagent/ManagedIdentity-Settings
|
|
readOnly: true
|
|
name: msi
|
|
- mountPath: /devhost #use /devhost to avoid conflict
|
|
name: device-dir
|
|
- mountPath: /sys/bus/scsi/devices
|
|
name: sys-devices-dir
|
|
- mountPath: /sys/class/scsi_host/
|
|
name: scsi-host-dir
|
|
resources:
|
|
limits:
|
|
cpu: 2
|
|
memory: 2Gi
|
|
requests:
|
|
cpu: 10m
|
|
memory: 20Mi
|
|
volumes:
|
|
- hostPath:
|
|
path: /var/lib/kubelet/plugins/file.csi.azure.com
|
|
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
|
|
- hostPath:
|
|
path: /etc/kubernetes/
|
|
type: Directory
|
|
name: azure-cred
|
|
- hostPath:
|
|
path: /var/lib/waagent/ManagedIdentity-Settings
|
|
name: msi
|
|
- hostPath:
|
|
path: /dev
|
|
type: Directory
|
|
name: device-dir
|
|
- hostPath:
|
|
path: /sys/bus/scsi/devices
|
|
type: Directory
|
|
name: sys-devices-dir
|
|
- hostPath:
|
|
path: /sys/class/scsi_host/
|
|
type: Directory
|
|
name: scsi-host-dir
|