Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

control-service: add helm template for alertmanager #2326

Merged
merged 8 commits into from
Jul 13, 2023
Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- /*
Copyright 2021-2023 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/}}

{{- if .Values.alertmanager.enabled }}
apiVersion: monitoring.coreos.com/v1alpha1
kind: AlertmanagerConfig
metadata:
labels: {{- include "pipelines-control-service.labels" . | nindent 4 }}
{{- range $key, $value := .Values.alertmanager.metadata.labels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
name: {{ .Values.alertmanager.metadata.name }}
namespace: {{ .Values.alertmanager.metadata.namespace }}
spec:
receivers:
- emailConfigs: {{ toYaml (index .Values.alertmanager.spec.receivers 0).emailConfigs | nindent 8 }}
authPassword:
key: authPassword
name: {{ .Values.alertmanager.authentication.secretName }}
optional: true
name: {{ (index .Values.alertmanager.spec.receivers 0).name }}
route: {{ toYaml .Values.alertmanager.spec.route | nindent 6 }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- /*
Copyright 2021-2023 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/}}

{{- if .Values.alertmanager.enabled }}

apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.alertmanager.authentication.secretName }}
namespace: {{ .Values.alertmanager.metadata.namespace }}
labels: {{- include "pipelines-control-service.labels" . | nindent 4 }}
type: Opaque
data:
authPassword: {{ default "" .Values.alertmanager.authentication.authPassword | b64enc | quote }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -1039,3 +1039,50 @@ mail:
ssl:
protocols: "TLSv1.2"
port: 587

# Alert manager email notification configuration for the Data-Pipelines/Data Jobs
# (dp) k8s deployment.
# More information on individual fileds can be found here:
# https://docs.openshift.com/container-platform/4.10/rest_api/monitoring_apis/alertmanagerconfig-monitoring-coreos-com-v1alpha1.html#specification
# Pre-requisites for the alertmanager is that prometheus-operator is installed:
# helm install prometheus-operator prometheus-community/kube-prometheus-stack
alertmanager:
enabled: false
# Authentication credentials are mounted into a k8s secret, that's why they are separate.
authentication:
secretName: "alertmanager-authentication-secret"
authPassword: ""
authSecret: ""
authSecretKey: ""
authIdentity: ""
metadata:
labels:
role: infra
name: dp-notifications
namespace: default
spec:
receivers:
- emailConfigs:
- from: ""
headers:
- key: subject
value: ""
hello: localhost
html: ""
requireTLS: false
sendResolved: false
smarthost: ""
to: ""
authUsername: ""
name: "data-pipelines-receiver"
route:
groupBy:
- alertname
- execution_id
groupInterval: 1m
groupWait: 0s
matchers:
- name: source
value: ""
receiver: "data-pipelines-receiver"
repeatInterval: 30d