2023-02-19 22:33:37 +00:00
|
|
|
{{- define "statping.prometheusrule" -}}
|
2022-11-15 00:14:12 +00:00
|
|
|
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
|
2022-11-15 11:09:44 +00:00
|
|
|
---
|
2022-11-15 00:14:12 +00:00
|
|
|
apiVersion: monitoring.coreos.com/v1
|
|
|
|
kind: PrometheusRule
|
|
|
|
metadata:
|
|
|
|
name: {{ include "tc.common.names.fullname" . }}
|
|
|
|
labels:
|
|
|
|
{{- include "tc.common.labels" . | nindent 4 }}
|
|
|
|
{{- with .Values.metrics.prometheusRule.labels }}
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
spec:
|
|
|
|
groups:
|
|
|
|
- name: {{ include "tc.common.names.fullname" . }}
|
|
|
|
rules:
|
|
|
|
{{- with .Values.metrics.prometheusRule.rules }}
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
2022-11-15 11:09:44 +00:00
|
|
|
{{- end -}}
|