From 95c218b218ab4ca0c96dc75e6d3badc3f6e6a29a Mon Sep 17 00:00:00 2001 From: "edward.zeng" Date: Fri, 21 Oct 2022 10:15:16 +0800 Subject: [PATCH] Fix PodMonitor name conflicts for multiple releases in same namespace (#258) * Fix PodMonitor name conflicts for multiple releases in same namespace Signed-off-by: Edward Zeng * Use pulsar.fullname for PodMonitor name prefix Signed-off-by: Edward Zeng Co-authored-by: Michael Marshall Signed-off-by: Edward Zeng Fixes #257 ### Motivation Fix PodMonitor name conflicts for multiple releases in same namespace ### Modifications Use release name instead of hardcode `pulsar.name` for pod monitor name. ### Verifying this change - [x] Make sure that the change passes the CI checks. --- charts/pulsar/templates/bookkeeper-podmonitor.yaml | 4 ++-- charts/pulsar/templates/broker-podmonitor.yaml | 4 ++-- charts/pulsar/templates/proxy-podmonitor.yaml | 4 ++-- charts/pulsar/templates/zookeeper-podmonitor.yaml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/charts/pulsar/templates/bookkeeper-podmonitor.yaml b/charts/pulsar/templates/bookkeeper-podmonitor.yaml index c30ab1d..a85441b 100644 --- a/charts/pulsar/templates/bookkeeper-podmonitor.yaml +++ b/charts/pulsar/templates/bookkeeper-podmonitor.yaml @@ -22,7 +22,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PodMonitor metadata: - name: {{ template "pulsar.name" . }}-bookie + name: {{ template "pulsar.fullname" . }}-bookie labels: app: {{ template "pulsar.name" . }} chart: {{ template "pulsar.chart" . }} @@ -52,4 +52,4 @@ spec: matchLabels: {{- include "pulsar.matchLabels" . | nindent 6 }} component: bookie -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/pulsar/templates/broker-podmonitor.yaml b/charts/pulsar/templates/broker-podmonitor.yaml index e2b6b8f..9ea0c4c 100644 --- a/charts/pulsar/templates/broker-podmonitor.yaml +++ b/charts/pulsar/templates/broker-podmonitor.yaml @@ -22,7 +22,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PodMonitor metadata: - name: {{ template "pulsar.name" . }}-broker + name: {{ template "pulsar.fullname" . }}-broker labels: app: {{ template "pulsar.name" . }} chart: {{ template "pulsar.chart" . }} @@ -52,4 +52,4 @@ spec: matchLabels: {{- include "pulsar.matchLabels" . | nindent 6 }} component: broker -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/pulsar/templates/proxy-podmonitor.yaml b/charts/pulsar/templates/proxy-podmonitor.yaml index 7f61522..66020dc 100644 --- a/charts/pulsar/templates/proxy-podmonitor.yaml +++ b/charts/pulsar/templates/proxy-podmonitor.yaml @@ -22,7 +22,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PodMonitor metadata: - name: {{ template "pulsar.name" . }}-proxy + name: {{ template "pulsar.fullname" . }}-proxy labels: app: {{ template "pulsar.name" . }} chart: {{ template "pulsar.chart" . }} @@ -52,4 +52,4 @@ spec: matchLabels: {{- include "pulsar.matchLabels" . | nindent 6 }} component: proxy -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/pulsar/templates/zookeeper-podmonitor.yaml b/charts/pulsar/templates/zookeeper-podmonitor.yaml index dda06d9..8da13eb 100644 --- a/charts/pulsar/templates/zookeeper-podmonitor.yaml +++ b/charts/pulsar/templates/zookeeper-podmonitor.yaml @@ -22,7 +22,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PodMonitor metadata: - name: {{ template "pulsar.name" . }}-zookeeper + name: {{ template "pulsar.fullname" . }}-zookeeper labels: app: {{ template "pulsar.name" . }} chart: {{ template "pulsar.chart" . }} @@ -52,4 +52,4 @@ spec: matchLabels: {{- include "pulsar.matchLabels" . | nindent 6 }} component: zookeeper -{{- end }} \ No newline at end of file +{{- end }}