From a3bc834a1b3180917ea7827121842792e8684282 Mon Sep 17 00:00:00 2001 From: Scott Trent Date: Fri, 22 Mar 2024 16:48:37 +0900 Subject: [PATCH] consolidate labels as needed Signed-off-by: Scott Trent --- config/servicemonitor/susql-smon.yaml | 2 +- deployment/susql-controller/templates/deployment.yaml | 4 ++-- deployment/susql-controller/templates/service.yaml | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config/servicemonitor/susql-smon.yaml b/config/servicemonitor/susql-smon.yaml index 9f36c05..ff60f9e 100644 --- a/config/servicemonitor/susql-smon.yaml +++ b/config/servicemonitor/susql-smon.yaml @@ -22,4 +22,4 @@ spec: jobLabel: app.kubernetes.io/name selector: matchLabels: - sustainable-computing.io/app: susql \ No newline at end of file + sustainable-computing.io/app: susql-controller diff --git a/deployment/susql-controller/templates/deployment.yaml b/deployment/susql-controller/templates/deployment.yaml index cc059b3..f026d2c 100644 --- a/deployment/susql-controller/templates/deployment.yaml +++ b/deployment/susql-controller/templates/deployment.yaml @@ -7,13 +7,13 @@ spec: replicas: 1 selector: matchLabels: - deployment.apps: {{ .Values.name }} + sustainable-computing.io/app: {{ .Values.name }} template: metadata: name: {{ .Values.name }} namespace: {{ .Values.namespace }} labels: - deployment.apps: {{ .Values.name }} + sustainable-computing.io/app: {{ .Values.name }} spec: automountServiceAccountToken: true serviceAccount: {{ .Values.name }} diff --git a/deployment/susql-controller/templates/service.yaml b/deployment/susql-controller/templates/service.yaml index 8123809..0d1fe55 100644 --- a/deployment/susql-controller/templates/service.yaml +++ b/deployment/susql-controller/templates/service.yaml @@ -4,10 +4,12 @@ kind: Service metadata: name: {{ required "Please specify a 'name' in the user file" .Values.name }} namespace: {{ required "Please specify a 'namespace' in the user file" .Values.namespace }} + labels: + sustainable-computing.io/app: {{ .Values.name }} spec: type: ClusterIP selector: - deployment.apps: susql-controller + sustainable-computing.io/app: {{ .Values.name }} ports: - name: metrics port: 8082