Skip to content

Commit

Permalink
feat: Add helm chart value to render tolerations in the controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Linutux42 committed Apr 19, 2023
1 parent 355dfe9 commit 8f4dd79
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
6 changes: 6 additions & 0 deletions charts/prom-aggregation-gateway/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,9 @@ spec:
{{- with .Values.controller.resources }}
resources: {{ . | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.controller.tolerations }}
tolerations:
{{- with .Values.controller.tolerations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
14 changes: 14 additions & 0 deletions charts/prom-aggregation-gateway/tests/controller_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,17 @@ tests:
asserts:
- isNull:
path: spec.template.spec.containers[0].env
- it: can render tolerations
set:
controller:
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- operator: Exists
effect: NoExecute
asserts:
- equal:
path: spec.template.spec.tolerations
value:
- {key: CriticalAddonsOnly, operator: Exists}
- {operator: Exists, effect: NoExecute}
3 changes: 3 additions & 0 deletions charts/prom-aggregation-gateway/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
"patternProperties": {
".*": {"type": "string"}
}
},
"tolerations": {
"type": "array"
}
},
"required": [
Expand Down
2 changes: 2 additions & 0 deletions charts/prom-aggregation-gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ controller:
env:
GIN_MODE: release

tolerations: []

podMonitor:
create: true

Expand Down

0 comments on commit 8f4dd79

Please sign in to comment.