Skip to content

Commit

Permalink
fix: runOnControlPlane chart config in v1.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
andyzhangx committed Dec 10, 2024
1 parent dc12f41 commit 5a9dda4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
3 changes: 1 addition & 2 deletions charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@

- run smb-controller on control plane node: `--set controller.runOnControlPlane=true`
- Microk8s based kubernetes recommended settings:
- `--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.
- `--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.

### install a specific version

Expand Down
Binary file modified charts/v1.16.0/csi-driver-smb-v1.16.0.tgz
Binary file not shown.
19 changes: 13 additions & 6 deletions charts/v1.16.0/csi-driver-smb/templates/csi-smb-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,20 @@ spec:
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
spec:
{{- with .Values.controller.affinity }}
{{- if contains (tpl "{{ .Values.controller.affinity }}" .) "nodeSelectorTerms" }}
{{- with .Values.controller.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{ toYaml . | indent 8 }}
{{- end }}
{{- else if .Values.controller.runOnControlPlane}}
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
{{- end }}
hostNetwork: true
dnsPolicy: {{ .Values.controller.dnsPolicy }}
serviceAccountName: {{ .Values.serviceAccount.controller }}
Expand All @@ -39,9 +49,6 @@ spec:
{{- if .Values.controller.runOnMaster}}
node-role.kubernetes.io/master: ""
{{- end}}
{{- if .Values.controller.runOnControlPlane}}
node-role.kubernetes.io/control-plane: ""
{{- end}}
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- if .Values.securityContext }}
securityContext: {{- toYaml .Values.securityContext | nindent 8 }}
Expand Down

0 comments on commit 5a9dda4

Please sign in to comment.