Skip to content

Commit 677f406

Browse files
apanzerjrbrtbnfgl
authored andcommitted
helm chart: add nodeSelector in the helm chart
Add the ability to specify a nodeSelector in the helm chart.
1 parent 2cb60d2 commit 677f406

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

chart/kube-flannel/templates/daemonset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ spec:
3131
tolerations:
3232
{{- toYaml . | trim | nindent 8 }}
3333
{{- end }}
34+
{{- with .Values.flannel.nodeSelector }}
35+
nodeSelector:
36+
{{- toYaml . | nindent 8 }}
37+
{{- end }}
3438
serviceAccountName: flannel
3539
initContainers:
3640
- name: install-cni-plugin

chart/kube-flannel/tests/daemonset_test.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,12 @@ tests:
7373
content:
7474
name: install-cni
7575
any: true
76+
77+
- it: should render nodeSelector when set
78+
set:
79+
flannel.nodeSelector:
80+
eks.amazonaws.com/compute-type: hybrid
81+
asserts:
82+
- equal:
83+
path: spec.template.spec.nodeSelector["eks.amazonaws.com/compute-type"]
84+
value: hybrid

chart/kube-flannel/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ flannel:
9191
operator: Exists
9292
- effect: NoSchedule
9393
operator: Exists
94+
nodeSelector: {}
9495

9596
netpol:
9697
enabled: false

0 commit comments

Comments
 (0)