Skip to content

Commit c2a82e5

Browse files
committed
feat: add nodeSelector configuration to helm chart
1 parent 07dedef commit c2a82e5

6 files changed

Lines changed: 28 additions & 0 deletions

File tree

chart/crds/overcommit.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ spec:
5757
additionalProperties:
5858
type: string
5959
type: object
60+
nodeSelector:
61+
additionalProperties:
62+
type: string
63+
type: object
6064
overcommitLabel:
6165
minLength: 1
6266
type: string

chart/crds/overcommitClass.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ spec:
8181
maximum: 1
8282
minimum: 0.0001
8383
type: number
84+
nodeSelector:
85+
additionalProperties:
86+
type: string
87+
type: object
8488
tolerations:
8589
items:
8690
description: |-

chart/templates/02-overcommit.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ spec:
1414
example.com/label: "true"
1515
annotations:
1616
example.com/annotation: "true"
17+
{{- if .Values.overcommit.nodeSelector }}
18+
nodeSelector:
19+
{{- toYaml .Values.overcommit.nodeSelector | nindent 4 }}
20+
{{- end }}
1721
{{- if .Values.overcommit.tolerations }}
1822
tolerations:
1923
{{- toYaml .Values.overcommit.tolerations | nindent 4 }}

chart/templates/03-deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,7 @@ spec:
6464
tolerations:
6565
{{- toYaml .Values.deployment.tolerations | nindent 8 }}
6666
{{- end }}
67+
{{- if .Values.deployment.nodeSelector }}
68+
nodeSelector:
69+
{{- toYaml .Values.deployment.nodeSelector | nindent 8 }}
70+
{{- end }}

chart/templates/04-overcommitClass.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ spec:
1818
example.com/label: "true"
1919
annotations:
2020
example.com/annotation: "true"
21+
{{- if .Values.overcommit.nodeSelector }}
22+
nodeSelector:
23+
{{- toYaml .Values.overcommit.nodeSelector | nindent 4 }}
24+
{{- end }}
2125
{{- if .Values.overcommit.tolerations }}
2226
tolerations:
2327
{{- toYaml .Values.overcommit.tolerations | nindent 4 }}
@@ -36,6 +40,10 @@ spec:
3640
example.com/label: "true"
3741
annotations:
3842
example.com/annotation: "true"
43+
{{- if .Values.overcommit.nodeSelector }}
44+
nodeSelector:
45+
{{- toYaml .Values.overcommit.nodeSelector | nindent 4 }}
46+
{{- end }}
3947
{{- if .Values.overcommit.tolerations }}
4048
tolerations:
4149
{{- toYaml .Values.overcommit.tolerations | nindent 4 }}

chart/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ overcommit:
1616
# -- Label of the overcommit class
1717
overcommitClassLabel: inditex.com/overcommit-class
1818
excludedNamespaces: ".*(^(openshift|k8s-overcommit|kube).*).*"
19+
# -- Node selector for the deployments created by the overcommit operator
20+
nodeSelector: {}
1921
# -- Tolerations for the deployments created by the overcommit operator
2022
tolerations: []
2123

@@ -46,6 +48,8 @@ deployment:
4648
example-annotation: example-value
4749
podLabels:
4850
example-label: example-value
51+
# -- Node selector for the deployment pods
52+
nodeSelector: {}
4953
# -- Tolerations for the deployment pods
5054
tolerations: []
5155

0 commit comments

Comments
 (0)