Skip to content

Commit

Permalink
add composer PrometheusRule
Browse files Browse the repository at this point in the history
  • Loading branch information
quasystaty1 committed Oct 24, 2024
1 parent de8c554 commit 3907f7b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions charts/composer/templates/prometheusrule.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{- if .Values.alerting.enabled -}}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ template "composer.appName" . }}
{{- if .Values.alerting.prometheusRule.namespace }}
namespace: {{ .Values.alerting.prometheusRule.namespace | quote }}
{{- end }}
labels:
{{- include "composer.labels" . | nindent 4 }}
{{- if .Values.alerting.prometheusRule.additionalLabels }}
{{- toYaml .Values.alerting.prometheusRule.additionalLabels | nindent 4 }}
{{- end }}
spec:
{{- if .Values.alerting.prometheusRule.rules }}
groups:
- name: {{ template "composer.appName" . }}
rules: {{- toYaml .Values.alerting.prometheusRule.rules | nindent 4 }}
{{- end }}
{{- end }}

0 comments on commit 3907f7b

Please sign in to comment.