diff --git a/mariadb/Chart.yaml b/mariadb/Chart.yaml index 05d505d82..f787bde69 100644 --- a/mariadb/Chart.yaml +++ b/mariadb/Chart.yaml @@ -15,7 +15,7 @@ apiVersion: v1 appVersion: v10.2.31 description: OpenStack-Helm MariaDB name: mariadb -version: 0.2.16 +version: 0.2.17 home: https://mariadb.com/kb/en/ icon: http://badges.mariadb.org/mariadb-badge-180x60.png sources: diff --git a/mariadb/templates/cron-job-backup-mariadb.yaml b/mariadb/templates/cron-job-backup-mariadb.yaml index 660c6557e..c004b5f59 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 ea085ae4d..4f3b68bd8 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 add8501c2..a9fc98962 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 3c2b5d211..2121a3975 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 99b384d6c..fddf88583 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 940430a92..98bac8c8c 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 d2d1c2e36..0a3fb15d2 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 b86bf9254..c355d42a1 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/releasenotes/notes/mariadb.yaml b/releasenotes/notes/mariadb.yaml index a49c41338..3205f03db 100644 --- a/releasenotes/notes/mariadb.yaml +++ b/releasenotes/notes/mariadb.yaml @@ -32,4 +32,5 @@ mariadb: - 0.2.14 Fix comparison value - 0.2.15 Updated naming for subchart compatibility - 0.2.16 Revert naming for subchart compatibility + - 0.2.17 Enable taint toleration for Openstack services jobs ...