From 0c1cd90e4e8a61e2489669a02ed9ab032a593478 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Thu, 2 Nov 2023 12:45:50 +0100 Subject: [PATCH] Added namespace selector --- helm/template/Chart.yaml | 6 +++--- helm/template/templates/_podmonitor.yaml | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/helm/template/Chart.yaml b/helm/template/Chart.yaml index e55b70d..4346e54 100644 --- a/helm/template/Chart.yaml +++ b/helm/template/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: template description: A Helm library chart containing common templates, keeping application templates short type: library -version: 0.1.24 +version: 0.1.25 maintainers: - name: Jim Martens url: https://2martens.de @@ -10,8 +10,8 @@ sources: - https://git.2martens.de/2martens/cloud-configuration annotations: artifacthub.io/changes: | - - kind: fixed - description: Fixed selector for pod monitor + - kind: added + description: Added namespace selector artifacthub.io/signKey: | fingerprint: F0F153B65BAD467201D7544E47393ABD1F96B7C8 url: https://mafiasi.de/pks/key/47393ABD1F96B7C8.asc diff --git a/helm/template/templates/_podmonitor.yaml b/helm/template/templates/_podmonitor.yaml index 075d582..78e47d7 100644 --- a/helm/template/templates/_podmonitor.yaml +++ b/helm/template/templates/_podmonitor.yaml @@ -12,6 +12,9 @@ spec: podMetricsEndpoints: - port: "{{ .Values.application.actuatorPort }}" path: /actuator/prometheus + namespaceSelector: + matchNames: + - "{{ .Release.Namespace }}" selector: matchLabels: {{- include "template.selectorLabels" . | nindent 6 }}