From 5b78d0b36d4cf2f99ff918c767d1092153903a51 Mon Sep 17 00:00:00 2001 From: Mateusz Gozdek Date: Tue, 3 Nov 2020 22:23:49 +0100 Subject: [PATCH] contour: apply node affinity and tolerations also to certgen job They are already applied for both contour and envoy, so they should also be applied for job. Closes #926 Signed-off-by: Mateusz Gozdek --- .../contour/templates/02-job-certgen.yaml | 18 ++++++++++++++++++ pkg/assets/generated_assets.go | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/assets/charts/components/contour/templates/02-job-certgen.yaml b/assets/charts/components/contour/templates/02-job-certgen.yaml index e6f04c05f..f0e89f5c7 100644 --- a/assets/charts/components/contour/templates/02-job-certgen.yaml +++ b/assets/charts/components/contour/templates/02-job-certgen.yaml @@ -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; diff --git a/pkg/assets/generated_assets.go b/pkg/assets/generated_assets.go index 6acb30f76..d38a17504 100644 --- a/pkg/assets/generated_assets.go +++ b/pkg/assets/generated_assets.go @@ -642,9 +642,9 @@ var vfsgenAssets = func() http.FileSystem { "/charts/components/contour/templates/02-job-certgen.yaml": &vfsgen۰CompressedFileInfo{ name: "02-job-certgen.yaml", modTime: time.Date(1970, 1, 1, 0, 0, 1, 0, time.UTC), - uncompressedSize: 1551, + uncompressedSize: 2053, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x54\x4d\x6f\x13\x31\x10\xbd\xef\xaf\x18\x05\x0e\x70\xd8\xa5\x11\x14\x21\xa3\x1e\x42\xd5\x22\x21\x48\xa3\xf4\xe3\x8a\x66\xbd\x93\xc6\xc4\x6b\xaf\xc6\xe3\x2d\xa5\xea\x7f\x47\x4e\x36\x9b\x6e\x43\xcb\x01\x09\x9f\x36\x6f\x9e\xfd\x9e\x9f\x27\x93\xe7\x79\x86\x8d\xb9\x22\x0e\xc6\x3b\x05\xed\x38\x5b\x19\x57\x29\x38\x27\x6e\x8d\xa6\x89\xd6\x3e\x3a\xc9\x6a\x12\xac\x50\x50\x65\x00\x0e\x6b\x52\xa0\xbd\x13\x1f\x39\xd7\xc4\x72\x4d\xae\xc3\x43\x83\x9a\x14\x34\xec\x7f\x90\x96\x8e\x93\x3d\x56\xe1\x12\x75\x81\x51\x96\x9e\xcd\x2f\x14\xe3\x5d\xb1\xfa\x10\x0a\xe3\xdf\xf4\xfa\x73\x6f\xe9\x93\x71\x95\x71\xd7\x4f\x8b\x3f\x2b\xca\xde\xd2\x9c\x16\x69\x13\x36\xe6\x33\xfb\xd8\x3c\xa3\x9c\x01\xec\x84\x9f\xbc\x64\x88\x65\x92\x08\x2a\xcb\xe1\x8f\x39\xfd\xc7\x74\xfe\xf1\x4d\x38\x5a\x5a\xdf\x63\x1b\x4e\x48\xe7\xe4\x30\x1a\x65\x00\x4c\xc1\x47\xd6\xd4\x61\x81\x34\x93\x84\x0c\xa0\x25\x2e\x3b\x50\x33\xa1\xd0\xfa\x33\x36\x55\xfa\x7c\x7c\x91\x12\x45\x2f\x77\xa6\xbf\xf8\xf2\xef\x9e\xf3\x76\x5c\x8c\x0f\x8a\x83\x67\xbd\x87\x86\x74\x3a\x41\xc4\x9e\x93\xf6\xae\x0a\x93\x85\x10\x9f\x1a\x67\xc2\x92\x2a\x05\x69\xbb\x50\xdd\x58\x14\x4a\x44\x80\x87\xc2\x69\x59\x2c\xc9\x86\xed\xaf\xd4\x22\x8d\x82\xd1\x23\x33\xa3\x75\x79\xab\x96\x56\x22\xa0\x71\xc4\xfd\xd6\x7c\xaf\x25\x37\xeb\x05\x5c\x2c\x4d\x48\x81\xa5\x30\xc0\x04\x08\x24\x20\x1e\x92\xa7\x20\x50\x92\xc6\x18\x28\xa5\xb2\x56\x08\x80\x4c\x60\xea\x3a\x0a\x96\x96\x3e\xf6\x07\x99\x1a\xaf\x49\xc1\xdd\x5d\x71\x85\x36\x52\x28\x3a\xa5\x62\x5d\xb8\xbf\x57\x9b\x03\x87\xfc\x59\xb4\x76\xe6\xad\xd1\xb7\x0a\x26\xf6\x06\x6f\x43\x5f\xd7\xbe\xae\xd1\x55\xbb\xab\xe7\x7b\xde\x73\xd8\x75\xd0\x16\xc9\xf3\x55\x2c\x69\x00\x18\xa7\x6d\x0c\x42\x3c\x40\x7d\x4b\x7c\xc3\x46\x86\xdc\xae\x85\xf2\x85\xe7\x1a\xe5\x48\xfb\xba\x41\x2d\x03\x4a\xff\xde\x47\x2f\x5f\x1d\x9f\x4d\x2f\xce\x2e\xe7\xdf\xa7\x93\x6f\x27\xe7\xb3\xc9\xf1\xc9\xeb\x9e\x4a\xae\x7d\xe8\x7d\x93\xfe\x1e\xbf\x67\x00\xb4\x29\xb6\x53\xf6\xb5\x7a\x00\x02\x2c\x0c\xd9\xaa\x1b\x10\x7b\xf8\x0c\x65\xa9\xfa\xa6\x29\x7a\x6b\x1d\x97\x29\x08\xb2\x6c\x13\x9e\x52\xdb\x87\x10\x06\x03\x61\xfa\xc4\xff\x72\xc3\xd4\x91\x8d\xdc\x1e\x7b\x27\xf4\x53\x76\x3e\x38\xba\x49\x98\x7a\x37\xf7\x5e\x14\x08\x47\x1a\x96\x2e\x03\xb1\x82\xf7\x87\x87\x6f\xdf\x0d\x0b\xdd\x90\xdb\x56\x1a\x64\xb4\x96\xac\x09\xb5\x82\x71\xb6\x7e\xfa\xc6\x52\x9a\x28\x61\x03\x94\xa8\x57\x7e\xb1\xf8\x6a\x6a\x23\x09\xf9\x1d\x00\x00\xff\xff\x4d\xe1\x5c\x7e\x0f\x06\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x4d\x8f\x23\x45\x0c\xbd\xf7\xaf\xb0\x06\x0e\x70\xe8\x26\x11\x2c\x5a\x15\xda\x43\x18\x66\x11\xb0\x64\x47\x93\xd9\x95\x38\xa1\xea\x6a\x27\x29\xa6\xba\xdc\x72\xb9\x32\x1b\xc2\xfc\x77\x54\x9d\x4e\x7f\x24\xcc\x70\x40\xa2\x4e\xc9\xf3\xb3\x9f\xed\xb2\xab\xf3\x3c\xcf\x74\x63\x3f\x22\x07\x4b\x5e\xc1\x6e\x9e\x3d\x58\x5f\x29\x58\x21\xef\xac\xc1\x85\x31\x14\xbd\x64\x35\x8a\xae\xb4\x68\x95\x01\x78\x5d\xa3\x02\x43\x5e\x28\x72\x6e\x90\x65\x83\xbe\xc3\x43\xa3\x0d\x2a\x68\x98\xfe\x40\x23\x1d\x27\x3b\x57\xe1\x52\x9b\x42\x47\xd9\x12\xdb\x3f\xb5\x58\xf2\xc5\xc3\xeb\x50\x58\xfa\xaa\xd7\xbf\x23\x87\xdf\x5b\x5f\x59\xbf\x79\x5e\xfc\x45\x51\x26\x87\x77\xb8\x4e\x4e\xba\xb1\x3f\x32\xc5\xe6\x05\xe5\x0c\x60\x10\x7e\xb6\xc8\x10\xcb\x24\x11\x54\x96\xc3\x3f\xf6\xe9\x7f\xec\xce\x7f\xbc\x13\x8e\x0e\xdb\x3a\x4e\xcd\x09\x29\x4e\x0e\x57\x57\x19\x00\x63\xa0\xc8\x06\x3b\x2c\xa0\x61\x94\x90\x01\xec\x90\xcb\x0e\x34\x8c\x5a\xb0\xfd\x19\x9b\x2a\xfd\x3c\x2f\xa4\xd4\x62\xb6\x43\xd2\x3f\x53\xf9\xef\x39\xe7\xbb\x79\x31\x9f\x15\xb3\x17\x73\x0f\x0d\x9a\x14\x41\xc4\xad\xd0\x90\xaf\xc2\x62\x2d\xc8\x6f\xad\xb7\x61\x8b\x95\x82\xe4\x2e\x58\x37\x4e\x0b\x26\x22\xc0\x58\x38\x1d\xa7\x4b\x74\xe1\xf4\x2f\x8d\x48\xa3\xe0\xea\x2c\x99\xab\xd6\x7c\x52\x6b\x69\xeb\xb5\xf5\x56\xf6\x83\x63\x43\xd5\xc2\x8b\x5d\x5c\x18\x00\x1a\xc6\x35\x32\x63\xf5\x43\x64\xeb\x37\x2b\xb3\xc5\x2a\x3a\xeb\x37\x3f\x6d\x3c\xf5\xf0\xcd\x27\x34\x31\xdd\xf2\xd8\x35\x6f\xe3\x76\x31\xef\x91\xeb\xb1\xb1\xcf\x7f\x85\x0e\x8d\x10\x9f\x1b\x01\xea\xd4\xfa\x77\x67\x35\x0e\xa7\xad\x76\x58\xa2\xf1\x11\x6a\xc8\xd1\x66\xff\x0b\xee\x15\x3c\xc4\x12\xd9\xa3\x60\x3b\x7e\x5b\x0a\x92\x2e\x65\xe2\xf1\x88\x76\xb3\x15\x05\xf3\xd9\x2c\xeb\x0d\x87\x43\x0e\x8f\x56\xb6\x50\x7c\xd4\x2e\x62\x28\x3c\x55\x78\x2a\x07\x9e\x9e\x7a\xe2\x18\x57\xd9\xe1\x00\x42\xbf\xe9\xda\x41\x01\x7f\x81\xf5\x15\x7a\x81\xf9\x6c\xec\x90\x22\xa3\xaf\x06\xe8\x42\x4a\xc8\x21\xb7\x6b\x13\x06\xd6\x08\x7c\x46\xe6\xf5\x34\xe4\x44\x23\x75\x4a\x5b\x8f\xdc\x37\x33\xbf\x78\x88\x8e\xe7\x33\xb8\xdf\xda\x90\xd6\x24\xad\x00\xd8\x00\x01\x05\x84\x20\x4d\x62\x10\x28\xd1\xe8\x18\x30\xed\x42\x3b\x57\x01\x34\x23\xd8\xba\x8e\xa2\x4b\x87\xdf\xf5\x81\x6c\xad\x37\xa8\xe0\x70\x38\x95\xd5\x29\x15\xad\xe1\xe9\x49\x1d\x03\x4e\xf9\xb7\xd1\xb9\x5b\x72\xd6\xec\x15\x2c\xdc\xa3\xde\x87\xde\x6e\xa8\xae\xb5\xaf\x86\x61\xc8\x2f\x72\xcf\x61\x78\x37\x4e\x48\x9e\xa7\x11\x98\x00\xd6\x1b\x17\x83\x20\x4f\x50\xda\x21\x3f\xb2\x95\x29\xb7\x7b\x38\xf2\x35\x71\xad\xe5\x8d\xa1\xba\xd1\x46\x26\x94\x7e\xcb\xdf\x7c\xfe\xc5\xf5\xfb\xe5\xfd\xfb\x0f\x77\xbf\x2f\x17\xbf\xde\xac\x6e\x17\xd7\x37\x5f\xf6\x54\xf4\xbb\x71\xee\xc7\xee\x5f\xf0\x47\x93\xb9\x4b\x6d\x7b\xcb\x74\xb6\x39\x6b\x8b\xae\xea\x3e\x0b\x17\xf8\xad\x96\xad\xea\x9f\x8a\xa2\x4f\xad\xe3\x32\x06\xd1\x2c\xa7\x0e\x2f\x71\xd7\x37\x21\x4c\x3e\x03\xcb\x67\x5e\xe3\x23\xd3\x44\xb6\xb2\xbf\x26\x2f\xf8\x49\x86\x3c\x38\xfa\x45\x58\x92\xbf\x23\x12\x05\xc2\x11\xa7\xa6\x0f\x01\x59\xc1\xb7\xaf\x5e\x7d\xfd\xcd\xd4\xd0\x7d\xda\x4e\x96\x46\xb3\x76\x0e\x9d\x0d\xb5\x82\x79\xd6\x5e\x7d\xe3\xf0\x38\xfb\x2d\x50\x6a\xf3\x40\xeb\xf5\x3b\x5b\xdb\xb4\xb8\xd9\xdf\x01\x00\x00\xff\xff\x23\x08\xcc\xf6\x05\x08\x00\x00"), }, "/charts/components/contour/templates/02-rbac.yaml": &vfsgen۰CompressedFileInfo{ name: "02-rbac.yaml",