Skip to content

Commit

Permalink
Merge pull request #63 from Linutux42/helm_tolerations
Browse files Browse the repository at this point in the history
feat: Add helm chart value to render tolerations in the controller
  • Loading branch information
djeebus authored Jul 31, 2023
2 parents 07c27a4 + 6ff21b6 commit 79e9d20
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/prom-aggregation-gateway/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: prom-aggregation-gateway
version: 0.5.2
version: 0.5.3
home: https://github.com/zapier/prom-aggregation-gateway
maintainers:
- name: djeebus
Expand Down
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 79e9d20

Please sign in to comment.