Skip to content

Commit 5a9dda4

Browse files
committed
fix: runOnControlPlane chart config in v1.16.0
1 parent dc12f41 commit 5a9dda4

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

charts/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88

99
- run smb-controller on control plane node: `--set controller.runOnControlPlane=true`
1010
- Microk8s based kubernetes recommended settings:
11-
- `--set linux.kubelet="/var/snap/microk8s/common/var/lib/kubelet"` - sets correct path to microk8s kubelet even
12-
though a user has a folder link to it.
11+
- `--set linux.kubelet="/var/snap/microk8s/common/var/lib/kubelet"` - sets correct path to microk8s kubelet even though a user has a folder link to it.
1312

1413
### install a specific version
1514

98 Bytes
Binary file not shown.

charts/v1.16.0/csi-driver-smb/templates/csi-smb-controller.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,20 @@ spec:
2424
{{ toYaml .Values.podAnnotations | indent 8 }}
2525
{{- end }}
2626
spec:
27-
{{- with .Values.controller.affinity }}
27+
{{- if contains (tpl "{{ .Values.controller.affinity }}" .) "nodeSelectorTerms" }}
28+
{{- with .Values.controller.affinity }}
2829
affinity:
29-
{{ toYaml . | indent 8 }}
30-
{{- end }}
30+
{{ toYaml . | indent 8 }}
31+
{{- end }}
32+
{{- else if .Values.controller.runOnControlPlane}}
33+
affinity:
34+
nodeAffinity:
35+
requiredDuringSchedulingIgnoredDuringExecution:
36+
nodeSelectorTerms:
37+
- matchExpressions:
38+
- key: node-role.kubernetes.io/control-plane
39+
operator: Exists
40+
{{- end }}
3141
hostNetwork: true
3242
dnsPolicy: {{ .Values.controller.dnsPolicy }}
3343
serviceAccountName: {{ .Values.serviceAccount.controller }}
@@ -39,9 +49,6 @@ spec:
3949
{{- if .Values.controller.runOnMaster}}
4050
node-role.kubernetes.io/master: ""
4151
{{- end}}
42-
{{- if .Values.controller.runOnControlPlane}}
43-
node-role.kubernetes.io/control-plane: ""
44-
{{- end}}
4552
priorityClassName: {{ .Values.priorityClassName | quote }}
4653
{{- if .Values.securityContext }}
4754
securityContext: {{- toYaml .Values.securityContext | nindent 8 }}

0 commit comments

Comments
 (0)