Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/prometheus-cloudwatch-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "0.16.0"
description: A Helm chart for prometheus cloudwatch-exporter
name: prometheus-cloudwatch-exporter
version: 0.28.1
version: 0.28.2
home: https://github.com/prometheus/cloudwatch_exporter
sources:
- https://github.com/prometheus/cloudwatch_exporter
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
commonLabels:
team: observability
owner: platform

serviceMonitor:
enabled: true

prometheusRule:
enabled: true
rules:
- alert: CloudwatchExporterSample
expr: up == 0
for: 5m
labels:
severity: warning
annotations:
summary: sample
13 changes: 13 additions & 0 deletions charts/prometheus-cloudwatch-exporter/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ Create chart name and version as used by the chart label.
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Common labels
*/}}
{{- define "prometheus-cloudwatch-exporter.labels" -}}
app: {{ template "prometheus-cloudwatch-exporter.name" . }}
chart: {{ template "prometheus-cloudwatch-exporter.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.commonLabels }}
{{ toYaml . }}
{{- end }}
{{- end -}}

{{/*
Create serviceAccountName for deployment.
*/}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ kind: ClusterRole
metadata:
name: {{ template "prometheus-cloudwatch-exporter.fullname" . }}
labels:
app: {{ template "prometheus-cloudwatch-exporter.name" . }}
chart: {{ template "prometheus-cloudwatch-exporter.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "prometheus-cloudwatch-exporter.labels" . | nindent 4 }}
rules:
- apiGroups: [""]
resources: ["secrets","configmap"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ kind: ClusterRoleBinding
metadata:
name: {{ template "prometheus-cloudwatch-exporter.fullname" . }}
labels:
app: {{ template "prometheus-cloudwatch-exporter.name" . }}
chart: {{ template "prometheus-cloudwatch-exporter.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "prometheus-cloudwatch-exporter.labels" . | nindent 4 }}
subjects:
- kind: ServiceAccount
name: {{ template "prometheus-cloudwatch-exporter.serviceAccountName" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ metadata:
name: {{ template "prometheus-cloudwatch-exporter.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "prometheus-cloudwatch-exporter.name" . }}
chart: {{ template "prometheus-cloudwatch-exporter.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "prometheus-cloudwatch-exporter.labels" . | nindent 4 }}
data:
config.yml: |
{{ tpl .Values.config . | nindent 4 }}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ metadata:
name: {{ template "prometheus-cloudwatch-exporter.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "prometheus-cloudwatch-exporter.name" . }}
chart: {{ template "prometheus-cloudwatch-exporter.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "prometheus-cloudwatch-exporter.labels" . | nindent 4 }}
{{- with .Values.deployment.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
Expand All @@ -26,6 +23,9 @@ spec:
labels:
app: {{ template "prometheus-cloudwatch-exporter.name" . }}
release: {{ .Release.Name }}
{{- with .Values.commonLabels }}
{{ toYaml . | indent 8 }}
{{- end }}
{{- if .Values.pod.labels }}
{{ toYaml .Values.pod.labels | indent 8 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ metadata:
name: {{ $fullName }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "prometheus-cloudwatch-exporter.name" . }}
chart: {{ template "prometheus-cloudwatch-exporter.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "prometheus-cloudwatch-exporter.labels" . | nindent 4 }}
{{- if .Values.ingress.labels }}
{{ toYaml .Values.ingress.labels | indent 4 }}
{{- end }}
Expand Down
5 changes: 1 addition & 4 deletions charts/prometheus-cloudwatch-exporter/templates/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ metadata:
name: {{ template "prometheus-cloudwatch-exporter.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "prometheus-cloudwatch-exporter.name" . }}
chart: {{ template "prometheus-cloudwatch-exporter.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "prometheus-cloudwatch-exporter.labels" . | nindent 4 }}
spec:
{{- if .Values.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
{{- if .Values.prometheusRule.labels }}
labels:
{{ toYaml .Values.prometheusRule.labels | indent 4}}
{{- end }}
{{- include "prometheus-cloudwatch-exporter.labels" . | nindent 4 }}
{{- with .Values.prometheusRule.labels }}
{{ toYaml . | indent 4}}
{{- end }}
name: {{ $fullName }}
{{- if .Values.prometheusRule.namespace }}
namespace: {{ .Values.prometheusRule.namespace }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ metadata:
name: {{ template "prometheus-cloudwatch-exporter.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "prometheus-cloudwatch-exporter.name" . }}
chart: {{ template "prometheus-cloudwatch-exporter.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
{{- include "prometheus-cloudwatch-exporter.labels" . | nindent 4 }}
type: Opaque
data:
{{ if .Values.aws.aws_access_key_id }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ metadata:
annotations:
{{ toYaml .Values.service.annotations | indent 4 }}
labels:
app: {{ template "prometheus-cloudwatch-exporter.name" . }}
chart: {{ template "prometheus-cloudwatch-exporter.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "prometheus-cloudwatch-exporter.labels" . | nindent 4 }}
{{- if .Values.service.labels }}
{{ toYaml .Values.service.labels | indent 4 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ metadata:
name: {{ template "prometheus-cloudwatch-exporter.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "prometheus-cloudwatch-exporter.name" . }}
chart: {{ template "prometheus-cloudwatch-exporter.chart" . }}
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
{{- include "prometheus-cloudwatch-exporter.labels" . | nindent 4 }}
{{- if .Values.serviceAccount.annotations }}
annotations:
{{ toYaml .Values.serviceAccount.annotations | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
{{- if .Values.serviceMonitor.labels }}
labels:
{{ toYaml .Values.serviceMonitor.labels | indent 4}}
{{- end }}
{{- include "prometheus-cloudwatch-exporter.labels" . | nindent 4 }}
{{- with .Values.serviceMonitor.labels }}
{{ toYaml . | indent 4}}
{{- end }}
name: {{ template "prometheus-cloudwatch-exporter.fullname" . }}
{{- if .Values.serviceMonitor.namespace }}
namespace: {{ .Values.serviceMonitor.namespace }}
Expand Down
2 changes: 2 additions & 0 deletions charts/prometheus-cloudwatch-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

replicaCount: 1

commonLabels: {}

image:
repository: prom/cloudwatch-exporter
# if not set appVersion field from Chart.yaml is used
Expand Down