
On the previous work to add tolerations for the openstack-helm charts, we missed adding those tolerations to disabled charts like the charts for the telemetry services, ironic, gnocchi and ceph-rgw. This commit will fix it. This is a cherry-pick with minor removals from [1] and [2]and should be removed from the openstack-armada-app tree on the next osh/osh-i upversion. NOTE: Since ironic/gnocchi/ceph-rgw charts are not proven to work with stx-openstack, we will not validate those on the test plan. [1] https://review.opendev.org/c/openstack/openstack-helm-infra/+/812753 [2] https://review.opendev.org/c/openstack/openstack-helm/+/812734 TEST PLAN PASS build stx-openstack and install on SX PASS enable telemetry charts REGRESSION PLAN PASS debian build LOG: https://paste.opendev.org/show/bV3bgChLHxro3caaRC7q/ Story: 2009232 Task: 44572 Signed-off-by: Thiago Brito <thiago.brito@windriver.com> Change-Id: I0b35e2cb531cf54fc5a319c35e0a058603790af1
971 lines
49 KiB
Diff
971 lines
49 KiB
Diff
From 1be5f40cac3ebc759e99540d6355ef98b47b51f4 Mon Sep 17 00:00:00 2001
|
|
From: Lucas Cavalcante <lucasmedeiros.cavalcante@windriver.com>
|
|
Date: Wed, 6 Oct 2021 18:52:35 -0300
|
|
Subject: [PATCH] Enable taint toleration for Openstack services
|
|
|
|
This adds taint toleration support for openstack jobs
|
|
|
|
Also adds tolerations for:
|
|
- ceph-rgw
|
|
- gnocchi
|
|
- ingress
|
|
- libvirt
|
|
- mariadb
|
|
- memcached
|
|
- openvswitch
|
|
- rabbitmq
|
|
|
|
Signed-off-by: Lucas Cavalcante <lucasmedeiros.cavalcante@windriver.com>
|
|
Change-Id: I1c731c94e58895bd8bfc26d4300aac40a9111f12
|
|
---
|
|
ceph-rgw/values.yaml | 3 +++
|
|
gnocchi/templates/cron-job-resources-cleaner.yaml | 3 +++
|
|
gnocchi/templates/daemonset-metricd.yaml | 3 +++
|
|
gnocchi/templates/daemonset-statsd.yaml | 3 +++
|
|
gnocchi/templates/deployment-api.yaml | 3 +++
|
|
gnocchi/templates/job-bootstrap.yaml | 3 +++
|
|
gnocchi/templates/job-clean.yaml | 3 +++
|
|
gnocchi/templates/job-db-drop.yaml | 3 +++
|
|
gnocchi/templates/job-db-init-indexer.yaml | 3 +++
|
|
gnocchi/templates/job-db-init.yaml | 3 +++
|
|
gnocchi/templates/job-db-sync.yaml | 3 +++
|
|
gnocchi/templates/job-image-repo-sync.yaml | 3 +++
|
|
gnocchi/templates/job-ks-endpoints.yaml | 7 +++++--
|
|
gnocchi/templates/job-ks-service.yaml | 3 +++
|
|
gnocchi/templates/job-ks-user.yaml | 3 +++
|
|
gnocchi/templates/job-storage-init.yaml | 3 +++
|
|
gnocchi/templates/pod-gnocchi-test.yaml | 3 +++
|
|
gnocchi/values.yaml | 7 +++++++
|
|
helm-toolkit/templates/manifests/_job-bootstrap.tpl | 4 ++++
|
|
helm-toolkit/templates/manifests/_job-db-drop-mysql.tpl | 4 ++++
|
|
helm-toolkit/templates/manifests/_job-db-init-mysql.tpl | 4 ++++
|
|
helm-toolkit/templates/manifests/_job-db-sync.tpl | 4 ++++
|
|
helm-toolkit/templates/manifests/_job-ks-endpoints.tpl | 4 ++++
|
|
helm-toolkit/templates/manifests/_job-ks-service.tpl | 4 ++++
|
|
helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl | 4 ++++
|
|
helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl | 4 ++++
|
|
helm-toolkit/templates/manifests/_job-s3-bucket.yaml.tpl | 4 ++++
|
|
helm-toolkit/templates/manifests/_job-s3-user.yaml.tpl | 4 ++++
|
|
helm-toolkit/templates/manifests/_job_image_repo_sync.tpl | 4 ++++
|
|
ingress/templates/deployment-error.yaml | 3 +++
|
|
ingress/templates/deployment-ingress.yaml | 3 +++
|
|
ingress/templates/job-image-repo-sync.yaml | 3 +++
|
|
ingress/values.yaml | 7 +++++++
|
|
libvirt/templates/daemonset-libvirt.yaml | 3 +++
|
|
libvirt/templates/job-image-repo-sync.yaml | 3 +++
|
|
libvirt/values.yaml | 7 +++++++
|
|
mariadb/templates/cron-job-backup-mariadb.yaml | 3 +++
|
|
mariadb/templates/deployment-error.yaml | 3 +++
|
|
mariadb/templates/deployment-ingress.yaml | 3 +++
|
|
mariadb/templates/job-image-repo-sync.yaml | 3 +++
|
|
mariadb/templates/job-ks-user.yaml | 3 +++
|
|
mariadb/templates/pod-test.yaml | 3 +++
|
|
mariadb/templates/statefulset.yaml | 3 +++
|
|
mariadb/values.yaml | 7 +++++++
|
|
memcached/templates/deployment.yaml | 3 +++
|
|
memcached/templates/job-image-repo-sync.yaml | 3 +++
|
|
memcached/values.yaml | 7 +++++++
|
|
openvswitch/templates/daemonset-ovs-db.yaml | 3 +++
|
|
openvswitch/templates/daemonset-ovs-vswitchd.yaml | 3 +++
|
|
openvswitch/templates/job-image-repo-sync.yaml | 3 +++
|
|
openvswitch/values.yaml | 7 +++++++
|
|
rabbitmq/templates/job-cluster-wait.yaml | 3 +++
|
|
rabbitmq/templates/job-image-repo-sync.yaml | 3 +++
|
|
rabbitmq/templates/pod-test.yaml | 3 +++
|
|
rabbitmq/templates/statefulset.yaml | 3 +++
|
|
rabbitmq/values.yaml | 7 +++++++
|
|
56 files changed, 209 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/ceph-rgw/values.yaml b/ceph-rgw/values.yaml
|
|
index a5147856..d3f01e90 100644
|
|
--- a/ceph-rgw/values.yaml
|
|
+++ b/ceph-rgw/values.yaml
|
|
@@ -233,6 +233,9 @@ pod:
|
|
key: node.kubernetes.io/unreachable
|
|
operator: Exists
|
|
tolerationSeconds: 60
|
|
+ - key: node-role.kubernetes.io/master
|
|
+ operator: Exists
|
|
+ effect: NoSchedule
|
|
|
|
network_policy:
|
|
rgw:
|
|
diff --git a/gnocchi/templates/cron-job-resources-cleaner.yaml b/gnocchi/templates/cron-job-resources-cleaner.yaml
|
|
index 115fc4ff..db4e4848 100644
|
|
--- a/gnocchi/templates/cron-job-resources-cleaner.yaml
|
|
+++ b/gnocchi/templates/cron-job-resources-cleaner.yaml
|
|
@@ -48,6 +48,9 @@ spec:
|
|
restartPolicy: OnFailure
|
|
nodeSelector:
|
|
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
|
+{{ if $envAll.Values.pod.tolerations.gnocchi.enabled }}
|
|
+{{ tuple $envAll "gnocchi" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 10 }}
|
|
+{{ end }}
|
|
initContainers:
|
|
{{ tuple $envAll "resources_cleaner" $mounts_gnocchi_resources_cleaner_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 12 }}
|
|
containers:
|
|
diff --git a/gnocchi/templates/daemonset-metricd.yaml b/gnocchi/templates/daemonset-metricd.yaml
|
|
index 40daa26a..cc5c0cd0 100644
|
|
--- a/gnocchi/templates/daemonset-metricd.yaml
|
|
+++ b/gnocchi/templates/daemonset-metricd.yaml
|
|
@@ -44,6 +44,9 @@ spec:
|
|
serviceAccountName: {{ $serviceAccountName }}
|
|
nodeSelector:
|
|
{{ .Values.labels.metricd.node_selector_key }}: {{ .Values.labels.metricd.node_selector_value }}
|
|
+{{ if $envAll.Values.pod.tolerations.gnocchi.enabled }}
|
|
+{{ tuple $envAll "gnocchi" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{ end }}
|
|
initContainers:
|
|
{{ tuple $envAll "metricd" $mounts_gnocchi_metricd_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
- name: ceph-keyring-placement
|
|
diff --git a/gnocchi/templates/daemonset-statsd.yaml b/gnocchi/templates/daemonset-statsd.yaml
|
|
index 68f8f080..4dfc304e 100644
|
|
--- a/gnocchi/templates/daemonset-statsd.yaml
|
|
+++ b/gnocchi/templates/daemonset-statsd.yaml
|
|
@@ -43,6 +43,9 @@ spec:
|
|
serviceAccountName: {{ $serviceAccountName }}
|
|
nodeSelector:
|
|
{{ .Values.labels.statsd.node_selector_key }}: {{ .Values.labels.statsd.node_selector_value }}
|
|
+{{ if $envAll.Values.pod.tolerations.gnocchi.enabled }}
|
|
+{{ tuple $envAll "gnocchi" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{ end }}
|
|
initContainers:
|
|
{{ tuple $envAll "statsd" $mounts_gnocchi_statsd_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
- name: ceph-keyring-placement
|
|
diff --git a/gnocchi/templates/deployment-api.yaml b/gnocchi/templates/deployment-api.yaml
|
|
index b41f0743..0cc687fa 100644
|
|
--- a/gnocchi/templates/deployment-api.yaml
|
|
+++ b/gnocchi/templates/deployment-api.yaml
|
|
@@ -47,6 +47,9 @@ spec:
|
|
{{ tuple $envAll "gnocchi" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
|
nodeSelector:
|
|
{{ .Values.labels.api.node_selector_key }}: {{ .Values.labels.api.node_selector_value }}
|
|
+{{ if $envAll.Values.pod.tolerations.gnocchi.enabled }}
|
|
+{{ tuple $envAll "gnocchi" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{ end }}
|
|
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.api.timeout | default "30" }}
|
|
initContainers:
|
|
{{ tuple $envAll "api" $mounts_gnocchi_api_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
diff --git a/gnocchi/templates/job-bootstrap.yaml b/gnocchi/templates/job-bootstrap.yaml
|
|
index 5f3cfae5..d2dbc51e 100644
|
|
--- a/gnocchi/templates/job-bootstrap.yaml
|
|
+++ b/gnocchi/templates/job-bootstrap.yaml
|
|
@@ -14,5 +14,8 @@ limitations under the License.
|
|
|
|
{{- if and .Values.manifests.job_bootstrap .Values.bootstrap.enabled }}
|
|
{{- $bootstrapJob := dict "envAll" . "serviceName" "gnocchi" "keystoneUser" .Values.bootstrap.ks_user -}}
|
|
+{{- if .Values.pod.tolerations.gnocchi.enabled -}}
|
|
+{{- $_ := set $bootstrapJob "tolerationsEnabled" true -}}
|
|
+{{- end -}}
|
|
{{ $bootstrapJob | include "helm-toolkit.manifests.job_bootstrap" }}
|
|
{{- end }}
|
|
diff --git a/gnocchi/templates/job-clean.yaml b/gnocchi/templates/job-clean.yaml
|
|
index 3e294bf1..ce816cb3 100644
|
|
--- a/gnocchi/templates/job-clean.yaml
|
|
+++ b/gnocchi/templates/job-clean.yaml
|
|
@@ -63,6 +63,9 @@ spec:
|
|
restartPolicy: OnFailure
|
|
nodeSelector:
|
|
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
|
+{{ if $envAll.Values.pod.tolerations.gnocchi.enabled }}
|
|
+{{ tuple $envAll "gnocchi" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{ end }}
|
|
initContainers:
|
|
{{ tuple $envAll "clean" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
containers:
|
|
diff --git a/gnocchi/templates/job-db-drop.yaml b/gnocchi/templates/job-db-drop.yaml
|
|
index 056a95f2..5f9be1ef 100644
|
|
--- a/gnocchi/templates/job-db-drop.yaml
|
|
+++ b/gnocchi/templates/job-db-drop.yaml
|
|
@@ -14,5 +14,8 @@ limitations under the License.
|
|
|
|
{{- if .Values.manifests.job_db_drop }}
|
|
{{- $dbDropJob := dict "envAll" . "serviceName" "gnocchi" -}}
|
|
+{{- if .Values.pod.tolerations.gnocchi.enabled -}}
|
|
+{{- $_ := set $dbDropJob "tolerationsEnabled" true -}}
|
|
+{{- end -}}
|
|
{{ $dbDropJob | include "helm-toolkit.manifests.job_db_drop_mysql" }}
|
|
{{- end }}
|
|
diff --git a/gnocchi/templates/job-db-init-indexer.yaml b/gnocchi/templates/job-db-init-indexer.yaml
|
|
index ab078043..d0932840 100644
|
|
--- a/gnocchi/templates/job-db-init-indexer.yaml
|
|
+++ b/gnocchi/templates/job-db-init-indexer.yaml
|
|
@@ -34,6 +34,9 @@ spec:
|
|
restartPolicy: OnFailure
|
|
nodeSelector:
|
|
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
|
+{{ if $envAll.Values.pod.tolerations.gnocchi.enabled }}
|
|
+{{ tuple $envAll "gnocchi" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{ end }}
|
|
initContainers:
|
|
{{ tuple $envAll "db_init_postgresql" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
containers:
|
|
diff --git a/gnocchi/templates/job-db-init.yaml b/gnocchi/templates/job-db-init.yaml
|
|
index dace5342..99ac8e21 100644
|
|
--- a/gnocchi/templates/job-db-init.yaml
|
|
+++ b/gnocchi/templates/job-db-init.yaml
|
|
@@ -14,5 +14,8 @@ limitations under the License.
|
|
|
|
{{- if .Values.manifests.job_db_init }}
|
|
{{- $dbInitJob := dict "envAll" . "serviceName" "gnocchi" -}}
|
|
+{{- if .Values.pod.tolerations.gnocchi.enabled -}}
|
|
+{{- $_ := set $dbInitJob "tolerationsEnabled" true -}}
|
|
+{{- end -}}
|
|
{{ $dbInitJob | include "helm-toolkit.manifests.job_db_init_mysql" }}
|
|
{{- end }}
|
|
diff --git a/gnocchi/templates/job-db-sync.yaml b/gnocchi/templates/job-db-sync.yaml
|
|
index 60391847..45a11110 100644
|
|
--- a/gnocchi/templates/job-db-sync.yaml
|
|
+++ b/gnocchi/templates/job-db-sync.yaml
|
|
@@ -34,6 +34,9 @@ spec:
|
|
restartPolicy: OnFailure
|
|
nodeSelector:
|
|
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
|
+{{ if $envAll.Values.pod.tolerations.gnocchi.enabled }}
|
|
+{{ tuple $envAll "gnocchi" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{ end }}
|
|
initContainers:
|
|
{{ tuple $envAll "db_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
- name: ceph-keyring-placement
|
|
diff --git a/gnocchi/templates/job-image-repo-sync.yaml b/gnocchi/templates/job-image-repo-sync.yaml
|
|
index 4ace9b9f..f4c4d018 100644
|
|
--- a/gnocchi/templates/job-image-repo-sync.yaml
|
|
+++ b/gnocchi/templates/job-image-repo-sync.yaml
|
|
@@ -14,5 +14,8 @@ limitations under the License.
|
|
|
|
{{- if and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }}
|
|
{{- $imageRepoSyncJob := dict "envAll" . "serviceName" "gnocchi" -}}
|
|
+{{- if .Values.pod.tolerations.gnocchi.enabled -}}
|
|
+{{- $_ := set $imageRepoSyncJob "tolerationsEnabled" true -}}
|
|
+{{- end -}}
|
|
{{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }}
|
|
{{- end }}
|
|
diff --git a/gnocchi/templates/job-ks-endpoints.yaml b/gnocchi/templates/job-ks-endpoints.yaml
|
|
index 2f5c0555..47809e94 100644
|
|
--- a/gnocchi/templates/job-ks-endpoints.yaml
|
|
+++ b/gnocchi/templates/job-ks-endpoints.yaml
|
|
@@ -13,6 +13,9 @@ limitations under the License.
|
|
*/}}
|
|
|
|
{{- if .Values.manifests.job_ks_endpoints }}
|
|
-{{- $ksServiceJob := dict "envAll" . "serviceName" "gnocchi" "serviceTypes" ( tuple "metric" ) -}}
|
|
-{{ $ksServiceJob | include "helm-toolkit.manifests.job_ks_endpoints" }}
|
|
+{{- $ksEndpointsJob := dict "envAll" . "serviceName" "gnocchi" "serviceTypes" ( tuple "metric" ) -}}
|
|
+{{- if .Values.pod.tolerations.gnocchi.enabled -}}
|
|
+{{- $_ := set $ksEndpointsJob "tolerationsEnabled" true -}}
|
|
+{{- end -}}
|
|
+{{ $ksEndpointsJob | include "helm-toolkit.manifests.job_ks_endpoints" }}
|
|
{{- end }}
|
|
diff --git a/gnocchi/templates/job-ks-service.yaml b/gnocchi/templates/job-ks-service.yaml
|
|
index 24c2935e..76070d6e 100644
|
|
--- a/gnocchi/templates/job-ks-service.yaml
|
|
+++ b/gnocchi/templates/job-ks-service.yaml
|
|
@@ -14,5 +14,8 @@ limitations under the License.
|
|
|
|
{{- if .Values.manifests.job_ks_service }}
|
|
{{- $ksServiceJob := dict "envAll" . "serviceName" "gnocchi" "serviceTypes" ( tuple "metric" ) -}}
|
|
+{{- if .Values.pod.tolerations.gnocchi.enabled -}}
|
|
+{{- $_ := set $ksServiceJob "tolerationsEnabled" true -}}
|
|
+{{- end -}}
|
|
{{ $ksServiceJob | include "helm-toolkit.manifests.job_ks_service" }}
|
|
{{- end }}
|
|
diff --git a/gnocchi/templates/job-ks-user.yaml b/gnocchi/templates/job-ks-user.yaml
|
|
index 371f6b35..1dd7e5a0 100644
|
|
--- a/gnocchi/templates/job-ks-user.yaml
|
|
+++ b/gnocchi/templates/job-ks-user.yaml
|
|
@@ -14,5 +14,8 @@ limitations under the License.
|
|
|
|
{{- if .Values.manifests.job_ks_user }}
|
|
{{- $ksUserJob := dict "envAll" . "serviceName" "gnocchi" -}}
|
|
+{{- if .Values.pod.tolerations.gnocchi.enabled -}}
|
|
+{{- $_ := set $ksUserJob "tolerationsEnabled" true -}}
|
|
+{{- end -}}
|
|
{{ $ksUserJob | include "helm-toolkit.manifests.job_ks_user" }}
|
|
{{- end }}
|
|
diff --git a/gnocchi/templates/job-storage-init.yaml b/gnocchi/templates/job-storage-init.yaml
|
|
index e2736a5e..e4114e22 100644
|
|
--- a/gnocchi/templates/job-storage-init.yaml
|
|
+++ b/gnocchi/templates/job-storage-init.yaml
|
|
@@ -62,6 +62,9 @@ spec:
|
|
restartPolicy: OnFailure
|
|
nodeSelector:
|
|
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
|
+{{ if $envAll.Values.pod.tolerations.gnocchi.enabled }}
|
|
+{{ tuple $envAll "gnocchi" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{ end }}
|
|
initContainers:
|
|
{{ tuple $envAll "storage_init" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
- name: ceph-keyring-placement
|
|
diff --git a/gnocchi/templates/pod-gnocchi-test.yaml b/gnocchi/templates/pod-gnocchi-test.yaml
|
|
index 9ceda014..8defdca1 100644
|
|
--- a/gnocchi/templates/pod-gnocchi-test.yaml
|
|
+++ b/gnocchi/templates/pod-gnocchi-test.yaml
|
|
@@ -32,6 +32,9 @@ metadata:
|
|
spec:
|
|
nodeSelector:
|
|
{{ .Values.labels.test.node_selector_key }}: {{ .Values.labels.test.node_selector_value }}
|
|
+{{ if $envAll.Values.pod.tolerations.gnocchi.enabled }}
|
|
+{{ tuple $envAll "gnocchi" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 2 }}
|
|
+{{ end }}
|
|
serviceAccountName: {{ $serviceAccountName }}
|
|
restartPolicy: Never
|
|
initContainers:
|
|
diff --git a/gnocchi/values.yaml b/gnocchi/values.yaml
|
|
index 4ed1ba66..74cf0163 100644
|
|
--- a/gnocchi/values.yaml
|
|
+++ b/gnocchi/values.yaml
|
|
@@ -207,6 +207,13 @@ pod:
|
|
default: kubernetes.io/hostname
|
|
weight:
|
|
default: 10
|
|
+ tolerations:
|
|
+ gnocchi:
|
|
+ enabled: false
|
|
+ tolerations:
|
|
+ - key: node-role.kubernetes.io/master
|
|
+ operator: Exists
|
|
+ effect: NoSchedule
|
|
mounts:
|
|
gnocchi_api:
|
|
init_container: null
|
|
diff --git a/helm-toolkit/templates/manifests/_job-bootstrap.tpl b/helm-toolkit/templates/manifests/_job-bootstrap.tpl
|
|
index 3cc07cc6..5d98c8b7 100644
|
|
--- a/helm-toolkit/templates/manifests/_job-bootstrap.tpl
|
|
+++ b/helm-toolkit/templates/manifests/_job-bootstrap.tpl
|
|
@@ -23,6 +23,7 @@ limitations under the License.
|
|
{{- $jobAnnotations := index . "jobAnnotations" -}}
|
|
{{- $jobLabels := index . "jobLabels" -}}
|
|
{{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}}
|
|
+{{- $tolerationsEnabled := index . "tolerationsEnabled" | default false -}}
|
|
{{- $podVolMounts := index . "podVolMounts" | default false -}}
|
|
{{- $podVols := index . "podVols" | default false -}}
|
|
{{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}}
|
|
@@ -67,6 +68,9 @@ spec:
|
|
restartPolicy: OnFailure
|
|
nodeSelector:
|
|
{{ toYaml $nodeSelector | indent 8 }}
|
|
+{{- if $tolerationsEnabled }}
|
|
+{{ tuple $envAll $serviceName | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{- end}}
|
|
initContainers:
|
|
{{ tuple $envAll "bootstrap" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
containers:
|
|
diff --git a/helm-toolkit/templates/manifests/_job-db-drop-mysql.tpl b/helm-toolkit/templates/manifests/_job-db-drop-mysql.tpl
|
|
index 91fd5ad7..62ed1191 100644
|
|
--- a/helm-toolkit/templates/manifests/_job-db-drop-mysql.tpl
|
|
+++ b/helm-toolkit/templates/manifests/_job-db-drop-mysql.tpl
|
|
@@ -28,6 +28,7 @@ limitations under the License.
|
|
{{- $jobAnnotations := index . "jobAnnotations" -}}
|
|
{{- $jobLabels := index . "jobLabels" -}}
|
|
{{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}}
|
|
+{{- $tolerationsEnabled := index . "tolerationsEnabled" | default false -}}
|
|
{{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}}
|
|
{{- $configMapEtc := index . "configMapEtc" | default (printf "%s-%s" $serviceName "etc" ) -}}
|
|
{{- $dbToDrop := index . "dbToDrop" | default ( dict "adminSecret" $envAll.Values.secrets.oslo_db.admin "configFile" (printf "/etc/%s/%s.conf" $serviceName $serviceName ) "logConfigFile" (printf "/etc/%s/logging.conf" $serviceName ) "configDbSection" "database" "configDbKey" "connection" ) -}}
|
|
@@ -68,6 +69,9 @@ spec:
|
|
restartPolicy: OnFailure
|
|
nodeSelector:
|
|
{{ toYaml $nodeSelector | indent 8 }}
|
|
+{{- if $tolerationsEnabled }}
|
|
+{{ tuple $envAll $serviceName | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{- end}}
|
|
initContainers:
|
|
{{ tuple $envAll "db_drop" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
containers:
|
|
diff --git a/helm-toolkit/templates/manifests/_job-db-init-mysql.tpl b/helm-toolkit/templates/manifests/_job-db-init-mysql.tpl
|
|
index b3348f57..745e8dab 100644
|
|
--- a/helm-toolkit/templates/manifests/_job-db-init-mysql.tpl
|
|
+++ b/helm-toolkit/templates/manifests/_job-db-init-mysql.tpl
|
|
@@ -28,6 +28,7 @@ limitations under the License.
|
|
{{- $jobAnnotations := index . "jobAnnotations" -}}
|
|
{{- $jobLabels := index . "jobLabels" -}}
|
|
{{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}}
|
|
+{{- $tolerationsEnabled := index . "tolerationsEnabled" | default false -}}
|
|
{{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}}
|
|
{{- $configMapEtc := index . "configMapEtc" | default (printf "%s-%s" $serviceName "etc" ) -}}
|
|
{{- $dbToInit := index . "dbToInit" | default ( dict "adminSecret" $envAll.Values.secrets.oslo_db.admin "configFile" (printf "/etc/%s/%s.conf" $serviceName $serviceName ) "logConfigFile" (printf "/etc/%s/logging.conf" $serviceName ) "configDbSection" "database" "configDbKey" "connection" ) -}}
|
|
@@ -68,6 +69,9 @@ spec:
|
|
restartPolicy: OnFailure
|
|
nodeSelector:
|
|
{{ toYaml $nodeSelector | indent 8 }}
|
|
+{{- if $tolerationsEnabled }}
|
|
+{{ tuple $envAll $serviceName | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{- end}}
|
|
initContainers:
|
|
{{ tuple $envAll "db_init" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
containers:
|
|
diff --git a/helm-toolkit/templates/manifests/_job-db-sync.tpl b/helm-toolkit/templates/manifests/_job-db-sync.tpl
|
|
index 03763430..24d2496d 100644
|
|
--- a/helm-toolkit/templates/manifests/_job-db-sync.tpl
|
|
+++ b/helm-toolkit/templates/manifests/_job-db-sync.tpl
|
|
@@ -23,6 +23,7 @@ limitations under the License.
|
|
{{- $jobAnnotations := index . "jobAnnotations" -}}
|
|
{{- $jobLabels := index . "jobLabels" -}}
|
|
{{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}}
|
|
+{{- $tolerationsEnabled := index . "tolerationsEnabled" | default false -}}
|
|
{{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}}
|
|
{{- $configMapEtc := index . "configMapEtc" | default (printf "%s-%s" $serviceName "etc" ) -}}
|
|
{{- $podVolMounts := index . "podVolMounts" | default false -}}
|
|
@@ -65,6 +66,9 @@ spec:
|
|
restartPolicy: OnFailure
|
|
nodeSelector:
|
|
{{ toYaml $nodeSelector | indent 8 }}
|
|
+{{- if $tolerationsEnabled }}
|
|
+{{ tuple $envAll $serviceName | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{- end}}
|
|
initContainers:
|
|
{{ tuple $envAll "db_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
containers:
|
|
diff --git a/helm-toolkit/templates/manifests/_job-ks-endpoints.tpl b/helm-toolkit/templates/manifests/_job-ks-endpoints.tpl
|
|
index 2d130e13..3a7df7ff 100644
|
|
--- a/helm-toolkit/templates/manifests/_job-ks-endpoints.tpl
|
|
+++ b/helm-toolkit/templates/manifests/_job-ks-endpoints.tpl
|
|
@@ -24,6 +24,7 @@ limitations under the License.
|
|
{{- $jobAnnotations := index . "jobAnnotations" -}}
|
|
{{- $jobLabels := index . "jobLabels" -}}
|
|
{{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}}
|
|
+{{- $tolerationsEnabled := index . "tolerationsEnabled" | default false -}}
|
|
{{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}}
|
|
{{- $secretBin := index . "secretBin" -}}
|
|
{{- $tlsSecret := index . "tlsSecret" | default "" -}}
|
|
@@ -68,6 +69,9 @@ spec:
|
|
restartPolicy: {{ $restartPolicy }}
|
|
nodeSelector:
|
|
{{ toYaml $nodeSelector | indent 8 }}
|
|
+{{- if $tolerationsEnabled }}
|
|
+{{ tuple $envAll $serviceName | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{- end}}
|
|
initContainers:
|
|
{{ tuple $envAll "ks_endpoints" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
containers:
|
|
diff --git a/helm-toolkit/templates/manifests/_job-ks-service.tpl b/helm-toolkit/templates/manifests/_job-ks-service.tpl
|
|
index 8347b580..a109e3cc 100644
|
|
--- a/helm-toolkit/templates/manifests/_job-ks-service.tpl
|
|
+++ b/helm-toolkit/templates/manifests/_job-ks-service.tpl
|
|
@@ -24,6 +24,7 @@ limitations under the License.
|
|
{{- $jobAnnotations := index . "jobAnnotations" -}}
|
|
{{- $jobLabels := index . "jobLabels" -}}
|
|
{{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}}
|
|
+{{- $tolerationsEnabled := index . "tolerationsEnabled" | default false -}}
|
|
{{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}}
|
|
{{- $secretBin := index . "secretBin" -}}
|
|
{{- $tlsSecret := index . "tlsSecret" | default "" -}}
|
|
@@ -68,6 +69,9 @@ spec:
|
|
restartPolicy: {{ $restartPolicy }}
|
|
nodeSelector:
|
|
{{ toYaml $nodeSelector | indent 8 }}
|
|
+{{- if $tolerationsEnabled }}
|
|
+{{ tuple $envAll $serviceName | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{- end}}
|
|
initContainers:
|
|
{{ tuple $envAll "ks_service" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
containers:
|
|
diff --git a/helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl b/helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl
|
|
index 80960f47..905eb71a 100644
|
|
--- a/helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl
|
|
+++ b/helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl
|
|
@@ -45,6 +45,7 @@ limitations under the License.
|
|
{{- $jobAnnotations := index . "jobAnnotations" -}}
|
|
{{- $jobLabels := index . "jobLabels" -}}
|
|
{{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}}
|
|
+{{- $tolerationsEnabled := index . "tolerationsEnabled" | default false -}}
|
|
{{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}}
|
|
{{- $serviceUser := index . "serviceUser" | default $serviceName -}}
|
|
{{- $secretBin := index . "secretBin" -}}
|
|
@@ -68,6 +69,9 @@ spec:
|
|
restartPolicy: {{ $restartPolicy }}
|
|
nodeSelector:
|
|
{{ toYaml $nodeSelector | indent 8 }}
|
|
+{{- if $tolerationsEnabled }}
|
|
+{{ tuple $envAll $serviceName | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{- end}}
|
|
initContainers:
|
|
{{ tuple $envAll "ks_user" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
containers:
|
|
diff --git a/helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl b/helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl
|
|
index 7ecacced..69820642 100644
|
|
--- a/helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl
|
|
+++ b/helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl
|
|
@@ -18,6 +18,7 @@ limitations under the License.
|
|
{{- $jobAnnotations := index . "jobAnnotations" -}}
|
|
{{- $jobLabels := index . "jobLabels" -}}
|
|
{{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}}
|
|
+{{- $tolerationsEnabled := index . "tolerationsEnabled" | default false -}}
|
|
{{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}}
|
|
{{- $serviceUser := index . "serviceUser" | default $serviceName -}}
|
|
{{- $secretBin := index . "secretBin" -}}
|
|
@@ -58,6 +59,9 @@ spec:
|
|
restartPolicy: OnFailure
|
|
nodeSelector:
|
|
{{ toYaml $nodeSelector | indent 8 }}
|
|
+{{- if $tolerationsEnabled }}
|
|
+{{ tuple $envAll $serviceName | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{- end}}
|
|
initContainers:
|
|
{{ tuple $envAll "rabbit_init" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
containers:
|
|
diff --git a/helm-toolkit/templates/manifests/_job-s3-bucket.yaml.tpl b/helm-toolkit/templates/manifests/_job-s3-bucket.yaml.tpl
|
|
index 9dc28597..29cb9937 100644
|
|
--- a/helm-toolkit/templates/manifests/_job-s3-bucket.yaml.tpl
|
|
+++ b/helm-toolkit/templates/manifests/_job-s3-bucket.yaml.tpl
|
|
@@ -23,6 +23,7 @@ limitations under the License.
|
|
{{- $jobAnnotations := index . "jobAnnotations" -}}
|
|
{{- $jobLabels := index . "jobLabels" -}}
|
|
{{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}}
|
|
+{{- $tolerationsEnabled := index . "tolerationsEnabled" | default false -}}
|
|
{{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}}
|
|
{{- $configMapCeph := index . "configMapCeph" | default (printf "ceph-etc" ) -}}
|
|
{{- $secretBin := index . "secretBin" -}}
|
|
@@ -63,6 +64,9 @@ spec:
|
|
restartPolicy: OnFailure
|
|
nodeSelector:
|
|
{{ toYaml $nodeSelector | indent 8 }}
|
|
+{{- if $tolerationsEnabled }}
|
|
+{{ tuple $envAll $serviceName | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{- end}}
|
|
initContainers:
|
|
{{ tuple $envAll "s3_bucket" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
containers:
|
|
diff --git a/helm-toolkit/templates/manifests/_job-s3-user.yaml.tpl b/helm-toolkit/templates/manifests/_job-s3-user.yaml.tpl
|
|
index 3dd407ea..50d9af59 100644
|
|
--- a/helm-toolkit/templates/manifests/_job-s3-user.yaml.tpl
|
|
+++ b/helm-toolkit/templates/manifests/_job-s3-user.yaml.tpl
|
|
@@ -23,6 +23,7 @@ limitations under the License.
|
|
{{- $jobAnnotations := index . "jobAnnotations" -}}
|
|
{{- $jobLabels := index . "jobLabels" -}}
|
|
{{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}}
|
|
+{{- $tolerationsEnabled := index . "tolerationsEnabled" | default false -}}
|
|
{{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}}
|
|
{{- $configMapCeph := index . "configMapCeph" | default (printf "ceph-etc" ) -}}
|
|
{{- $secretBin := index . "secretBin" -}}
|
|
@@ -61,6 +62,9 @@ spec:
|
|
restartPolicy: OnFailure
|
|
nodeSelector:
|
|
{{ toYaml $nodeSelector | indent 8 }}
|
|
+{{- if $tolerationsEnabled }}
|
|
+{{ tuple $envAll $serviceName | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{- end}}
|
|
initContainers:
|
|
{{ tuple $envAll "s3_user" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
- name: ceph-keyring-placement
|
|
diff --git a/helm-toolkit/templates/manifests/_job_image_repo_sync.tpl b/helm-toolkit/templates/manifests/_job_image_repo_sync.tpl
|
|
index 6fed825f..0906df4c 100644
|
|
--- a/helm-toolkit/templates/manifests/_job_image_repo_sync.tpl
|
|
+++ b/helm-toolkit/templates/manifests/_job_image_repo_sync.tpl
|
|
@@ -23,6 +23,7 @@ limitations under the License.
|
|
{{- $jobAnnotations := index . "jobAnnotations" -}}
|
|
{{- $jobLabels := index . "jobLabels" -}}
|
|
{{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}}
|
|
+{{- $tolerationsEnabled := index . "tolerationsEnabled" | default false -}}
|
|
{{- $podVolMounts := index . "podVolMounts" | default false -}}
|
|
{{- $podVols := index . "podVols" | default false -}}
|
|
{{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}}
|
|
@@ -60,6 +61,9 @@ spec:
|
|
restartPolicy: OnFailure
|
|
nodeSelector:
|
|
{{ toYaml $nodeSelector | indent 8 }}
|
|
+{{- if $tolerationsEnabled }}
|
|
+{{ tuple $envAll $serviceName | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{- end}}
|
|
initContainers:
|
|
{{ tuple $envAll "image_repo_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
containers:
|
|
diff --git a/ingress/templates/deployment-error.yaml b/ingress/templates/deployment-error.yaml
|
|
index 417e63d4..ccd6c3b3 100644
|
|
--- a/ingress/templates/deployment-error.yaml
|
|
+++ b/ingress/templates/deployment-error.yaml
|
|
@@ -49,6 +49,9 @@ spec:
|
|
{{ tuple $envAll "ingress" "error-pages" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
|
nodeSelector:
|
|
{{ .Values.labels.error_server.node_selector_key }}: {{ .Values.labels.error_server.node_selector_value | quote }}
|
|
+{{ if $envAll.Values.pod.tolerations.ingress.enabled }}
|
|
+{{ tuple $envAll "ingress" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{ end }}
|
|
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.error_pages.timeout | default "60" }}
|
|
initContainers:
|
|
{{ tuple $envAll "error_pages" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
diff --git a/ingress/templates/deployment-ingress.yaml b/ingress/templates/deployment-ingress.yaml
|
|
index c6aaf46a..780af3a3 100644
|
|
--- a/ingress/templates/deployment-ingress.yaml
|
|
+++ b/ingress/templates/deployment-ingress.yaml
|
|
@@ -206,6 +206,9 @@ spec:
|
|
affinity:
|
|
{{ tuple $envAll "ingress" "server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
|
{{- end }}
|
|
+{{ if $envAll.Values.pod.tolerations.ingress.enabled }}
|
|
+{{ tuple $envAll "ingress" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{ end }}
|
|
nodeSelector:
|
|
{{ .Values.labels.server.node_selector_key }}: {{ .Values.labels.server.node_selector_value | quote }}
|
|
{{- if .Values.network.host_namespace }}
|
|
diff --git a/ingress/templates/job-image-repo-sync.yaml b/ingress/templates/job-image-repo-sync.yaml
|
|
index c4841467..2132f9a3 100644
|
|
--- a/ingress/templates/job-image-repo-sync.yaml
|
|
+++ b/ingress/templates/job-image-repo-sync.yaml
|
|
@@ -14,5 +14,8 @@ limitations under the License.
|
|
|
|
{{- if and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }}
|
|
{{- $imageRepoSyncJob := dict "envAll" . "serviceName" "ingress" -}}
|
|
+{{- if .Values.pod.tolerations.ingress.enabled -}}
|
|
+{{- $_ := set $imageRepoSyncJob "tolerationsEnabled" true -}}
|
|
+{{- end -}}
|
|
{{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }}
|
|
{{- end }}
|
|
diff --git a/ingress/values.yaml b/ingress/values.yaml
|
|
index b70ec2a8..c326c15a 100644
|
|
--- a/ingress/values.yaml
|
|
+++ b/ingress/values.yaml
|
|
@@ -81,6 +81,13 @@ pod:
|
|
default: kubernetes.io/hostname
|
|
weight:
|
|
default: 10
|
|
+ tolerations:
|
|
+ ingress:
|
|
+ enabled: false
|
|
+ tolerations:
|
|
+ - key: node-role.kubernetes.io/master
|
|
+ operator: Exists
|
|
+ effect: NoSchedule
|
|
dns_policy: "ClusterFirstWithHostNet"
|
|
replicas:
|
|
ingress: 1
|
|
diff --git a/libvirt/templates/daemonset-libvirt.yaml b/libvirt/templates/daemonset-libvirt.yaml
|
|
index 2c0ccda8..4853d0c2 100644
|
|
--- a/libvirt/templates/daemonset-libvirt.yaml
|
|
+++ b/libvirt/templates/daemonset-libvirt.yaml
|
|
@@ -69,6 +69,9 @@ spec:
|
|
serviceAccountName: {{ $serviceAccountName }}
|
|
nodeSelector:
|
|
{{ .Values.labels.agent.libvirt.node_selector_key }}: {{ .Values.labels.agent.libvirt.node_selector_value }}
|
|
+{{ if $envAll.Values.pod.tolerations.libvirt.enabled }}
|
|
+{{ tuple $envAll "libvirt" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{ end }}
|
|
hostNetwork: true
|
|
hostPID: true
|
|
hostIPC: true
|
|
diff --git a/libvirt/templates/job-image-repo-sync.yaml b/libvirt/templates/job-image-repo-sync.yaml
|
|
index d359d1aa..91d52820 100644
|
|
--- a/libvirt/templates/job-image-repo-sync.yaml
|
|
+++ b/libvirt/templates/job-image-repo-sync.yaml
|
|
@@ -14,5 +14,8 @@ limitations under the License.
|
|
|
|
{{- if and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }}
|
|
{{- $imageRepoSyncJob := dict "envAll" . "serviceName" "libvirt" -}}
|
|
+{{- if .Values.pod.tolerations.libvirt.enabled -}}
|
|
+{{- $_ := set $imageRepoSyncJob "tolerationsEnabled" true -}}
|
|
+{{- end -}}
|
|
{{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }}
|
|
{{- end }}
|
|
diff --git a/libvirt/values.yaml b/libvirt/values.yaml
|
|
index b6cab8db..f23299e9 100644
|
|
--- a/libvirt/values.yaml
|
|
+++ b/libvirt/values.yaml
|
|
@@ -137,6 +137,13 @@ pod:
|
|
default: kubernetes.io/hostname
|
|
weight:
|
|
default: 10
|
|
+ tolerations:
|
|
+ libvirt:
|
|
+ enabled: false
|
|
+ tolerations:
|
|
+ - key: node-role.kubernetes.io/master
|
|
+ operator: Exists
|
|
+ effect: NoSchedule
|
|
dns_policy: "ClusterFirstWithHostNet"
|
|
mounts:
|
|
libvirt:
|
|
diff --git a/mariadb/templates/cron-job-backup-mariadb.yaml b/mariadb/templates/cron-job-backup-mariadb.yaml
|
|
index 660c6557..c004b5f5 100644
|
|
--- a/mariadb/templates/cron-job-backup-mariadb.yaml
|
|
+++ b/mariadb/templates/cron-job-backup-mariadb.yaml
|
|
@@ -52,6 +52,9 @@ spec:
|
|
{{ dict "envAll" $envAll "application" "mariadb_backup" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 10 }}
|
|
serviceAccountName: {{ $serviceAccountName }}
|
|
restartPolicy: OnFailure
|
|
+{{ if $envAll.Values.pod.tolerations.mariadb.enabled }}
|
|
+{{ tuple $envAll "mariadb" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 10 }}
|
|
+{{ end }}
|
|
nodeSelector:
|
|
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
|
initContainers:
|
|
diff --git a/mariadb/templates/deployment-error.yaml b/mariadb/templates/deployment-error.yaml
|
|
index ea085ae4..4f3b68bd 100644
|
|
--- a/mariadb/templates/deployment-error.yaml
|
|
+++ b/mariadb/templates/deployment-error.yaml
|
|
@@ -47,6 +47,9 @@ spec:
|
|
{{ dict "envAll" $envAll "application" "error_pages" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
|
affinity:
|
|
{{ tuple $envAll "mariadb" "ingress-error-pages" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
|
+{{ if $envAll.Values.pod.tolerations.mariadb.enabled }}
|
|
+{{ tuple $envAll "mariadb" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{ end }}
|
|
nodeSelector:
|
|
{{ .Values.labels.error_server.node_selector_key }}: {{ .Values.labels.error_server.node_selector_value }}
|
|
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.error_pages.timeout | default "60" }}
|
|
diff --git a/mariadb/templates/deployment-ingress.yaml b/mariadb/templates/deployment-ingress.yaml
|
|
index add8501c..a9fc9896 100644
|
|
--- a/mariadb/templates/deployment-ingress.yaml
|
|
+++ b/mariadb/templates/deployment-ingress.yaml
|
|
@@ -234,6 +234,9 @@ spec:
|
|
{{ dict "envAll" $envAll "application" "ingress" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
|
affinity:
|
|
{{ tuple $envAll "mariadb" "ingress" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
|
+{{ if $envAll.Values.pod.tolerations.mariadb.enabled }}
|
|
+{{ tuple $envAll "mariadb" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{ end }}
|
|
nodeSelector:
|
|
{{ .Values.labels.ingress.node_selector_key }}: {{ .Values.labels.ingress.node_selector_value }}
|
|
terminationGracePeriodSeconds: 60
|
|
diff --git a/mariadb/templates/job-image-repo-sync.yaml b/mariadb/templates/job-image-repo-sync.yaml
|
|
index 3c2b5d21..2121a397 100644
|
|
--- a/mariadb/templates/job-image-repo-sync.yaml
|
|
+++ b/mariadb/templates/job-image-repo-sync.yaml
|
|
@@ -14,5 +14,8 @@ limitations under the License.
|
|
|
|
{{- if and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }}
|
|
{{- $imageRepoSyncJob := dict "envAll" . "serviceName" "mariadb" -}}
|
|
+{{- if .Values.pod.tolerations.mariadb.enabled -}}
|
|
+{{- $_ := set $imageRepoSyncJob "tolerationsEnabled" true -}}
|
|
+{{- end -}}
|
|
{{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }}
|
|
{{- end }}
|
|
diff --git a/mariadb/templates/job-ks-user.yaml b/mariadb/templates/job-ks-user.yaml
|
|
index 99b384d6..fddf8858 100644
|
|
--- a/mariadb/templates/job-ks-user.yaml
|
|
+++ b/mariadb/templates/job-ks-user.yaml
|
|
@@ -16,5 +16,8 @@ limitations under the License.
|
|
{{- $backoffLimit := .Values.jobs.ks_user.backoffLimit }}
|
|
{{- $activeDeadlineSeconds := .Values.jobs.ks_user.activeDeadlineSeconds }}
|
|
{{- $ksUserJob := dict "envAll" . "serviceName" "mariadb" "configMapBin" "mariadb-bin" "backoffLimit" $backoffLimit "activeDeadlineSeconds" $activeDeadlineSeconds -}}
|
|
+{{- if .Values.pod.tolerations.mariadb.enabled -}}
|
|
+{{- $_ := set $ksUserJob "tolerationsEnabled" true -}}
|
|
+{{- end -}}
|
|
{{ $ksUserJob | include "helm-toolkit.manifests.job_ks_user" }}
|
|
{{- end }}
|
|
diff --git a/mariadb/templates/pod-test.yaml b/mariadb/templates/pod-test.yaml
|
|
index 940430a9..98bac8c8 100644
|
|
--- a/mariadb/templates/pod-test.yaml
|
|
+++ b/mariadb/templates/pod-test.yaml
|
|
@@ -33,6 +33,9 @@ spec:
|
|
shareProcessNamespace: true
|
|
serviceAccountName: {{ $serviceAccountName }}
|
|
{{ dict "envAll" $envAll "application" "tests" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 2 }}
|
|
+{{ if $envAll.Values.pod.tolerations.mariadb.enabled }}
|
|
+{{ tuple $envAll "mariadb" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 2 }}
|
|
+{{ end }}
|
|
nodeSelector:
|
|
{{ .Values.labels.test.node_selector_key }}: {{ .Values.labels.test.node_selector_value }}
|
|
restartPolicy: Never
|
|
diff --git a/mariadb/templates/statefulset.yaml b/mariadb/templates/statefulset.yaml
|
|
index d2d1c2e3..0a3fb15d 100644
|
|
--- a/mariadb/templates/statefulset.yaml
|
|
+++ b/mariadb/templates/statefulset.yaml
|
|
@@ -106,6 +106,9 @@ spec:
|
|
{{ dict "envAll" $envAll "application" "server" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
|
affinity:
|
|
{{ tuple $envAll "mariadb" "server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
|
+{{ if $envAll.Values.pod.tolerations.mariadb.enabled }}
|
|
+{{ tuple $envAll "mariadb" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{ end }}
|
|
nodeSelector:
|
|
{{ .Values.labels.server.node_selector_key }}: {{ .Values.labels.server.node_selector_value }}
|
|
initContainers:
|
|
diff --git a/mariadb/values.yaml b/mariadb/values.yaml
|
|
index b86bf925..c355d42a 100644
|
|
--- a/mariadb/values.yaml
|
|
+++ b/mariadb/values.yaml
|
|
@@ -135,6 +135,13 @@ pod:
|
|
default: kubernetes.io/hostname
|
|
weight:
|
|
default: 10
|
|
+ tolerations:
|
|
+ mariadb:
|
|
+ enabled: false
|
|
+ tolerations:
|
|
+ - key: node-role.kubernetes.io/master
|
|
+ operator: Exists
|
|
+ effect: NoSchedule
|
|
replicas:
|
|
server: 3
|
|
ingress: 2
|
|
diff --git a/memcached/templates/deployment.yaml b/memcached/templates/deployment.yaml
|
|
index fc827495..0aa5f8ee 100644
|
|
--- a/memcached/templates/deployment.yaml
|
|
+++ b/memcached/templates/deployment.yaml
|
|
@@ -50,6 +50,9 @@ spec:
|
|
{{ tuple $envAll "memcached" "server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
|
nodeSelector:
|
|
{{ .Values.labels.server.node_selector_key }}: {{ .Values.labels.server.node_selector_value | quote }}
|
|
+{{ if $envAll.Values.pod.tolerations.memcached.enabled }}
|
|
+{{ tuple $envAll "memcached" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{ end }}
|
|
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.memcached.timeout | default "30" }}
|
|
initContainers:
|
|
{{ tuple $envAll "memcached" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
diff --git a/memcached/templates/job-image-repo-sync.yaml b/memcached/templates/job-image-repo-sync.yaml
|
|
index e2438d7e..ae519ff0 100644
|
|
--- a/memcached/templates/job-image-repo-sync.yaml
|
|
+++ b/memcached/templates/job-image-repo-sync.yaml
|
|
@@ -14,5 +14,8 @@ limitations under the License.
|
|
|
|
{{- if and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }}
|
|
{{- $imageRepoSyncJob := dict "envAll" . "serviceName" "memcached" -}}
|
|
+{{- if .Values.pod.tolerations.memcached.enabled -}}
|
|
+{{- $_ := set $imageRepoSyncJob "tolerationsEnabled" true -}}
|
|
+{{- end -}}
|
|
{{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }}
|
|
{{- end }}
|
|
diff --git a/memcached/values.yaml b/memcached/values.yaml
|
|
index 889f8cb3..f03a6901 100644
|
|
--- a/memcached/values.yaml
|
|
+++ b/memcached/values.yaml
|
|
@@ -142,6 +142,13 @@ pod:
|
|
default: preferredDuringSchedulingIgnoredDuringExecution
|
|
weight:
|
|
default: 10
|
|
+ tolerations:
|
|
+ memcached:
|
|
+ enabled: false
|
|
+ tolerations:
|
|
+ - key: node-role.kubernetes.io/master
|
|
+ operator: Exists
|
|
+ effect: NoSchedule
|
|
lifecycle:
|
|
upgrades:
|
|
deployments:
|
|
diff --git a/openvswitch/templates/daemonset-ovs-db.yaml b/openvswitch/templates/daemonset-ovs-db.yaml
|
|
index 8e8af636..17c343b4 100644
|
|
--- a/openvswitch/templates/daemonset-ovs-db.yaml
|
|
+++ b/openvswitch/templates/daemonset-ovs-db.yaml
|
|
@@ -59,6 +59,9 @@ spec:
|
|
{{ dict "envAll" $envAll "application" "openvswitch_db_server" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
|
nodeSelector:
|
|
{{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }}
|
|
+{{ if $envAll.Values.pod.tolerations.openvswitch.enabled }}
|
|
+{{ tuple $envAll "openvswitch" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{ end }}
|
|
dnsPolicy: {{ .Values.pod.dns_policy }}
|
|
hostNetwork: true
|
|
initContainers:
|
|
diff --git a/openvswitch/templates/daemonset-ovs-vswitchd.yaml b/openvswitch/templates/daemonset-ovs-vswitchd.yaml
|
|
index d86d466a..97507b49 100644
|
|
--- a/openvswitch/templates/daemonset-ovs-vswitchd.yaml
|
|
+++ b/openvswitch/templates/daemonset-ovs-vswitchd.yaml
|
|
@@ -72,6 +72,9 @@ spec:
|
|
{{ dict "envAll" $envAll "application" "openvswitch_vswitchd" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
|
nodeSelector:
|
|
{{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }}
|
|
+{{ if $envAll.Values.pod.tolerations.openvswitch.enabled }}
|
|
+{{ tuple $envAll "openvswitch" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{ end }}
|
|
dnsPolicy: {{ .Values.pod.dns_policy }}
|
|
hostNetwork: true
|
|
initContainers:
|
|
diff --git a/openvswitch/templates/job-image-repo-sync.yaml b/openvswitch/templates/job-image-repo-sync.yaml
|
|
index 4d1058ed..765061c3 100644
|
|
--- a/openvswitch/templates/job-image-repo-sync.yaml
|
|
+++ b/openvswitch/templates/job-image-repo-sync.yaml
|
|
@@ -14,5 +14,8 @@ limitations under the License.
|
|
|
|
{{- if and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }}
|
|
{{- $imageRepoSyncJob := dict "envAll" . "serviceName" "openvswitch" -}}
|
|
+{{- if .Values.pod.tolerations.openvswitch.enabled -}}
|
|
+{{- $_ := set $imageRepoSyncJob "tolerationsEnabled" true -}}
|
|
+{{- end -}}
|
|
{{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }}
|
|
{{- end }}
|
|
diff --git a/openvswitch/values.yaml b/openvswitch/values.yaml
|
|
index de6169a1..c953a899 100644
|
|
--- a/openvswitch/values.yaml
|
|
+++ b/openvswitch/values.yaml
|
|
@@ -37,6 +37,13 @@ labels:
|
|
node_selector_value: enabled
|
|
|
|
pod:
|
|
+ tolerations:
|
|
+ openvswitch:
|
|
+ enabled: false
|
|
+ tolerations:
|
|
+ - key: node-role.kubernetes.io/master
|
|
+ operator: Exists
|
|
+ effect: NoSchedule
|
|
probes:
|
|
ovs_db:
|
|
ovs_db:
|
|
diff --git a/rabbitmq/templates/job-cluster-wait.yaml b/rabbitmq/templates/job-cluster-wait.yaml
|
|
index b309e6e5..131cf456 100644
|
|
--- a/rabbitmq/templates/job-cluster-wait.yaml
|
|
+++ b/rabbitmq/templates/job-cluster-wait.yaml
|
|
@@ -50,6 +50,9 @@ spec:
|
|
{{ dict "envAll" $envAll "application" "cluster_wait" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
|
serviceAccountName: {{ $serviceAccountName }}
|
|
restartPolicy: OnFailure
|
|
+{{ if $envAll.Values.pod.tolerations.rabbitmq.enabled }}
|
|
+{{ tuple $envAll "rabbitmq" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{ end }}
|
|
nodeSelector:
|
|
{{ $envAll.Values.labels.jobs.node_selector_key }}: {{ $envAll.Values.labels.test.node_selector_value | quote }}
|
|
initContainers:
|
|
diff --git a/rabbitmq/templates/job-image-repo-sync.yaml b/rabbitmq/templates/job-image-repo-sync.yaml
|
|
index 4875ed44..8fd379f9 100644
|
|
--- a/rabbitmq/templates/job-image-repo-sync.yaml
|
|
+++ b/rabbitmq/templates/job-image-repo-sync.yaml
|
|
@@ -14,5 +14,8 @@ limitations under the License.
|
|
|
|
{{- if and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }}
|
|
{{- $imageRepoSyncJob := dict "envAll" . "serviceName" "rabbitmq" -}}
|
|
+{{- if .Values.pod.tolerations.rabbitmq.enabled -}}
|
|
+{{- $_ := set $imageRepoSyncJob "tolerationsEnabled" true -}}
|
|
+{{- end -}}
|
|
{{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }}
|
|
{{- end }}
|
|
diff --git a/rabbitmq/templates/pod-test.yaml b/rabbitmq/templates/pod-test.yaml
|
|
index 2ee00d5d..a1d9639f 100644
|
|
--- a/rabbitmq/templates/pod-test.yaml
|
|
+++ b/rabbitmq/templates/pod-test.yaml
|
|
@@ -42,6 +42,9 @@ metadata:
|
|
spec:
|
|
{{ dict "envAll" $envAll "application" "test" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 2 }}
|
|
serviceAccountName: {{ $serviceAccountName }}
|
|
+{{ if $envAll.Values.pod.tolerations.rabbitmq.enabled }}
|
|
+{{ tuple $envAll "rabbitmq" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 2 }}
|
|
+{{ end }}
|
|
nodeSelector:
|
|
{{ $envAll.Values.labels.test.node_selector_key }}: {{ $envAll.Values.labels.test.node_selector_value | quote }}
|
|
restartPolicy: Never
|
|
diff --git a/rabbitmq/templates/statefulset.yaml b/rabbitmq/templates/statefulset.yaml
|
|
index 578ea357..eebc8379 100644
|
|
--- a/rabbitmq/templates/statefulset.yaml
|
|
+++ b/rabbitmq/templates/statefulset.yaml
|
|
@@ -103,6 +103,9 @@ spec:
|
|
serviceAccountName: {{ $rcControllerName | quote }}
|
|
affinity:
|
|
{{ tuple $envAll "rabbitmq" "server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
|
+{{ if $envAll.Values.pod.tolerations.rabbitmq.enabled }}
|
|
+{{ tuple $envAll "rabbitmq" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
|
|
+{{ end }}
|
|
nodeSelector:
|
|
{{ $envAll.Values.labels.server.node_selector_key }}: {{ $envAll.Values.labels.server.node_selector_value | quote }}
|
|
initContainers:
|
|
diff --git a/rabbitmq/values.yaml b/rabbitmq/values.yaml
|
|
index c593966f..4e1f7328 100644
|
|
--- a/rabbitmq/values.yaml
|
|
+++ b/rabbitmq/values.yaml
|
|
@@ -112,6 +112,13 @@ pod:
|
|
default: kubernetes.io/hostname
|
|
weight:
|
|
default: 10
|
|
+ tolerations:
|
|
+ rabbitmq:
|
|
+ enabled: false
|
|
+ tolerations:
|
|
+ - key: node-role.kubernetes.io/master
|
|
+ operator: Exists
|
|
+ effect: NoSchedule
|
|
replicas:
|
|
server: 2
|
|
prometheus_rabbitmq_exporter: 1
|
|
--
|
|
2.17.1
|
|
|