diff --git a/helm-toolkit/Chart.yaml b/helm-toolkit/Chart.yaml index 2df7ddd5e..f22d61e3b 100644 --- a/helm-toolkit/Chart.yaml +++ b/helm-toolkit/Chart.yaml @@ -15,7 +15,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Helm-Toolkit name: helm-toolkit -version: 0.2.8 +version: 0.2.9 home: https://docs.openstack.org/openstack-helm icon: https://www.openstack.org/themes/openstack/images/project-mascots/OpenStack-Helm/OpenStack_Project_OpenStackHelm_vertical.png sources: diff --git a/helm-toolkit/templates/manifests/_job-bootstrap.tpl b/helm-toolkit/templates/manifests/_job-bootstrap.tpl index 946f312f0..63e76083e 100644 --- a/helm-toolkit/templates/manifests/_job-bootstrap.tpl +++ b/helm-toolkit/templates/manifests/_job-bootstrap.tpl @@ -48,11 +48,6 @@ metadata: "helm.sh/hook-delete-policy": before-hook-creation {{- if $jobAnnotations }} {{ toYaml $jobAnnotations | indent 4 }} -{{- end }} - labels: - application: {{ $serviceName }} -{{- if $jobLabels }} -{{ toYaml $jobLabels | indent 4 }} {{- end }} spec: backoffLimit: {{ $backoffLimit }} @@ -63,6 +58,9 @@ spec: metadata: labels: {{ tuple $envAll $serviceName "bootstrap" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} +{{- if $jobLabels }} +{{ toYaml $jobLabels | indent 8 }} +{{- end }} annotations: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} spec: diff --git a/helm-toolkit/templates/manifests/_job-db-drop-mysql.tpl b/helm-toolkit/templates/manifests/_job-db-drop-mysql.tpl index 46a6889e1..cfd64ff02 100644 --- a/helm-toolkit/templates/manifests/_job-db-drop-mysql.tpl +++ b/helm-toolkit/templates/manifests/_job-db-drop-mysql.tpl @@ -50,11 +50,6 @@ metadata: "helm.sh/hook-delete-policy": hook-succeeded {{- if $jobAnnotations }} {{ toYaml $jobAnnotations | indent 4 }} -{{- end }} - labels: - application: {{ $serviceName }} -{{- if $jobLabels }} -{{ toYaml $jobLabels | indent 4 }} {{- end }} spec: backoffLimit: {{ $backoffLimit }} @@ -65,6 +60,9 @@ spec: metadata: labels: {{ tuple $envAll $serviceName "db-drop" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} +{{- if $jobLabels }} +{{ toYaml $jobLabels | indent 8 }} +{{- end }} spec: serviceAccountName: {{ $serviceAccountName }} restartPolicy: OnFailure diff --git a/helm-toolkit/templates/manifests/_job-db-init-mysql.tpl b/helm-toolkit/templates/manifests/_job-db-init-mysql.tpl index de798b657..d5751c829 100644 --- a/helm-toolkit/templates/manifests/_job-db-init-mysql.tpl +++ b/helm-toolkit/templates/manifests/_job-db-init-mysql.tpl @@ -49,11 +49,6 @@ metadata: "helm.sh/hook-delete-policy": before-hook-creation {{- if $jobAnnotations }} {{ toYaml $jobAnnotations | indent 4 }} -{{- end }} - labels: - application: {{ $serviceName }} -{{- if $jobLabels }} -{{ toYaml $jobLabels | indent 4 }} {{- end }} spec: backoffLimit: {{ $backoffLimit }} @@ -64,6 +59,9 @@ spec: metadata: labels: {{ tuple $envAll $serviceName "db-init" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} +{{- if $jobLabels }} +{{ toYaml $jobLabels | indent 8 }} +{{- end }} annotations: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} spec: diff --git a/helm-toolkit/templates/manifests/_job-db-sync.tpl b/helm-toolkit/templates/manifests/_job-db-sync.tpl index 76daa9f9c..8e62f4269 100644 --- a/helm-toolkit/templates/manifests/_job-db-sync.tpl +++ b/helm-toolkit/templates/manifests/_job-db-sync.tpl @@ -46,11 +46,6 @@ metadata: "helm.sh/hook-delete-policy": before-hook-creation {{- if $jobAnnotations }} {{ toYaml $jobAnnotations | indent 4 }} -{{- end }} - labels: - application: {{ $serviceName }} -{{- if $jobLabels }} -{{ toYaml $jobLabels | indent 4 }} {{- end }} spec: backoffLimit: {{ $backoffLimit }} @@ -61,6 +56,9 @@ spec: metadata: labels: {{ tuple $envAll $serviceName "db-sync" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} +{{- if $jobLabels }} +{{ toYaml $jobLabels | indent 8 }} +{{- end }} annotations: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} spec: diff --git a/helm-toolkit/templates/manifests/_job-ks-endpoints.tpl b/helm-toolkit/templates/manifests/_job-ks-endpoints.tpl index e5377b41e..c1641f4f9 100644 --- a/helm-toolkit/templates/manifests/_job-ks-endpoints.tpl +++ b/helm-toolkit/templates/manifests/_job-ks-endpoints.tpl @@ -49,11 +49,6 @@ metadata: "helm.sh/hook-delete-policy": before-hook-creation {{- if $jobAnnotations }} {{ toYaml $jobAnnotations | indent 4 }} -{{- end }} - labels: - application: {{ $serviceName }} -{{- if $jobLabels }} -{{ toYaml $jobLabels | indent 4 }} {{- end }} spec: backoffLimit: {{ $backoffLimit }} @@ -64,6 +59,9 @@ spec: metadata: labels: {{ tuple $envAll $serviceName "ks-endpoints" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} +{{- if $jobLabels }} +{{ toYaml $jobLabels | indent 8 }} +{{- end }} annotations: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} spec: diff --git a/helm-toolkit/templates/manifests/_job-ks-service.tpl b/helm-toolkit/templates/manifests/_job-ks-service.tpl index e5d4f7532..2ab5c443d 100644 --- a/helm-toolkit/templates/manifests/_job-ks-service.tpl +++ b/helm-toolkit/templates/manifests/_job-ks-service.tpl @@ -49,11 +49,6 @@ metadata: "helm.sh/hook-delete-policy": before-hook-creation {{- if $jobAnnotations }} {{ toYaml $jobAnnotations | indent 4 }} -{{- end }} - labels: - application: {{ $serviceName }} -{{- if $jobLabels }} -{{ toYaml $jobLabels | indent 4 }} {{- end }} spec: backoffLimit: {{ $backoffLimit }} @@ -64,6 +59,9 @@ spec: metadata: labels: {{ tuple $envAll $serviceName "ks-service" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} +{{- if $jobLabels }} +{{ toYaml $jobLabels | indent 8 }} +{{- end }} annotations: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} spec: diff --git a/helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl b/helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl index f38337b2a..3f089a0d6 100644 --- a/helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl +++ b/helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl @@ -49,11 +49,6 @@ metadata: "helm.sh/hook-delete-policy": before-hook-creation {{- if $jobAnnotations }} {{ toYaml $jobAnnotations | indent 4 }} -{{- end }} - labels: - application: {{ $serviceName }} -{{- if $jobLabels }} -{{ toYaml $jobLabels | indent 4 }} {{- end }} spec: backoffLimit: {{ $backoffLimit }} @@ -64,6 +59,9 @@ spec: metadata: labels: {{ tuple $envAll $serviceName "ks-user" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} +{{- if $jobLabels }} +{{ toYaml $jobLabels | indent 8 }} +{{- end }} annotations: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} spec: diff --git a/helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl b/helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl index 02727d99d..3f2eb8994 100644 --- a/helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl +++ b/helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl @@ -36,11 +36,6 @@ metadata: "helm.sh/hook-delete-policy": before-hook-creation {{- if $jobAnnotations }} {{ toYaml $jobAnnotations | indent 4 }} -{{- end }} - labels: - application: {{ $serviceName }} -{{- if $jobLabels }} -{{ toYaml $jobLabels | indent 4 }} {{- end }} spec: backoffLimit: {{ $backoffLimit }} @@ -51,6 +46,9 @@ spec: metadata: labels: {{ tuple $envAll $serviceName "rabbit-init" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} +{{- if $jobLabels }} +{{ toYaml $jobLabels | indent 8 }} +{{- end }} annotations: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} spec: diff --git a/helm-toolkit/templates/manifests/_job-s3-bucket.yaml.tpl b/helm-toolkit/templates/manifests/_job-s3-bucket.yaml.tpl index ef3dd0382..0d04e63b4 100644 --- a/helm-toolkit/templates/manifests/_job-s3-bucket.yaml.tpl +++ b/helm-toolkit/templates/manifests/_job-s3-bucket.yaml.tpl @@ -44,11 +44,6 @@ metadata: "helm.sh/hook-delete-policy": before-hook-creation {{- if $jobAnnotations }} {{ toYaml $jobAnnotations | indent 4 }} -{{- end }} - labels: - application: {{ $serviceName }} -{{- if $jobLabels }} -{{ toYaml $jobLabels | indent 4 }} {{- end }} spec: backoffLimit: {{ $backoffLimit }} @@ -59,6 +54,9 @@ spec: metadata: labels: {{ tuple $envAll $serviceName "s3-bucket" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} +{{- if $jobLabels }} +{{ toYaml $jobLabels | indent 8 }} +{{- end }} spec: serviceAccountName: {{ $serviceAccountName | quote }} restartPolicy: OnFailure diff --git a/helm-toolkit/templates/manifests/_job-s3-user.yaml.tpl b/helm-toolkit/templates/manifests/_job-s3-user.yaml.tpl index 9a8fe8581..715602bb2 100644 --- a/helm-toolkit/templates/manifests/_job-s3-user.yaml.tpl +++ b/helm-toolkit/templates/manifests/_job-s3-user.yaml.tpl @@ -43,11 +43,6 @@ metadata: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }} {{- if $jobAnnotations }} {{ toYaml $jobAnnotations | indent 4 }} -{{- end }} - labels: - application: {{ $serviceName }} -{{- if $jobLabels }} -{{ toYaml $jobLabels | indent 4 }} {{- end }} spec: backoffLimit: {{ $backoffLimit }} @@ -58,6 +53,9 @@ spec: metadata: labels: {{ tuple $envAll $serviceName "s3-user" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} +{{- if $jobLabels }} +{{ toYaml $jobLabels | indent 8 }} +{{- end }} spec: serviceAccountName: {{ $serviceAccountName | quote }} restartPolicy: OnFailure diff --git a/helm-toolkit/templates/manifests/_job_image_repo_sync.tpl b/helm-toolkit/templates/manifests/_job_image_repo_sync.tpl index 3e3facb33..2e67006b4 100644 --- a/helm-toolkit/templates/manifests/_job_image_repo_sync.tpl +++ b/helm-toolkit/templates/manifests/_job_image_repo_sync.tpl @@ -42,11 +42,6 @@ metadata: "helm.sh/hook-delete-policy": before-hook-creation {{- if $jobAnnotations }} {{ toYaml $jobAnnotations | indent 4 }} -{{- end }} - labels: - application: {{ $serviceName }} -{{- if $jobLabels }} -{{ toYaml $jobLabels | indent 4 }} {{- end }} spec: backoffLimit: {{ $backoffLimit }} @@ -57,6 +52,9 @@ spec: metadata: labels: {{ tuple $envAll $serviceName "image-repo-sync" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} +{{- if $jobLabels }} +{{ toYaml $jobLabels | indent 8 }} +{{- end }} spec: serviceAccountName: {{ $serviceAccountName }} restartPolicy: OnFailure diff --git a/releasenotes/notes/helm-toolkit.yaml b/releasenotes/notes/helm-toolkit.yaml index 243cf3eca..ab79001b9 100644 --- a/releasenotes/notes/helm-toolkit.yaml +++ b/releasenotes/notes/helm-toolkit.yaml @@ -15,4 +15,5 @@ helm-toolkit: - 0.2.6 Add metadata in job templates - 0.2.7 Replace brace expansion with more standardized Posix approach - 0.2.8 Override the expiry of Ingress TLS certificate + - 0.2.9 Jobs; put labels only in the template spec ...