Files
helm-charts-hardened/charts/spire-ha-agent/templates/podmonitor.yaml
T
kfox1111andFaisal Memon 90e3518dca Update spire-ha-agent (#936)
* Update spire-ha-agent

Signed-off-by: Kevin Fox <[email protected]>

* Update spire-ha-agent

Signed-off-by: Kevin Fox <[email protected]>

* Update with new features

Signed-off-by: Kevin Fox <[email protected]>

* Updates

Signed-off-by: Kevin Fox <[email protected]>

* Point at release

Signed-off-by: Kevin Fox <[email protected]>

* Fix version

Signed-off-by: Kevin Fox <[email protected]>

---------

Signed-off-by: Kevin Fox <[email protected]>
Co-authored-by: Faisal Memon <[email protected]>
2026-09-04 20:34:10 +00:00

28 lines
1.1 KiB
YAML

{{- if (dig "telemetry" "prometheus" "podMonitor" "enabled" .Values.telemetry.prometheus.podMonitor.enabled .Values.global) }}
{{- $namespace := include "spire-ha-agent.podMonitor.namespace" . }}
{{- $podNamespace := ( include "spire-ha-agent.namespace" . ) }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ include "spire-ha-agent.fullname" . }}
namespace: {{ $namespace | quote }}
labels:
{{- include "spire-ha-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 }}
{{- with .Values.telemetry.prometheus.podMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
{{- include "spire-ha-agent.selectorLabels" . | nindent 6 }}
podMetricsEndpoints:
- port: prom
{{- if ne $namespace $podNamespace }}
namespaceSelector:
kubernetes.io/metadata.name: {{ $podNamespace | quote }}
{{- end }}
{{- end }}