From 9f2697c2f2fbd4120bd72ec86970f9494c0b5e54 Mon Sep 17 00:00:00 2001 From: Aron Kaufmann Date: Thu, 6 Jun 2024 16:48:20 +0200 Subject: [PATCH] * added servicemonitor only including 1 service * addded service-name labels to default services --- apigateway/helm/templates/service.yaml | 3 +++ apigateway/helm/templates/servicemonitor.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apigateway/helm/templates/service.yaml b/apigateway/helm/templates/service.yaml index 7dd1235..ab8184e 100644 --- a/apigateway/helm/templates/service.yaml +++ b/apigateway/helm/templates/service.yaml @@ -26,6 +26,7 @@ metadata: {{- with .Values.extraLabels -}} {{ toYaml . | nindent 4 }} {{- end }} + service-name: {{ include "common.names.fullname" . }}-rt spec: type: {{ .Values.service.type }} ports: @@ -48,6 +49,7 @@ metadata: {{- with .Values.extraLabels -}} {{ toYaml . | nindent 4 }} {{- end }} + service-name: {{ include "common.names.fullname" . }}-admin spec: type: {{ .Values.service.type }} ports: @@ -70,6 +72,7 @@ metadata: {{- with .Values.extraLabels -}} {{ toYaml . | nindent 4 }} {{- end }} + service-name: {{ include "common.names.fullname" . }}-ui spec: type: {{ .Values.service.type }} sessionAffinity: ClientIP diff --git a/apigateway/helm/templates/servicemonitor.yaml b/apigateway/helm/templates/servicemonitor.yaml index 7dacbe9..8b5192f 100644 --- a/apigateway/helm/templates/servicemonitor.yaml +++ b/apigateway/helm/templates/servicemonitor.yaml @@ -42,5 +42,5 @@ spec: selector: matchLabels: app.kubernetes.io/instance: {{ .Release.Name }} - name: {{ include "apigateway.monitorServiceName" . }} + service-name: {{ include "apigateway.monitorServiceName" . }} {{- end }} \ No newline at end of file