Skip to content

Commit

Permalink
Update: monitoring mixins set to v1.12.0 for prometheus-operator-mixin (
Browse files Browse the repository at this point in the history
#936)

Signed-off-by: Nicolas Lamirault <[email protected]>
Co-authored-by: Nicolas Lamirault <[email protected]>
  • Loading branch information
github-actions[bot] and nlamirault authored Nov 23, 2024
1 parent e4e6564 commit 0c37fe4
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 9 deletions.
6 changes: 3 additions & 3 deletions charts/prometheus-operator-mixin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ keywords:
- prometheus-operator
- monitoring-mixin
- portefaix
version: 1.3.0
appVersion: 0.69.1
version: 1.4.0
appVersion: 0.78.2

maintainers:
- name: nlamirault
Expand All @@ -52,4 +52,4 @@ annotations:
url: https://keybase.io/nlamirault/pgp_keys.asc
artifacthub.io/changes: |
- kind: changed
description: prometheus-operator-mixin v0.69.1
description: prometheus-operator-mixin v0.78.2
14 changes: 13 additions & 1 deletion charts/prometheus-operator-mixin/templates/alerts.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.monitor.enabled -}}
---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
Expand All @@ -8,6 +9,7 @@ metadata:
{{- include "prometheus-operator-mixin.annotations" . | indent 4 }}
labels:
{{- include "prometheus-operator-mixin.labels" . | indent 4 }}
app.kubernetes.io/component: metrics
{{- if .Values.monitor.additionalLabels }}
{{- toYaml .Values.monitor.additionalLabels | nindent 4 }}
{{- end }}
Expand Down Expand Up @@ -45,12 +47,21 @@ spec:
- alert: PrometheusOperatorReconcileErrors
annotations:
description: '{{`{{`}} $value | humanizePercentage {{`}}`}} of reconciling operations failed for {{`{{`}} $labels.controller {{`}}`}} controller in {{`{{`}} $labels.namespace {{`}}`}} namespace.'
summary: Errors while reconciling controller.
summary: Errors while reconciling objects.
expr: |
(sum by (controller,namespace) (rate(prometheus_operator_reconcile_errors_total{job="prometheus-operator"}[5m]))) / (sum by (controller,namespace) (rate(prometheus_operator_reconcile_operations_total{job="prometheus-operator"}[5m]))) > 0.1
for: 10m
labels:
severity: warning
- alert: PrometheusOperatorStatusUpdateErrors
annotations:
description: '{{`{{`}} $value | humanizePercentage {{`}}`}} of status update operations failed for {{`{{`}} $labels.controller {{`}}`}} controller in {{`{{`}} $labels.namespace {{`}}`}} namespace.'
summary: Errors while updating objects status.
expr: |
(sum by (controller,namespace) (rate(prometheus_operator_status_update_errors_total{job="prometheus-operator"}[5m]))) / (sum by (controller,namespace) (rate(prometheus_operator_status_update_operations_total{job="prometheus-operator"}[5m]))) > 0.1
for: 10m
labels:
severity: warning
- alert: PrometheusOperatorNodeLookupErrors
annotations:
description: Errors while reconciling Prometheus in {{`{{`}} $labels.namespace {{`}}`}} Namespace.
Expand Down Expand Up @@ -91,3 +102,4 @@ spec:
for: 10m
labels:
severity: warning
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,24 +1,50 @@
---
{{ if .Values.grafanaDashboard.enabled -}}
{{- $files := .Files.Glob "dashboards/*.json" }}
{{- if $files }}
---
apiVersion: v1
kind: ConfigMapList
items:
{{- range $path, $fileContents := $files }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" | lower }}
- apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "dashboard-prometheus-operator-mixin-%s" $dashboardName | trunc 63 | trimSuffix "-" }}
namespace: {{ include "prometheus-operator-mixin.namespace" $ }}
annotations:
grafana-folder: {{ $.Values.grafana.folder }}
grafana-folder: {{ $.Values.grafanaDashboard.folder }}
{{- include "prometheus-operator-mixin.annotations" $ | indent 6 }}
labels:
grafana-dashboard: {{ $dashboardName }}
{{- include "prometheus-operator-mixin.labels" $ | indent 6 }}
app.kubernetes.io/component: dashboard
name: {{ printf "dashboard-%s" $dashboardName | trunc 63 | trimSuffix "-" }}
namespace: {{ include "prometheus-operator-mixin.namespace" $ }}
data:
{{ $dashboardName }}.json: |-
{{ $.Files.Get $path | indent 6}}
{{- end }}
{{ if $.Values.grafanaDashboard.grafanaOperator.enabled -}}
{{- range $path, $fileContents := $files }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }}
---
apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDashboard
metadata:
labels:
{{- include "prometheus-operator-mixin.labels" $ | indent 4 }}
app.kubernetes.io/component: dashboard
name: {{ printf "%s" $dashboardName | trunc 63 | trimSuffix "-" | lower }}
namespace: {{ $.Release.Namespace }}
spec:
allowCrossNamespaceImport: {{ $.Values.grafanaDashboard.grafanaOperator.allowCrossNamespaceImport }}
folder: {{ $.Values.grafanaDashboard.folder }}
instanceSelector:
matchLabels:
{{- toYaml $.Values.grafanaDashboard.grafanaOperator.matchLabels | nindent 6 }}
configMapRef:
name: {{ printf "dashboard-%s" $dashboardName | trunc 63 | trimSuffix "-" }}
key: {{ $dashboardName }}.json
{{- end }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit 0c37fe4

Please sign in to comment.