Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
contour: apply node affinity and tolerations also to certgen job
Browse files Browse the repository at this point in the history
They are already applied for both contour and envoy, so they should also
be applied for job.

Closes #926

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
  • Loading branch information
invidian committed Nov 13, 2020
1 parent fbf5c04 commit 5b78d0b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
18 changes: 18 additions & 0 deletions assets/charts/components/contour/templates/02-job-certgen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,24 @@ spec:
labels:
app: "contour-certgen"
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
app: contour
topologyKey: kubernetes.io/hostname
weight: 100

{{- with .Values.nodeAffinity }}
nodeAffinity:
{{ toYaml . | indent 10 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
containers:
- name: contour
# This version is set to latest because Job specs are immutable;
Expand Down
4 changes: 2 additions & 2 deletions pkg/assets/generated_assets.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5b78d0b

Please sign in to comment.