Add PrometheusRule and ServiceMonitor to common (#47)

* Add PrometheusRule and ServiceMonitor to common

* Bump Kind version
This commit is contained in:
2023-03-05 08:29:38 +00:00
committed by GitHub
parent 067d636a28
commit 855c04e7f3
6 changed files with 80 additions and 2 deletions

View File

@@ -0,0 +1,19 @@
{{- define "common.prometheusRule" }}
---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels" . | nindent 4 }}
{{- with .Values.metrics.prometheusRule.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
groups:
- name: {{ include "common.names.fullname" . }}
rules:
{{- with .Values.metrics.prometheusRule.rules }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}