From ec89bcafb35e98d3dfe85b2b5750c429ea9c6417 Mon Sep 17 00:00:00 2001 From: dellnoantechnp Date: Tue, 12 Mar 2024 17:08:56 +0800 Subject: [PATCH] bugfix: Update PrometheusAlert version 1.2.2 Update AlertmanagerConfig namespace setting --- charts/prometheusalert/Chart.yaml | 2 +- .../templates/AlertmanagerConfig.yaml | 3 ++ charts/prometheusalert/values.yaml | 30 ++++++++++++++++--- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/charts/prometheusalert/Chart.yaml b/charts/prometheusalert/Chart.yaml index c3a3bfa..78d8c95 100644 --- a/charts/prometheusalert/Chart.yaml +++ b/charts/prometheusalert/Chart.yaml @@ -18,4 +18,4 @@ maintainers: sources: - https://github.com/feiyu563/PrometheusAlert type: application -version: 1.2.1 \ No newline at end of file +version: 1.2.2 \ No newline at end of file diff --git a/charts/prometheusalert/templates/AlertmanagerConfig.yaml b/charts/prometheusalert/templates/AlertmanagerConfig.yaml index daccb1c..dd24790 100644 --- a/charts/prometheusalert/templates/AlertmanagerConfig.yaml +++ b/charts/prometheusalert/templates/AlertmanagerConfig.yaml @@ -10,6 +10,9 @@ metadata: {{- if .labels }} {{ .labels | toYaml }} {{- end }} + {{- if .namespace }} + namespace: {{ .namespace }} + {{- end }} spec: {{- if .inhibitRules }} inhibitRules: diff --git a/charts/prometheusalert/values.yaml b/charts/prometheusalert/values.yaml index 21cba45..6fb4686 100644 --- a/charts/prometheusalert/values.yaml +++ b/charts/prometheusalert/values.yaml @@ -62,7 +62,7 @@ AlertmanagerConfig: ## @param namespace, if you Crd Alertmanager has alertmanagerConfigNamespaceSelector, you need to set correct namespace. ## if you don't set alertmanagerConfigNamespaceSelector, you need to set prometheus-operator same namespace. - namespace: {} + namespace: "" ## @param labels, if you Crd Alertmanager has alertmanagerConfigSelector, you need to set this. labels: {} @@ -91,6 +91,28 @@ AlertmanagerConfig: ## Prometheus Ref: https://prometheus.io/docs/alerting/latest/configuration/#time_interval ## Crd Doc Ref: https://doc.crds.dev/github.com/prometheus-operator/kube-prometheus/monitoring.coreos.com/AlertmanagerConfig/v1alpha1@v0.13.0 ## Example: + ## - name: working + ## timeIntervals: + ## - weekdays: + ## - "monday:friday" + ## times: + ## - startTime: "09:00" + ## endTime: "19:00" + ## - name: after_work + ## timeIntervals: + ## - weekdays: + ## - "monday:friday" + ## times: + ## - startTime: "19:00" + ## endTime: "24:00" + ## - weekdays: + ## - "monday:friday" + ## times: + ## - startTime: "00:00" + ## endTime: "09:00" + ## - weekdays: + ## - "saturday" + ## - "sunday" ## - name: holidays ## timeIntervals: ## - daysOfMonth: @@ -153,10 +175,10 @@ AlertmanagerConfig: ## match: ## severity: warning ## activeTimeIntervals: - ## - holidays + ## - working ## muteTimeIntervals: - ## - holidays - route: [] + ## - after_work + route: {} config: app_conf: |