From 91f87c21dca874b08a7e3d3dcbd874cdeec3e538 Mon Sep 17 00:00:00 2001 From: Evgeny L Date: Mon, 28 Oct 2019 19:57:08 +0000 Subject: [PATCH] Add missing pod labels for CronJobs Pods for some of the CronJobs do not have correct application and component labels applied, they are unable to start if Network Policies are enabled. Change-Id: Ie4eed0e9829419b4b2e40e9b712b73a86d6fc3d2 --- aodh/templates/cron-job-alarms-cleaner.yaml | 3 +++ keystone/templates/cron-job-credential-rotate.yaml | 3 +++ keystone/templates/cron-job-fernet-rotate.yaml | 3 +++ panko/templates/cron-job-events-cleaner.yaml | 3 +++ 4 files changed, 12 insertions(+) diff --git a/aodh/templates/cron-job-alarms-cleaner.yaml b/aodh/templates/cron-job-alarms-cleaner.yaml index dc805b9753..ae39e7a149 100644 --- a/aodh/templates/cron-job-alarms-cleaner.yaml +++ b/aodh/templates/cron-job-alarms-cleaner.yaml @@ -40,6 +40,9 @@ spec: {{ tuple $envAll "aodh" "alarms-cleaner" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} spec: template: + metadata: + labels: +{{ tuple $envAll "aodh" "alarms-cleaner" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 12 }} spec: serviceAccountName: {{ $serviceAccountName }} restartPolicy: OnFailure diff --git a/keystone/templates/cron-job-credential-rotate.yaml b/keystone/templates/cron-job-credential-rotate.yaml index d639867032..46fa731842 100644 --- a/keystone/templates/cron-job-credential-rotate.yaml +++ b/keystone/templates/cron-job-credential-rotate.yaml @@ -68,6 +68,9 @@ spec: {{ tuple $envAll "keystone" "credential-rotate" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} spec: template: + metadata: + labels: +{{ tuple $envAll "keystone" "credential-rotate" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 12 }} spec: serviceAccountName: {{ $serviceAccountName }} initContainers: diff --git a/keystone/templates/cron-job-fernet-rotate.yaml b/keystone/templates/cron-job-fernet-rotate.yaml index a3fe7edd9d..957416c538 100644 --- a/keystone/templates/cron-job-fernet-rotate.yaml +++ b/keystone/templates/cron-job-fernet-rotate.yaml @@ -69,6 +69,9 @@ spec: {{ tuple $envAll "keystone" "fernet-rotate" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} spec: template: + metadata: + labels: +{{ tuple $envAll "keystone" "fernet-rotate" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 12 }} spec: serviceAccountName: {{ $serviceAccountName }} initContainers: diff --git a/panko/templates/cron-job-events-cleaner.yaml b/panko/templates/cron-job-events-cleaner.yaml index a4042424b5..dd9526f980 100644 --- a/panko/templates/cron-job-events-cleaner.yaml +++ b/panko/templates/cron-job-events-cleaner.yaml @@ -40,6 +40,9 @@ spec: {{ tuple $envAll "panko" "events-cleaner" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} spec: template: + metadata: + labels: +{{ tuple $envAll "panko" "events-cleaner" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 12 }} spec: serviceAccountName: {{ $serviceAccountName }} restartPolicy: OnFailure