Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
fix(charts/spire/spire-agent): podmonitor templating (#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonostendorf committed Sep 8, 2023
1 parent 48adb88 commit dcc60a2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions charts/spire/charts/spire-agent/templates/podmonitor.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
Expand All @@ -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 }}
Expand Down

0 comments on commit dcc60a2

Please sign in to comment.