diff --git a/glance/Chart.yaml b/glance/Chart.yaml index a491fdfc5f..ed08d4677f 100644 --- a/glance/Chart.yaml +++ b/glance/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Glance name: glance -version: 0.3.0 +version: 0.3.1 home: https://docs.openstack.org/glance/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Glance/OpenStack_Project_Glance_vertical.png sources: diff --git a/glance/templates/deployment-api.yaml b/glance/templates/deployment-api.yaml index 78e1671528..aee6edaa49 100644 --- a/glance/templates/deployment-api.yaml +++ b/glance/templates/deployment-api.yaml @@ -49,6 +49,9 @@ spec: {{ dict "envAll" $envAll "application" "glance" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} affinity: {{ tuple $envAll "glance" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} +{{ if $envAll.Values.pod.tolerations.glance.enabled }} +{{ tuple $envAll "glance" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }} +{{ end }} nodeSelector: {{ .Values.labels.api.node_selector_key }}: {{ .Values.labels.api.node_selector_value }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.api.timeout | default "600" }} diff --git a/glance/templates/job-bootstrap.yaml b/glance/templates/job-bootstrap.yaml index d51cbd3ea4..461c52af35 100644 --- a/glance/templates/job-bootstrap.yaml +++ b/glance/templates/job-bootstrap.yaml @@ -36,5 +36,8 @@ volumes: {{- if .Values.helm3_hook }} {{- $_ := set $bootstrapJob "jobAnnotations" (include "metadata.annotations.job.bootstrap" . | fromYaml) }} {{- end }} +{{- if .Values.pod.tolerations.glance.enabled -}} +{{- $_ := set $bootstrapJob "tolerationsEnabled" true -}} +{{- end -}} {{ $bootstrapJob | include "helm-toolkit.manifests.job_bootstrap" }} {{- end }} diff --git a/glance/templates/job-clean.yaml b/glance/templates/job-clean.yaml index b4241f4100..26977c0848 100644 --- a/glance/templates/job-clean.yaml +++ b/glance/templates/job-clean.yaml @@ -64,6 +64,9 @@ spec: serviceAccountName: {{ $serviceAccountName }} {{ dict "envAll" $envAll "application" "clean" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} restartPolicy: OnFailure +{{ if $envAll.Values.pod.tolerations.glance.enabled }} +{{ tuple $envAll "glance" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }} +{{ end }} nodeSelector: {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} initContainers: diff --git a/glance/templates/job-db-drop.yaml b/glance/templates/job-db-drop.yaml index 67ed939996..66f3a1898d 100644 --- a/glance/templates/job-db-drop.yaml +++ b/glance/templates/job-db-drop.yaml @@ -19,5 +19,8 @@ limitations under the License. {{- if .Values.manifests.certificates -}} {{- $_ := set $dbToDrop "dbAdminTlsSecret" .Values.endpoints.oslo_db.auth.admin.secret.tls.internal -}} {{- end -}} +{{- if .Values.pod.tolerations.glance.enabled -}} +{{- $_ := set $dbDropJob "tolerationsEnabled" true -}} +{{- end -}} {{ $dbDropJob | include "helm-toolkit.manifests.job_db_drop_mysql" }} {{- end }} diff --git a/glance/templates/job-db-init.yaml b/glance/templates/job-db-init.yaml index d9b46ca72b..6f797814d6 100644 --- a/glance/templates/job-db-init.yaml +++ b/glance/templates/job-db-init.yaml @@ -27,5 +27,8 @@ helm.sh/hook-weight: "-5" {{- if .Values.helm3_hook }} {{- $_ := set $dbInitJob "jobAnnotations" (include "metadata.annotations.job.db_init" . | fromYaml) }} {{- end }} +{{- if .Values.pod.tolerations.glance.enabled -}} +{{- $_ := set $dbInitJob "tolerationsEnabled" true -}} +{{- end -}} {{ $dbInitJob | include "helm-toolkit.manifests.job_db_init_mysql" }} {{- end }} diff --git a/glance/templates/job-db-sync.yaml b/glance/templates/job-db-sync.yaml index e62b42cf4b..1434edd1af 100644 --- a/glance/templates/job-db-sync.yaml +++ b/glance/templates/job-db-sync.yaml @@ -26,5 +26,8 @@ helm.sh/hook-weight: "-4" {{- if .Values.helm3_hook }} {{- $_ := set $dbSyncJob "jobAnnotations" (include "metadata.annotations.job.db_sync" . | fromYaml) }} {{- end }} +{{- if .Values.pod.tolerations.glance.enabled -}} +{{- $_ := set $dbSyncJob "tolerationsEnabled" true -}} +{{- end -}} {{ $dbSyncJob | include "helm-toolkit.manifests.job_db_sync" }} {{- end }} diff --git a/glance/templates/job-image-repo-sync.yaml b/glance/templates/job-image-repo-sync.yaml index fa3f77829a..dc9d322613 100644 --- a/glance/templates/job-image-repo-sync.yaml +++ b/glance/templates/job-image-repo-sync.yaml @@ -21,5 +21,8 @@ helm.sh/hook: post-install,post-upgrade {{- if .Values.helm3_hook }} {{- $_ := $imageRepoSyncJob "jobAnnotations" (include "metadata.annotations.job.repo_sync" . | fromYaml) }} {{- end }} +{{- if .Values.pod.tolerations.glance.enabled -}} +{{- $_ := set $imageRepoSyncJob "tolerationsEnabled" true -}} +{{- end -}} {{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }} {{- end }} diff --git a/glance/templates/job-ks-endpoints.yaml b/glance/templates/job-ks-endpoints.yaml index 3fdf635f33..992ee37fc8 100644 --- a/glance/templates/job-ks-endpoints.yaml +++ b/glance/templates/job-ks-endpoints.yaml @@ -25,5 +25,8 @@ helm.sh/hook-weight: "-2" {{- if .Values.helm3_hook }} {{- $_ := set $ksServiceJob "jobAnnotations" (include "metadata.annotations.job.ks_endpoints" . | fromYaml) }} {{- end }} +{{- if .Values.pod.tolerations.glance.enabled -}} +{{- $_ := set $ksServiceJob "tolerationsEnabled" true -}} +{{- end -}} {{ $ksServiceJob | include "helm-toolkit.manifests.job_ks_endpoints" }} {{- end }} diff --git a/glance/templates/job-ks-service.yaml b/glance/templates/job-ks-service.yaml index e5d3b1d7e4..21bb13029a 100644 --- a/glance/templates/job-ks-service.yaml +++ b/glance/templates/job-ks-service.yaml @@ -25,5 +25,8 @@ helm.sh/hook-weight: "-3" {{- if .Values.helm3_hook }} {{- $_ := set $ksServiceJob "jobAnnotations" (include "metadata.annotations.job.ks_service" . | fromYaml) }} {{- end }} +{{- if .Values.pod.tolerations.glance.enabled -}} +{{- $_ := set $ksServiceJob "tolerationsEnabled" true -}} +{{- end -}} {{ $ksServiceJob | include "helm-toolkit.manifests.job_ks_service" }} {{- end }} diff --git a/glance/templates/job-ks-user.yaml b/glance/templates/job-ks-user.yaml index dddc2ed9c0..226be7182c 100644 --- a/glance/templates/job-ks-user.yaml +++ b/glance/templates/job-ks-user.yaml @@ -25,5 +25,8 @@ helm.sh/hook-weight: "-1" {{- if .Values.helm3_hook }} {{- $_ := set $ksUserJob "jobAnnotations" (include "metadata.annotations.job.ks_user" . | fromYaml) }} {{- end }} +{{- if .Values.pod.tolerations.glance.enabled -}} +{{- $_ := set $ksUserJob "tolerationsEnabled" true -}} +{{- end -}} {{ $ksUserJob | include "helm-toolkit.manifests.job_ks_user" }} {{- end }} diff --git a/glance/templates/job-metadefs-load.yaml b/glance/templates/job-metadefs-load.yaml index 5c162a5f91..1c2efaaae7 100644 --- a/glance/templates/job-metadefs-load.yaml +++ b/glance/templates/job-metadefs-load.yaml @@ -41,6 +41,9 @@ spec: serviceAccountName: {{ $serviceAccountName }} {{ dict "envAll" $envAll "application" "metadefs_load" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} restartPolicy: OnFailure +{{ if $envAll.Values.pod.tolerations.glance.enabled }} +{{ tuple $envAll "glance" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }} +{{ end }} nodeSelector: {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} initContainers: diff --git a/glance/templates/job-rabbit-init.yaml b/glance/templates/job-rabbit-init.yaml index 9c9387dd57..6bd14d6e1a 100644 --- a/glance/templates/job-rabbit-init.yaml +++ b/glance/templates/job-rabbit-init.yaml @@ -25,5 +25,8 @@ helm.sh/hook-weight: "-4" {{- if .Values.helm3_hook }} {{- $_ := set $rmqUserJob "jobAnnotations" (include "metadata.annotations.job.rabbit_init" . | fromYaml) }} {{- end }} +{{- if .Values.pod.tolerations.glance.enabled -}} +{{- $_ := set $rmqUserJob "tolerationsEnabled" true -}} +{{- end -}} {{ $rmqUserJob | include "helm-toolkit.manifests.job_rabbit_init" }} {{- end }} diff --git a/glance/templates/job-storage-init.yaml b/glance/templates/job-storage-init.yaml index 562c097b67..d8aee23789 100644 --- a/glance/templates/job-storage-init.yaml +++ b/glance/templates/job-storage-init.yaml @@ -69,6 +69,9 @@ spec: serviceAccountName: {{ $serviceAccountName }} {{ dict "envAll" $envAll "application" "storage_init" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} restartPolicy: OnFailure +{{ if $envAll.Values.pod.tolerations.glance.enabled }} +{{ tuple $envAll "glance" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }} +{{ end }} nodeSelector: {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} initContainers: diff --git a/glance/templates/pod-rally-test.yaml b/glance/templates/pod-rally-test.yaml index f062427013..938c040d79 100644 --- a/glance/templates/pod-rally-test.yaml +++ b/glance/templates/pod-rally-test.yaml @@ -31,6 +31,9 @@ metadata: "helm.sh/hook": test-success {{ dict "envAll" $envAll "podName" "glance-test" "containerNames" (list "init" "glance-test" "glance-test-ks-user") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 4 }} spec: +{{ if $envAll.Values.pod.tolerations.glance.enabled }} +{{ tuple $envAll "glance" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 2 }} +{{ end }} nodeSelector: {{ .Values.labels.test.node_selector_key }}: {{ .Values.labels.test.node_selector_value }} {{ dict "envAll" $envAll "application" "test" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 2 }} diff --git a/glance/values.yaml b/glance/values.yaml index 73070e69db..533e998a86 100644 --- a/glance/values.yaml +++ b/glance/values.yaml @@ -812,6 +812,13 @@ pod: default: kubernetes.io/hostname weight: default: 10 + tolerations: + glance: + enabled: false + tolerations: + - key: node-role.kubernetes.io/master + operator: Exists + effect: NoSchedule mounts: glance_api: init_container: null diff --git a/releasenotes/notes/glance.yaml b/releasenotes/notes/glance.yaml index 072a223096..f3dd03427f 100644 --- a/releasenotes/notes/glance.yaml +++ b/releasenotes/notes/glance.yaml @@ -21,4 +21,5 @@ glance: - 0.2.9 Helm 3 - Fix More Job Labels - 0.2.10 Update htk requirements repo - 0.3.0 Remove glance registry + - 0.3.1 Enable taint toleration for Openstack services ...