From dcc60a2896564248431fe41714dc20b97608b2c7 Mon Sep 17 00:00:00 2001 From: Simon Ostendorf Date: Fri, 8 Sep 2023 09:31:18 +0200 Subject: [PATCH] fix(charts/spire/spire-agent): podmonitor templating (#478) --- .../spire/charts/spire-agent/templates/podmonitor.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/spire/charts/spire-agent/templates/podmonitor.yaml b/charts/spire/charts/spire-agent/templates/podmonitor.yaml index 92fd0e3..409bfb3 100644 --- a/charts/spire/charts/spire-agent/templates/podmonitor.yaml +++ b/charts/spire/charts/spire-agent/templates/podmonitor.yaml @@ -1,13 +1,13 @@ {{- if (dig "telemetry" "prometheus" "podMonitor" "enabled" .Values.telemetry.prometheus.podMonitor.enabled .Values.global) }} -{{- $namespace := include "spiffe-oidc-discovery-provider.podMonitor.namespace" . }} -{{- $podNamespace := ( include "spiffe-oidc-discovery-provider.namespace" . ) }} +{{- $namespace := include "spire-agent.podMonitor.namespace" . }} +{{- $podNamespace := ( include "spire-agent.namespace" . ) }} apiVersion: monitoring.coreos.com/v1 kind: PodMonitor metadata: - name: {{ include "spiffe-oidc-discovery-provider.fullname" . }} + name: {{ include "spire-agent.fullname" . }} namespace: {{ $namespace }} labels: - {{- include "spiffe-oidc-discovery-provider.labels" . | nindent 4 }} + {{- include "spire-agent.labels" . | nindent 4 }} {{- if ne (len (dig "telemetry" "prometheus" "podMonitor" "labels" (dict) .Values.global)) 0 }} {{- .Values.global.telemetry.prometheus.podMonitor.labels | toYaml | nindent 4 }} {{- end }} @@ -17,7 +17,7 @@ metadata: spec: selector: matchLabels: - {{- include "spiffe-oidc-discovery-provider.selectorLabels" . | nindent 6 }} + {{- include "spire-agent.selectorLabels" . | nindent 6 }} podMetricsEndpoints: - port: prom {{- if ne $namespace $podNamespace }}