2020-04-01 07:53:27 +00:00
|
|
|
---
|
|
|
|
kind: DaemonSet
|
|
|
|
apiVersion: apps/v1
|
|
|
|
metadata:
|
|
|
|
name: csi-azuredisk-node
|
|
|
|
namespace: kube-system
|
|
|
|
spec:
|
2022-01-24 08:41:56 +00:00
|
|
|
updateStrategy:
|
|
|
|
rollingUpdate:
|
|
|
|
maxUnavailable: 1
|
|
|
|
type: RollingUpdate
|
2020-04-01 07:53:27 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: csi-azuredisk-node
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: csi-azuredisk-node
|
|
|
|
spec:
|
|
|
|
hostNetwork: true
|
2022-01-24 08:41:56 +00:00
|
|
|
dnsPolicy: Default
|
|
|
|
serviceAccountName: csi-azuredisk-node-sa
|
2020-04-01 07:53:27 +00:00
|
|
|
nodeSelector:
|
2020-04-17 12:51:06 +00:00
|
|
|
kubernetes.io/os: linux
|
2022-01-24 08:41:56 +00:00
|
|
|
{% if azure_csi_node_affinity %}
|
|
|
|
affinity:
|
|
|
|
{{ azure_csi_node_affinity | to_nice_yaml | indent(width=8) }}
|
|
|
|
{% endif %}
|
2020-04-01 07:53:27 +00:00
|
|
|
priorityClassName: system-node-critical
|
2022-01-24 08:41:56 +00:00
|
|
|
tolerations:
|
|
|
|
- operator: Exists
|
2020-04-01 07:53:27 +00:00
|
|
|
containers:
|
|
|
|
- name: liveness-probe
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /csi
|
|
|
|
name: socket-dir
|
|
|
|
image: {{ azure_csi_image_repo }}/livenessprobe:{{ azure_csi_livenessprobe_image_tag }}
|
2020-05-10 18:37:50 +00:00
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
2020-04-01 07:53:27 +00:00
|
|
|
args:
|
|
|
|
- --csi-address=/csi/csi.sock
|
2022-01-24 08:41:56 +00:00
|
|
|
- --probe-timeout=3s
|
2020-04-01 07:53:27 +00:00
|
|
|
- --health-port=29603
|
2022-01-24 08:41:56 +00:00
|
|
|
- --v=2
|
2020-04-01 07:53:27 +00:00
|
|
|
resources:
|
|
|
|
limits:
|
2022-01-24 08:41:56 +00:00
|
|
|
memory: 100Mi
|
2020-04-01 07:53:27 +00:00
|
|
|
requests:
|
|
|
|
cpu: 10m
|
|
|
|
memory: 20Mi
|
|
|
|
- name: node-driver-registrar
|
|
|
|
image: {{ azure_csi_image_repo }}/csi-node-driver-registrar:{{ azure_csi_node_registrar_image_tag }}
|
|
|
|
args:
|
|
|
|
- --csi-address=$(ADDRESS)
|
|
|
|
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
|
2022-01-24 08:41:56 +00:00
|
|
|
- --v=2
|
|
|
|
livenessProbe:
|
|
|
|
exec:
|
|
|
|
command:
|
|
|
|
- /csi-node-driver-registrar
|
|
|
|
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
|
|
|
|
- --mode=kubelet-registration-probe
|
|
|
|
initialDelaySeconds: 30
|
|
|
|
timeoutSeconds: 15
|
2020-04-01 07:53:27 +00:00
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
|
|
|
value: /csi/csi.sock
|
|
|
|
- name: DRIVER_REG_SOCK_PATH
|
|
|
|
value: /var/lib/kubelet/plugins/disk.csi.azure.com/csi.sock
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
- name: registration-dir
|
|
|
|
mountPath: /registration
|
|
|
|
resources:
|
|
|
|
limits:
|
2022-01-24 08:41:56 +00:00
|
|
|
memory: 100Mi
|
2020-04-01 07:53:27 +00:00
|
|
|
requests:
|
|
|
|
cpu: 10m
|
|
|
|
memory: 20Mi
|
|
|
|
- name: azuredisk
|
|
|
|
image: {{ azure_csi_plugin_image_repo }}/azuredisk-csi:{{ azure_csi_plugin_image_tag }}
|
2020-05-10 18:37:50 +00:00
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
2020-04-01 07:53:27 +00:00
|
|
|
args:
|
|
|
|
- "--v=5"
|
|
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
|
|
|
- "--nodeid=$(KUBE_NODE_NAME)"
|
|
|
|
- "--metrics-address=0.0.0.0:29605"
|
2022-01-24 08:41:56 +00:00
|
|
|
- "--enable-perf-optimization=true"
|
|
|
|
- "--drivername=disk.csi.azure.com"
|
|
|
|
- "--volume-attach-limit=-1"
|
|
|
|
- "--cloud-config-secret-name=cloud-config"
|
|
|
|
- "--cloud-config-secret-namespace=kube-system"
|
2020-04-01 07:53:27 +00:00
|
|
|
ports:
|
|
|
|
- containerPort: 29603
|
|
|
|
name: healthz
|
|
|
|
protocol: TCP
|
|
|
|
- containerPort: 29605
|
|
|
|
name: metrics
|
|
|
|
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
|
|
|
|
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: /dev
|
|
|
|
name: device-dir
|
|
|
|
- mountPath: /sys/bus/scsi/devices
|
|
|
|
name: sys-devices-dir
|
|
|
|
- mountPath: /sys/class/scsi_host/
|
|
|
|
name: scsi-host-dir
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
memory: 200Mi
|
|
|
|
requests:
|
|
|
|
cpu: 10m
|
|
|
|
memory: 20Mi
|
|
|
|
volumes:
|
|
|
|
- hostPath:
|
|
|
|
path: /var/lib/kubelet/plugins/disk.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
|
2022-08-18 07:56:36 +00:00
|
|
|
- secret:
|
|
|
|
defaultMode: 0644
|
|
|
|
secretName: cloud-config
|
2022-01-24 08:41:56 +00:00
|
|
|
name: azure-cred
|
2020-04-01 07:53:27 +00:00
|
|
|
- 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
|