1 # Generated from 'prometheus-operator' group from https://raw.githubusercontent.com/coreos/prometheus-operator/master/contrib/kube-prometheus/manifests/prometheus-rules.yaml
2 {{- if and .Values.defaultRules.create }}
3 {{- $operatorJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "operator" }}
4 apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }}
7 name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus-operator" | trunc 63 | trimSuffix "-" }}
9 app: {{ template "prometheus-operator.name" . }}
10 {{ include "prometheus-operator.labels" . | indent 4 }}
11 {{- if .Values.defaultRules.labels }}
12 {{ toYaml .Values.defaultRules.labels | indent 4 }}
14 {{- if .Values.defaultRules.annotations }}
16 {{ toYaml .Values.defaultRules.annotations | indent 4 }}
20 - name: prometheus-operator
22 - alert: PrometheusOperatorReconcileErrors
24 message: Errors while reconciling {{`{{ $labels.controller }}`}} in {{`{{ $labels.namespace }}`}} Namespace.
25 expr: rate(prometheus_operator_reconcile_errors_total{job="{{ $operatorJob }}"}[5m]) > 0.1
29 - alert: PrometheusOperatorNodeLookupErrors
31 message: Errors while reconciling Prometheus in {{`{{ $labels.namespace }}`}} Namespace.
32 expr: rate(prometheus_operator_node_address_lookup_errors_total{job="{{ $operatorJob }}"}[5m]) > 0.1