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

Commit

Permalink
Merge pull request #1161 from kinvolk/invidian/fix-contour-jobs-toler…
Browse files Browse the repository at this point in the history
…ations

contour: apply node affinity and tolerations also to certgen job
  • Loading branch information
invidian authored Nov 23, 2020
2 parents b58336b + 5b78d0b commit 6e6d4f0
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 6e6d4f0

Please sign in to comment.