mirror of
https://github.com/nikdoof/helm-charts.git
synced 2025-12-23 22:59:29 +00:00
Add PrometheusRule and ServiceMonitor to common (#47)
* Add PrometheusRule and ServiceMonitor to common * Bump Kind version
This commit is contained in:
19
charts/common/templates/_prometheusrule.tpl
Normal file
19
charts/common/templates/_prometheusrule.tpl
Normal 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 }}
|
||||
Reference in New Issue
Block a user