helm-charts/monitoring/templates/probe.yaml

41 lines
979 B
YAML
Raw Permalink Normal View History

{{- range $prober := $.Values.prober }}
{{- range $probe := $.Values.probes }}
{{- range $groupName, $group := $probe.groups }}
{{- $proto := "ipv4" }}
{{- range $proto := (list "ipv4" "ipv6") }}
{{- if and
(or
(not (hasKey $probe $proto))
(get $probe $proto)
)
(or
(not (hasKey $prober $proto))
(get $prober $proto)
) }}
---
apiVersion: monitoring.coreos.com/v1
kind: Probe
metadata:
name: {{ $probe.name }}-{{ $groupName }}-{{ $proto }}-{{ $prober.name }}
labels:
{{- toYaml $.Values.prometheus.probe.labels | nindent 4 }}
spec:
prober:
{{- toYaml $prober.spec | nindent 4}}
module: "{{ $probe.module }}_{{ $proto }}"
targets:
staticConfig:
labels:
2024-02-08 00:00:29 +01:00
prober: {{ $prober.name }}
group: {{ $groupName }}
2024-02-08 00:00:29 +01:00
proto: {{ $proto }}
module: {{ $probe.module }}
probe: {{ $probe.name }}
static:
{{- toYaml $group | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}