From d5398b75253f13f54da1f31e32cefeda66f5245f Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Thu, 30 May 2024 17:46:18 +0700 Subject: [PATCH] fix(chart): pod labels and annotations for patch-scaledobjects (#2274) Signed-off-by: Viet Nguyen Duc --- .../patch-keda/patch-keda-objects-job.yaml | 21 +++++++++++-------- tests/charts/ci/base-resources-values.yaml | 6 ------ 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/charts/selenium-grid/templates/patch-keda/patch-keda-objects-job.yaml b/charts/selenium-grid/templates/patch-keda/patch-keda-objects-job.yaml index 6e222652f..927377adc 100644 --- a/charts/selenium-grid/templates/patch-keda/patch-keda-objects-job.yaml +++ b/charts/selenium-grid/templates/patch-keda/patch-keda-objects-job.yaml @@ -4,19 +4,22 @@ kind: Job metadata: name: {{ template "seleniumGrid.keda.patchObjectsJob.fullname" $ }} namespace: {{ .Release.Namespace }} - annotations: - {{- with $.Values.autoscaling.patchObjectFinalizers.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - deploymentName: {{ template "seleniumGrid.keda.patchObjectsJob.fullname" $ }} + annotations: &patch_objects_job_annotations + {{- with $.Values.autoscaling.patchObjectFinalizers.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + labels: &patch_objects_job_labels + app: {{ template "seleniumGrid.keda.patchObjectsJob.fullname" $ }} + app.kubernetes.io/name: {{ template "seleniumGrid.keda.patchObjectsJob.fullname" $ }} {{- include "seleniumGrid.commonLabels" $ | nindent 4 }} - {{- with $.Values.customLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} + {{- with $.Values.customLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: template: metadata: + labels: *patch_objects_job_labels + annotations: *patch_objects_job_annotations name: {{ template "seleniumGrid.keda.patchObjectsJob.fullname" $ }} spec: activeDeadlineSeconds: {{ $.Values.autoscaling.patchObjectFinalizers.activeDeadlineSeconds }} diff --git a/tests/charts/ci/base-resources-values.yaml b/tests/charts/ci/base-resources-values.yaml index b1592bf79..fbeb383ff 100644 --- a/tests/charts/ci/base-resources-values.yaml +++ b/tests/charts/ci/base-resources-values.yaml @@ -1,7 +1,5 @@ components: router: - livenessProbe: - failureThreshold: 6 resources: requests: cpu: 100m @@ -10,8 +8,6 @@ components: cpu: 500m memory: 2500Mi distributor: - livenessProbe: - failureThreshold: 6 resources: requests: cpu: "1" @@ -45,8 +41,6 @@ components: memory: 512Mi hub: - livenessProbe: - failureThreshold: 6 resources: requests: cpu: "1"