Skip to content

Commit

Permalink
feat(chart): Add Node Selector (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
adinhodovic authored Mar 22, 2024
1 parent 95cfa87 commit 88d264e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
3 changes: 2 additions & 1 deletion deploy/charts/version-checker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ A Helm chart for version-checker
| image.tag | string | `nil` | Override the chart version |
| livenessProbe | object | `{"enabled":true,"httpGet":{"path":"/readyz","port":8080},"initialDelaySeconds":3,"periodSeconds":3}` | Configure the healthcheck probe for version-checker |
| livenessProbe.enabled | bool | `true` | Enable/Disable the setting of a livenessProbe |
| nodeSelector | object | `{}` | Configure nodeSelector |
| prometheus | object | `{"enabled":false,"replicas":1,"serviceAccountName":"prometheus"}` | Prometheus Operator |
| prometheus.enabled | bool | `false` | Deploy a Prometheus-Operator Prometheus Object to collect version-checker metrics |
| prometheus.serviceAccountName | string | `"prometheus"` | ServiceAccount for new Prometheus Object |
Expand All @@ -58,4 +59,4 @@ A Helm chart for version-checker
| versionChecker.testAllContainers | bool | `true` | Enable/Disable the requirement for an enable.version-checker.io annotation on pods. |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
6 changes: 5 additions & 1 deletion deploy/charts/version-checker/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ spec:
spec:
serviceAccountName: {{ $chartname }}
{{- with .Values.tolerations }}
tolerations:
tolerations:
{{- toYaml . | trim | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ $chartname }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down
9 changes: 9 additions & 0 deletions deploy/charts/version-checker/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ tests:
name: CUSTOM_ENV_VAR
value: CUSTOM_ENV_VALUE

- it: NodeSelectors Present
set:
nodeSelector:
abc: "123"
asserts:
- equal:
path: spec.template.spec.nodeSelector.abc
value: "123"

# Param changes
- it: imageCacheTimeout
set:
Expand Down
3 changes: 3 additions & 0 deletions deploy/charts/version-checker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ image:
# -- Configure tolerations
tolerations: []

# -- Configure nodeSelector
nodeSelector: {}

# -- Configure version-checkers Service
service:
labels: {}
Expand Down

0 comments on commit 88d264e

Please sign in to comment.