Skip to content

Commit 8b4d3b9

Browse files
authored
chore(): support enable/close webhook-adapter and update ruler-stack to 1.0.2 (#8)
## What type of PR is this? * [ ] Feature * [x] BUG * [ ] Alerts * [ ] Improvement * [ ] Documentation * [ ] Test and CI ## Which issue(s) this PR related: issue # ## What this PR does / why we need it: 由于私有化环境打包时渲染 webhook-adapter 的模板出错导致无法打包,目前私有化场景也没有使用 webhook-adapter 的需求,因此为 alertmanager-webhook-adapter 添加开关
1 parent 15a837e commit 8b4d3b9

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed

charts/mo-ruler-stack/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: mo-ruler-stack
33
description: mo-ruler's Helm chart for Kubernetes
44
type: application
5-
version: 1.0.1
5+
version: 1.0.2
66
appVersion: 0.9.0
77
dependencies:
88
- condition: alertmanager.enabled

charts/mo-ruler-stack/templates/webhook-adapter-deployment.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{{ if .Values.alertmanagerWebhookAdapter.enabled }}
2+
13
apiVersion: apps/v1
24
kind: Deployment
35
metadata:
@@ -15,7 +17,7 @@ spec:
1517
spec:
1618
containers:
1719
- name: webhook
18-
image: ez4bruce3280/alertmanager-webhook-adapter:v1.1.7
20+
image: {{ .Values.alertmanagerWebhookAdapter.image.repository }}:{{ .Values.alertmanagerWebhookAdapter.image.tag }}
1921
command:
2022
- /alertmanager-webhook-adapter
2123
- --listen-address=:8090
@@ -40,4 +42,6 @@ spec:
4042
- name: alert-templates
4143
configMap:
4244
name: alert-template-config-map
43-
restartPolicy: Always
45+
restartPolicy: Always
46+
47+
{{ end }}

charts/mo-ruler-stack/templates/webhook-adapter-service.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{{ if .Values.alertmanagerWebhookAdapter.enabled }}
2+
13
apiVersion: v1
24
kind: Service
35
metadata:
@@ -9,4 +11,6 @@ spec:
911
protocol: TCP
1012
selector:
1113
app: alertmanager-webhook-adapter
12-
sessionAffinity: None
14+
sessionAffinity: None
15+
16+
{{ end }}

charts/mo-ruler-stack/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@ moRuler:
127127
pageTitle: MO-Ruler Server
128128
appName: MO-Ruler
129129

130+
# webhook adapter for alertmanger to send alert to wecom
131+
alertmanagerWebhookAdapter:
132+
enabled: true
133+
image:
134+
repository: ez4bruce3280/alertmanager-webhook-adapter
135+
tag: v1.1.7
136+
130137
## alertmanager sub-chart configurable values
131138
## Please see https://github.com/prometheus-community/helm-charts/tree/main/charts/alertmanager
132139
##

0 commit comments

Comments
 (0)