Skip to content

Commit

Permalink
feat: support runOnControlPlane on csi-snapshot-controller
Browse files Browse the repository at this point in the history
  • Loading branch information
andyzhangx committed Dec 16, 2024
1 parent 0a51425 commit 87fe385
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
Binary file modified charts/latest/azurefile-csi-driver-v0.0.0.tgz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,34 @@ spec:
serviceAccountName: {{ .Values.serviceAccount.snapshotController }}
nodeSelector:
kubernetes.io/os: linux
# runOnControlPlane=true or runOnMaster=true only takes effect if affinity is not set
{{- if contains (tpl "{{ .Values.controller.affinity }}" .) "nodeSelectorTerms" }}
{{- with .Values.controller.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- else if or .Values.controller.runOnControlPlane .Values.controller.runOnMaster}}
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
{{- if .Values.controller.runOnControlPlane}}
- key: node-role.kubernetes.io/control-plane
operator: Exists
{{- end}}
{{- if .Values.controller.runOnMaster}}
- key: node-role.kubernetes.io/master
operator: Exists
{{- end}}
{{- end }}
priorityClassName: system-cluster-critical
securityContext:
seccompProfile:
type: RuntimeDefault
{{- with .Values.controller.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.controller.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down

0 comments on commit 87fe385

Please sign in to comment.