From b85760ebc59a5cfe572387a98ff48e28321352a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cayeshasiddiqa161=E2=80=9D?= Date: Wed, 9 Aug 2023 12:10:49 +0500 Subject: [PATCH 1/3] matchlabel fixed --- application/templates/servicemonitor.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/templates/servicemonitor.yaml b/application/templates/servicemonitor.yaml index d7972ed5..fd2a39da 100644 --- a/application/templates/servicemonitor.yaml +++ b/application/templates/servicemonitor.yaml @@ -18,7 +18,7 @@ metadata: spec: selector: matchLabels: - app: {{ template "application.name" . }} + app.kubernetes.io/part-of: {{ include "application.name" . }} namespaceSelector: matchNames: - {{ .Release.Namespace }} From 11e9f01e65c83a779473a36bb49b28bcea8aad1d Mon Sep 17 00:00:00 2001 From: Ayesha Siddiqa <58335244+ayeshasiddiqa161@users.noreply.github.com> Date: Wed, 9 Aug 2023 12:39:28 +0500 Subject: [PATCH 2/3] Update servicemonitor.yaml --- application/templates/servicemonitor.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/templates/servicemonitor.yaml b/application/templates/servicemonitor.yaml index fd2a39da..5ebd5275 100644 --- a/application/templates/servicemonitor.yaml +++ b/application/templates/servicemonitor.yaml @@ -18,10 +18,10 @@ metadata: spec: selector: matchLabels: - app.kubernetes.io/part-of: {{ include "application.name" . }} +{{ include "application.selectorLabels" . | indent 6 }} namespaceSelector: matchNames: - {{ .Release.Namespace }} endpoints: {{ toYaml .Values.serviceMonitor.endpoints | indent 4 }} -{{- end }} \ No newline at end of file +{{- end }} From 5a29809e95f399a0e5a5a4e6312ecee006ba6a5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cayeshasiddiqa161=E2=80=9D?= Date: Wed, 9 Aug 2023 13:39:02 +0500 Subject: [PATCH 3/3] added --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9abb85d..35eb86a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ All notable changes to this project will be documented here. +### v2.1.20 +- fix: Matchlabel fixed for service monitor [PR-267](https://github.com/stakater/application/pull/267) + ### v2.1.19 - Fix: Reverts [PR-240](https://github.com/stakater/application/pull/240), It can already be configured via `paths` [PR-247](https://github.com/stakater/application/pull/247)