Skip to content

Commit 7badab0

Browse files
stable/prometheus-cloudwatch-exporter Add prometheusRule creation. (helm#21838)
* Add prometheusRule to prometheus-cloudwatch-exporter. Signed-off-by: Danylo Hetmantsev <[email protected]> * Bump chart version. Signed-off-by: Danylo Hetmantsev <[email protected]> * Update docs. Signed-off-by: Danylo Hetmantsev <[email protected]> * Bump version. Signed-off-by: Danylo Hetmantsev <[email protected]> * Change changelog. Signed-off-by: Danylo Hetmantsev <[email protected]> * Add empty line. Signed-off-by: Danylo Hetmantsev <[email protected]> * Remove empty line in changelog. Signed-off-by: Danylo Hetmantsev <[email protected]>
1 parent fbdaa84 commit 7badab0

File tree

5 files changed

+63
-3
lines changed

5 files changed

+63
-3
lines changed

stable/prometheus-cloudwatch-exporter/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ numbering uses [semantic versioning](http://semver.org).
77

88
NOTE: The change log until version 0.4.10 is auto generated based on git commits. Those include a reference to the git commit to be able to get more details.
99

10+
## 0.7.0
11+
12+
PrometheusRule support added to chart.
13+
14+
Updated cloudwatch-exporter version to [0.8.0](https://github.com/prometheus/cloudwatch_exporter/releases/tag/cloudwatch_exporter-0.8.0)
15+
1016
## 0.5.0
1117

1218
Update Ingress and Deployment apiVersions for k8s 1.16 support

stable/prometheus-cloudwatch-exporter/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v1
2-
appVersion: "0.6.0"
2+
appVersion: "0.8.0"
33
description: A Helm chart for prometheus cloudwatch-exporter
44
name: prometheus-cloudwatch-exporter
5-
version: 0.6.0
5+
version: 0.7.0
66
home: https://github.com/prometheus/cloudwatch_exporter
77
sources:
88
- https://github.com/prometheus/cloudwatch_exporter

stable/prometheus-cloudwatch-exporter/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ The following table lists the configurable parameters of the Cloudwatch Exporter
8484
| `serviceMonitor.timeout` | Timeout after which the scrape is ended | |
8585
| `serviceMonitor.relabelings` | RelabelConfigs to apply to samples before scraping. | |
8686
| `serviceMonitor.metricRelabelings`| MetricRelabelConfigs to apply to samples before ingestion. | |
87+
| `prometheusRule.enabled` | Namespace thes PrometheusRule is installed in | `false` |
88+
| `prometheusRule.namespace` | Use PrometheusRule from prometheus operator | |
89+
| `prometheusRule.labels` | labels for the prometheusRule passed to Prometheus Operator | |
90+
| `prometheusRule.rules` | Specify alerting rules in YAML format for PrometheusRule | |
8791
| `ingress.enabled` | Enables Ingress | `false` |
8892
| `ingress.annotations` | Ingress annotations | `{}` |
8993
| `ingress.labels` | Custom labels | `{}` |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.prometheusRule.enabled ) }}
2+
{{- $fullName := include "prometheus-cloudwatch-exporter.fullname" . -}}
3+
apiVersion: monitoring.coreos.com/v1
4+
kind: PrometheusRule
5+
metadata:
6+
{{- if .Values.prometheusRule.labels }}
7+
labels:
8+
{{ toYaml .Values.prometheusRule.labels | indent 4}}
9+
{{- end }}
10+
name: {{ $fullName }}
11+
{{- if .Values.prometheusRule.namespace }}
12+
namespace: {{ .Values.prometheusRule.namespace }}
13+
{{- end }}
14+
spec:
15+
groups:
16+
- name: {{ $fullName }}
17+
rules:
18+
{{- toYaml .Values.prometheusRule.rules | nindent 6 }}
19+
{{- end }}

stable/prometheus-cloudwatch-exporter/values.yaml

+32-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ replicaCount: 1
66

77
image:
88
repository: prom/cloudwatch-exporter
9-
tag: cloudwatch_exporter-0.6.0
9+
tag: cloudwatch_exporter-0.8.0
1010
pullPolicy: IfNotPresent
1111

1212
# Example proxy configuration:
@@ -151,6 +151,37 @@ serviceMonitor:
151151
# replacement: mydbname
152152
# targetLabel: dbname
153153

154+
prometheusRule:
155+
# Specifies whether a PrometheusRule should be created
156+
enabled: false
157+
# Set the namespace the PrometheusRule should be deployed
158+
# namespace: monitoring
159+
# Set labels for the PrometheusRule, use this to define your scrape label for Prometheus Operator
160+
# labels:
161+
# Example - note the Kubernetes convention of camelCase instead of Prometheus'
162+
# rules:
163+
# - alert: ELB-Low-BurstBalance
164+
# annotations:
165+
# message: The ELB BurstBalance during the last 10 minutes is lower than 80%.
166+
# expr: aws_ebs_burst_balance_average < 80
167+
# for: 10m
168+
# labels:
169+
# severity: warning
170+
# - alert: ELB-Low-BurstBalance
171+
# annotations:
172+
# message: The ELB BurstBalance during the last 10 minutes is lower than 50%.
173+
# expr: aws_ebs_burst_balance_average < 50
174+
# for: 10m
175+
# labels:
176+
# severity: warning
177+
# - alert: ELB-Low-BurstBalance
178+
# annotations:
179+
# message: The ELB BurstBalance during the last 10 minutes is lower than 30%.
180+
# expr: aws_ebs_burst_balance_average < 30
181+
# for: 10m
182+
# labels:
183+
# severity: critical
184+
154185
ingress:
155186
enabled: false
156187
annotations: {}

0 commit comments

Comments
 (0)