Skip to content

Commit 8a35acd

Browse files
authored
Add affinity and topologySpreadConstraints support to helm chart (#271)
Signed-off-by: Erwan Vallienne <[email protected]>
1 parent 738041c commit 8a35acd

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

deploy/charts/version-checker/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ A Helm chart for version-checker
2121
| acr.username | string | `nil` | Username to authenticate with azure container registry |
2222
| additionalAnnotations | object | `{}` | Additional Annotations to apply to Service and Deployment/Pod Objects |
2323
| additionalLabels | object | `{}` | Additional Labels to apply to Service and Deployment/Pod Objects |
24+
| affinity | object | `{}` | Set affinity |
2425
| docker.password | string | `nil` | Password to authenticate with docker registry |
2526
| docker.token | string | `nil` | Token to authenticate with docker registry. Cannot be used with `docker.username` / `docker.password`. |
2627
| docker.username | string | `nil` | Username to authenticate with docker registry |
@@ -69,10 +70,11 @@ A Helm chart for version-checker
6970
| serviceMonitor.additionalLabels | object | `{}` | Additional labels to add to the ServiceMonitor |
7071
| serviceMonitor.enabled | bool | `false` | Disable/Enable ServiceMonitor Object |
7172
| tolerations | list | `[]` | Configure tolerations |
73+
| topologySpreadConstraints | list | `[]` | Set topologySpreadConstraints |
7274
| versionChecker.imageCacheTimeout | string | `"30m"` | How long to hold on to image tags and their versions |
7375
| versionChecker.logLevel | string | `"info"` | Configure version-checkers logging, valid options are: debug, info, warn, error, fatal, panic |
7476
| versionChecker.metricsServingAddress | string | `"0.0.0.0:8080"` | Port/interface to which version-checker should bind too |
7577
| versionChecker.testAllContainers | bool | `true` | Enable/Disable the requirement for an enable.version-checker.io annotation on pods. |
7678

7779
----------------------------------------------
78-
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
80+
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)

deploy/charts/version-checker/templates/deployment.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,11 @@ spec:
211211
secret:
212212
secretName: {{ include "version-checker.name" . }}
213213
{{ end }}
214+
{{- with .Values.affinity }}
215+
affinity:
216+
{{- toYaml . | nindent 8 }}
217+
{{- end }}
218+
{{- with .Values.topologySpreadConstraints }}
219+
topologySpreadConstraints:
220+
{{- toYaml . | nindent 8 }}
221+
{{- end }}

deploy/charts/version-checker/values.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,28 @@ securityContext:
146146
# -- Set pod-level security context
147147
podSecurityContext: {}
148148

149+
# -- Set affinity
150+
affinity: {}
151+
# podAntiAffinity:
152+
# requiredDuringSchedulingIgnoredDuringExecution:
153+
# - labelSelector:
154+
# matchLabels:
155+
# app.kubernetes.io/name: version-checker
156+
# app.kubernetes.io/instance: release-name
157+
# topologyKey: kubernetes.io/hostname
158+
159+
160+
# -- Set topologySpreadConstraints
161+
topologySpreadConstraints: []
162+
# - labelSelector:
163+
# matchLabels:
164+
# app.kubernetes.io/name: version-checker
165+
# app.kubernetes.io/instance: release-name
166+
# maxSkew: 1
167+
# topologyKey: topology.kubernetes.io/zone
168+
# whenUnsatisfiable: ScheduleAnyway
169+
170+
149171
# Configure the readiness probe for version-checker
150172
readinessProbe:
151173
# -- Enable/Disable the setting of a readinessProbe

0 commit comments

Comments
 (0)