Skip to content

Commit

Permalink
feat: change dnsPolicy to Default and add dnsPolicy setting in chart
Browse files Browse the repository at this point in the history
  • Loading branch information
andyzhangx committed Feb 27, 2022
1 parent a916efc commit 14e8fef
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ ifdef TEST_WINDOWS
--set windows.enabled=true \
--set linux.enabled=false \
--set controller.replicas=1 \
--set controller.dnsPolicy=ClusterFirstWithHostNet \
--set controller.logLevel=6 \
--set node.logLevel=6
else
Expand Down
3 changes: 2 additions & 1 deletion charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ The following table lists the configurable parameters of the latest SMB CSI Driv
| `securityContext` | security context to be added to pods | `{}` |
| `controller.name` | name of driver deployment | `csi-smb-controller`
| `controller.replicas` | replica num of csi-smb-controller | `1` |
| `controller.dnsPolicy` | dnsPolicy of driver node daemonset, available values: `Default`, `ClusterFirstWithHostNet`, `ClusterFirst` |
| `controller.metricsPort` | metrics port of csi-smb-controller |`29644` |
| `controller.livenessProbe.healthPort ` | health check port for liveness probe | `29642` |
| `controller.logLevel` | controller driver log level |`5` |
| `controller.workingMountDir` | working directory for provisioner to mount smb shares temporarily | `/tmp` |
| `controller.runOnMaster` | run controller on master node | `false` |
| `node.livenessProbe.healthPort ` | health check port for liveness probe | `29643` |
| `controller.resources.csiProvisioner.limits.memory` | csi-provisioner memory limits | `100Mi` |
| `controller.resources.csiProvisioner.requests.cpu` | csi-provisioner cpu requests limits | `10m` |
| `controller.resources.csiProvisioner.requests.memory` | csi-provisioner memory requests limits | `20Mi` |
Expand All @@ -89,6 +89,7 @@ The following table lists the configurable parameters of the latest SMB CSI Driv
| `node.nodeSelector` | node pod node selector | `{}` |
| `linux.enabled` | whether enable linux feature |`true` |
| `linux.dsName` | name of driver daemonset on linux |`csi-smb-node` |
| `linux.dnsPolicy` | dnsPolicy of driver node daemonset, available values: `Default`, `ClusterFirstWithHostNet`, `ClusterFirst` |
| `linux.kubelet` | configure kubelet directory path on Linux agent node node | `/var/lib/kubelet` |
| `linux.resources.livenessProbe.limits.memory` | liveness-probe memory limits | `100Mi` |
| `linux.resources.livenessProbe.requests.cpu` | liveness-probe cpu requests limits | `10m` |
Expand Down
Binary file modified charts/latest/csi-driver-smb-v1.6.0.tgz
Binary file not shown.
3 changes: 3 additions & 0 deletions charts/latest/csi-driver-smb/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ labels:
app.kubernetes.io/name: "{{ template "smb.name" . }}"
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
{{- if .Values.customLabels }}
{{ toYaml .Values.customLabels | indent 2 -}}
{{- end }}
{{- end -}}

{{/* pull secrets for containers */}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
dnsPolicy: ClusterFirstWithHostNet
dnsPolicy: {{ .Values.controller.dnsPolicy }}
serviceAccountName: {{ .Values.serviceAccount.controller }}
nodeSelector:
{{- with .Values.controller.nodeSelector }}
Expand Down
2 changes: 1 addition & 1 deletion charts/latest/csi-driver-smb/templates/csi-smb-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
{{- end }}
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
dnsPolicy: {{ .Values.linux.dnsPolicy }}
nodeSelector:
kubernetes.io/os: linux
{{- with .Values.node.nodeSelector }}
Expand Down
3 changes: 3 additions & 0 deletions charts/latest/csi-driver-smb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ feature:
controller:
name: csi-smb-controller
replicas: 1
dnsPolicy: Default # available values: Default, ClusterFirstWithHostNet, ClusterFirst
metricsPort: 29644
livenessProbe:
healthPort: 29642
Expand Down Expand Up @@ -81,6 +82,7 @@ node:
linux:
enabled: true
dsName: csi-smb-node # daemonset name
dnsPolicy: Default # available values: Default, ClusterFirstWithHostNet, ClusterFirst
kubelet: /var/lib/kubelet
tolerations:
- operator: "Exists"
Expand Down Expand Up @@ -132,6 +134,7 @@ windows:
cpu: 10m
memory: 40Mi

customLabels: {}
## Collection of annotations to add to all the pods
podAnnotations: {}
## Collection of labels to add to all the pods
Expand Down
2 changes: 1 addition & 1 deletion deploy/csi-smb-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
labels:
app: csi-smb-controller
spec:
dnsPolicy: ClusterFirstWithHostNet
dnsPolicy: Default # available values: Default, ClusterFirstWithHostNet, ClusterFirst
serviceAccountName: csi-smb-controller-sa
nodeSelector:
kubernetes.io/os: linux
Expand Down
2 changes: 1 addition & 1 deletion deploy/csi-smb-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
app: csi-smb-node
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
dnsPolicy: Default # available values: Default, ClusterFirstWithHostNet, ClusterFirst
nodeSelector:
kubernetes.io/os: linux
priorityClassName: system-node-critical
Expand Down

0 comments on commit 14e8fef

Please sign in to comment.