{{- $values := .Values -}}
{{- if $values.snmp_exporter.alerts.enabled }}
{{- range $path, $bytes := .Files.Glob "alerts/*.alerts" }}
---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule

metadata:
  name: {{ printf "snmp-ntp-exporter-%s" $path | replace "/" "-" }}
  labels:
    app: snmp-ntp-exporter
    prometheus: {{ required ".Values.snmp_exporter.alerts.prometheus missing" $values.snmp_exporter.alerts.prometheus }}

spec:
{{ printf "%s" $bytes | indent 2 }}

{{- end }}
{{- end }}
{{- $values := .Values -}}
{{- if $values.snmp_exporter.alerts.enabled }}
{{- range $path, $bytes := .Files.Glob "alerts/*.alerts" }}
---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule

metadata:
  name: {{ printf "snmp-ntp-exporter-%s" $path | replace "/" "-" }}
  labels:
    app: snmp-ntp-exporter
    prometheus: {{ required ".Values.snmp_exporter.alerts.prometheus missing" $values.snmp_exporter.alerts.prometheus }}
    absent-metrics-operator/disable: "true"
    
spec:
{{ printf "%s" $bytes | indent 2 }}

{{- end }}
{{- end }}
Remove absent metrics for snmp-ntp-exporter
Remove absent metrics for snmp-ntp-exporter
