2020-04-01 07:53:27 +00:00
|
|
|
---
|
|
|
|
kind: Deployment
|
|
|
|
apiVersion: apps/v1
|
|
|
|
metadata:
|
|
|
|
name: csi-azuredisk-controller
|
|
|
|
namespace: kube-system
|
|
|
|
spec:
|
|
|
|
replicas: {{ azure_csi_controller_replicas }}
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: csi-azuredisk-controller
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: csi-azuredisk-controller
|
|
|
|
spec:
|
|
|
|
hostNetwork: true
|
|
|
|
serviceAccountName: csi-azuredisk-controller-sa
|
|
|
|
nodeSelector:
|
2020-04-17 12:51:06 +00:00
|
|
|
kubernetes.io/os: linux
|
2020-04-01 07:53:27 +00:00
|
|
|
priorityClassName: system-cluster-critical
|
|
|
|
tolerations:
|
|
|
|
- key: "node-role.kubernetes.io/master"
|
2021-01-21 16:13:03 +00:00
|
|
|
effect: "NoSchedule"
|
|
|
|
- key: "node-role.kubernetes.io/control-plane"
|
2020-04-01 07:53:27 +00:00
|
|
|
effect: "NoSchedule"
|
2022-01-24 08:41:56 +00:00
|
|
|
{% if azure_csi_controller_affinity %}
|
|
|
|
affinity:
|
|
|
|
{{ azure_csi_controller_affinity | to_nice_yaml | indent(width=8) }}
|
|
|
|
{% endif %}
|
2020-04-01 07:53:27 +00:00
|
|
|
containers:
|
|
|
|
- name: csi-provisioner
|
|
|
|
image: {{ azure_csi_image_repo }}/csi-provisioner:{{ azure_csi_provisioner_image_tag }}
|
2020-05-10 18:37:50 +00:00
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
2020-04-01 07:53:27 +00:00
|
|
|
args:
|
|
|
|
- "--feature-gates=Topology=true"
|
|
|
|
- "--csi-address=$(ADDRESS)"
|
2022-01-24 08:41:56 +00:00
|
|
|
- "--v=2"
|
|
|
|
- "--timeout=15s"
|
|
|
|
- "--leader-election"
|
|
|
|
- "--worker-threads=40"
|
|
|
|
- "--extra-create-metadata=true"
|
|
|
|
- "--strict-topology=true"
|
2020-04-01 07:53:27 +00:00
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
|
|
|
value: /csi/csi.sock
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /csi
|
|
|
|
name: socket-dir
|
|
|
|
resources:
|
|
|
|
limits:
|
2022-01-24 08:41:56 +00:00
|
|
|
memory: 500Mi
|
2020-04-01 07:53:27 +00:00
|
|
|
requests:
|
|
|
|
cpu: 10m
|
|
|
|
memory: 20Mi
|
|
|
|
- name: csi-attacher
|
|
|
|
image: {{ azure_csi_image_repo }}/csi-attacher:{{ azure_csi_attacher_image_tag }}
|
2020-05-10 18:37:50 +00:00
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
2020-04-01 07:53:27 +00:00
|
|
|
args:
|
2022-01-24 08:41:56 +00:00
|
|
|
- "-v=2"
|
2020-04-01 07:53:27 +00:00
|
|
|
- "-csi-address=$(ADDRESS)"
|
2022-01-24 08:41:56 +00:00
|
|
|
- "-timeout=600s"
|
2020-04-01 07:53:27 +00:00
|
|
|
- "-leader-election"
|
2022-01-24 08:41:56 +00:00
|
|
|
- "-worker-threads=500"
|
2020-04-01 07:53:27 +00:00
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
|
|
|
value: /csi/csi.sock
|
|
|
|
volumeMounts:
|
2022-01-24 08:41:56 +00:00
|
|
|
- mountPath: /csi
|
|
|
|
name: socket-dir
|
2020-04-01 07:53:27 +00:00
|
|
|
resources:
|
|
|
|
limits:
|
2022-01-24 08:41:56 +00:00
|
|
|
memory: 500Mi
|
2020-04-01 07:53:27 +00:00
|
|
|
requests:
|
|
|
|
cpu: 10m
|
|
|
|
memory: 20Mi
|
|
|
|
- name: csi-snapshotter
|
|
|
|
image: {{ azure_csi_image_repo }}/csi-snapshotter:{{ azure_csi_snapshotter_image_tag }}
|
|
|
|
args:
|
|
|
|
- "-csi-address=$(ADDRESS)"
|
|
|
|
- "-leader-election"
|
2022-01-24 08:41:56 +00:00
|
|
|
- "-v=2"
|
2020-04-01 07:53:27 +00:00
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
|
|
|
value: /csi/csi.sock
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
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: csi-resizer
|
|
|
|
image: {{ azure_csi_image_repo }}/csi-resizer:{{ azure_csi_resizer_image_tag }}
|
|
|
|
args:
|
|
|
|
- "-csi-address=$(ADDRESS)"
|
2022-01-24 08:41:56 +00:00
|
|
|
- "-v=2"
|
2020-04-01 07:53:27 +00:00
|
|
|
- "-leader-election"
|
2022-01-24 08:41:56 +00:00
|
|
|
- '-handle-volume-inuse-error=false'
|
|
|
|
- "-timeout=60s"
|
2020-04-01 07:53:27 +00:00
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
|
|
|
value: /csi/csi.sock
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
resources:
|
|
|
|
limits:
|
2022-01-24 08:41:56 +00:00
|
|
|
memory: 500Mi
|
2020-04-01 07:53:27 +00:00
|
|
|
requests:
|
|
|
|
cpu: 10m
|
|
|
|
memory: 20Mi
|
|
|
|
- name: liveness-probe
|
|
|
|
image: {{ azure_csi_image_repo }}/livenessprobe:{{ azure_csi_livenessprobe_image_tag }}
|
|
|
|
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=29602
|
2022-01-24 08:41:56 +00:00
|
|
|
- --v=2
|
2020-04-01 07:53:27 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
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)"
|
2022-01-24 08:41:56 +00:00
|
|
|
- "--metrics-address=0.0.0.0:29604"
|
|
|
|
- "--disable-avset-nodes=true"
|
|
|
|
- "--drivername=disk.csi.azure.com"
|
|
|
|
- "--cloud-config-secret-name=cloud-config"
|
|
|
|
- "--cloud-config-secret-namespace=kube-system"
|
2020-04-01 07:53:27 +00:00
|
|
|
ports:
|
|
|
|
- containerPort: 29602
|
|
|
|
name: healthz
|
|
|
|
protocol: TCP
|
|
|
|
- containerPort: 29604
|
|
|
|
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
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /csi
|
|
|
|
name: socket-dir
|
|
|
|
- mountPath: /etc/kubernetes/
|
|
|
|
name: azure-cred
|
|
|
|
readOnly: true
|
|
|
|
- mountPath: /var/lib/waagent/ManagedIdentity-Settings
|
|
|
|
readOnly: true
|
|
|
|
name: msi
|
|
|
|
resources:
|
|
|
|
limits:
|
2022-01-24 08:41:56 +00:00
|
|
|
memory: 500Mi
|
2020-04-01 07:53:27 +00:00
|
|
|
requests:
|
|
|
|
cpu: 10m
|
|
|
|
memory: 20Mi
|
|
|
|
volumes:
|
|
|
|
- name: socket-dir
|
|
|
|
emptyDir: {}
|
|
|
|
- name: azure-cred
|
|
|
|
secret:
|
|
|
|
secretName: cloud-config
|