From b44fa585fc1f81658e71c86af5a1bddd0fb11354 Mon Sep 17 00:00:00 2001 From: Ilya Kheifets Date: Tue, 10 Dec 2024 09:41:32 +0100 Subject: [PATCH] fix: use generic labels Signed-off-by: Ilya Kheifets --- .../splunk-connect-for-snmp/templates/worker/_helpers.tpl | 5 +++++ .../templates/worker/flower/deployment.yaml | 8 +++++--- .../templates/worker/flower/service.yaml | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/charts/splunk-connect-for-snmp/templates/worker/_helpers.tpl b/charts/splunk-connect-for-snmp/templates/worker/_helpers.tpl index 7e3e6647e..a8cb53025 100644 --- a/charts/splunk-connect-for-snmp/templates/worker/_helpers.tpl +++ b/charts/splunk-connect-for-snmp/templates/worker/_helpers.tpl @@ -78,6 +78,11 @@ Common labels {{ include "splunk-connect-for-snmp.labels" . }} {{- end }} +{{- define "splunk-connect-for-snmp.worker.flower.labels" -}} +{{ include "splunk-connect-for-snmp.worker.flower.selectorLabels" . }} +{{ include "splunk-connect-for-snmp.labels" . }} +{{- end }} + {{- define "environmental-variables" -}} - name: CONFIG_PATH value: /app/config/config.yaml diff --git a/charts/splunk-connect-for-snmp/templates/worker/flower/deployment.yaml b/charts/splunk-connect-for-snmp/templates/worker/flower/deployment.yaml index cd66c3d9d..3c023b2e1 100644 --- a/charts/splunk-connect-for-snmp/templates/worker/flower/deployment.yaml +++ b/charts/splunk-connect-for-snmp/templates/worker/flower/deployment.yaml @@ -2,17 +2,19 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: flower + name: {{ include "splunk-connect-for-snmp.worker.fullname" . }}-flower + labels: + {{- include "splunk-connect-for-snmp.worker.flower.labels" . | nindent 4 }} spec: replicas: 1 selector: matchLabels: - app: flower + {{- include "splunk-connect-for-snmp.worker.flower.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: flower + {{- include "splunk-connect-for-snmp.worker.flower.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: diff --git a/charts/splunk-connect-for-snmp/templates/worker/flower/service.yaml b/charts/splunk-connect-for-snmp/templates/worker/flower/service.yaml index ae92c45f3..af954989c 100644 --- a/charts/splunk-connect-for-snmp/templates/worker/flower/service.yaml +++ b/charts/splunk-connect-for-snmp/templates/worker/flower/service.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: - name: flower-svc + name: {{ include "splunk-connect-for-snmp.worker.fullname" . }}-flower-svc spec: selector: