-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(): support alertmanager basic auth (update opensource and ruler …
…chart to 1.0.4) (#20) ## What type of PR is this? * [x] Feature * [ ] BUG * [ ] Alerts * [x] Improvement * [ ] Documentation * [x] Test and CI ## Which issue(s) this PR related: issue # matrixorigin/MO-Cloud#3817 ## What this PR does / why we need it: 1. alertmanager 添加 basic auth鉴权 2. alertmanager 支持 ha 集群部署 3. 添加基于 tilt 的本地集成测试环境部署脚本
- Loading branch information
Showing
18 changed files
with
737 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
load('ext://helm_remote', 'helm_remote') | ||
helm_remote( | ||
'operator', | ||
repo_url='https://operator.min.io', | ||
release_name='minio-operator', | ||
namespace='minio-operator', | ||
version='6.0.2', | ||
create_namespace=True, | ||
) | ||
|
||
helm_remote( | ||
'tenant', | ||
repo_url='https://operator.min.io', | ||
release_name='loki-tenant', | ||
namespace='loki-tenant', | ||
version='6.0.2', | ||
values=['./dev/loki-tenant.yaml'], | ||
create_namespace=True, | ||
) | ||
|
||
# 设置 Helm Chart 的本地路径 | ||
mo_ob_opensource_chart = './charts/mo-ob-opensource' | ||
mo_ruler_stack_chart = './charts/mo-ruler-stack' | ||
|
||
local('kubectl get ns mo-ob || kubectl create ns mo-ob') | ||
|
||
k8s_yaml( | ||
helm( | ||
mo_ruler_stack_chart, | ||
name='mo-ruler-stack', | ||
namespace='mo-ob', | ||
values=['./dev/mo-ruler-stack.dev.yaml'], | ||
) | ||
) | ||
|
||
k8s_yaml( | ||
helm( | ||
mo_ob_opensource_chart, | ||
name='mo-ob-opensource', | ||
namespace='mo-ob', | ||
values=['./dev/mo-ob-opensource.dev.yaml'], | ||
) | ||
) | ||
|
||
k8s_yaml("./dev/loki_test_rule.yaml") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
charts/mo-ruler-stack/templates/alertmanager-auth-secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: alertmanager-auth-secret | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app.kubernetes.io/name: {{ .Release.Name }} | ||
data: | ||
username: {{ .Values.secretValue.alertmanager.alertmanager_web_auth_user | b64enc }} | ||
password: {{ .Values.secretValue.alertmanager.alertmanager_web_auth_password | b64enc }} | ||
type: Opaque |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
charts/mo-ruler-stack/templates/alertmanager-loki-credentials.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: alertmanager-loki-credentials | ||
data: | ||
alertmanager-loki-credentials: {{ printf "%s:%s" .Values.secretValue.alertmanager.alertmanager_web_auth_user .Values.secretValue.alertmanager.alertmanager_web_auth_password | b64enc | b64enc }} | ||
type: Opaque |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: alertmanager-web-config | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app.kubernetes.io/name: {{ .Release.Name }} | ||
data: | ||
alertmanager-web-config.yaml: {{ include "alertmanager.web" . | b64enc }} |
Oops, something went wrong.