Skip to content

Commit

Permalink
fix(prometheus): alertmanager discord webhook file
Browse files Browse the repository at this point in the history
  • Loading branch information
tuana9a committed Nov 11, 2024
1 parent f1a96ad commit 1d6fb87
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 14 deletions.
19 changes: 19 additions & 0 deletions 100-argo-apps/300-prometheus-manifests-k8s-cobi-tuana9a.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: 300-prometheus-manifests-k8s-cobi-tuana9a
namespace: argocd
spec:
project: default
revisionHistoryLimit: 10
source:
path: 300-prometheus-manifests-k8s-cobi-tuana9a
repoURL: https://github.com/tuana9a/platform.git
targetRevision: main
destination:
namespace: prometheus
server: https://kubernetes.default.svc
syncPolicy:
automated:
prune: false
selfHeal: true
2 changes: 1 addition & 1 deletion 100-argo-apps/300-prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
releaseName: prometheus
valueFiles:
- $values/300-prometheus/values.yaml
- $values/300-prometheus/alertmanager-values.yaml
- $values/300-prometheus/alert-values.yaml
- $values/300-prometheus/alert-msg-template-values.yaml
- repoURL: https://github.com/tuana9a/platform.git
Expand All @@ -21,7 +22,6 @@ spec:
destination:
server: "https://kubernetes.default.svc"
namespace: prometheus
# NOTE: wait https://github.com/prometheus/alertmanager/pull/3728 to be released
syncPolicy:
automated:
prune: false
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: secrets.hashicorp.com/v1beta1
kind: VaultStaticSecret
metadata:
name: discord-webhook-url
spec:
type: kv-v1
mount: kv
path: kv/prometheus/alertmanager
destination:
name: discord-webhook-url
create: true
refreshAfter: 30s
vaultAuthRef: vault/secrets-operator
22 changes: 22 additions & 0 deletions 300-prometheus/alertmanager-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
alertmanager:
image:
repository: quay.io/prometheus/alertmanager
pullPolicy: IfNotPresent
tag: "v0.28.0-rc.0" # fix https://github.com/prometheus/alertmanager/pull/3728
persistence:
storageClass: nfs-vdb
size: 2Gi
config:
enabled: true
route:
receiver: "discord"
receivers:
- name: "discord"
discord_configs:
- webhook_url_file: /etc/discord_webhook_url.txt
extraSecretMounts:
- name: discord-webhook-url
mountPath: /etc
subPath: "discord_webhook_url.txt"
secretName: discord-webhook-url
readOnly: true
14 changes: 1 addition & 13 deletions 300-prometheus/values.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
server:
persistentVolume:
storageClass: nfs-vdb
size: 15Gi
alertmanager:
persistence:
storageClass: nfs-vdb
size: 2Gi
config:
enabled: true
route:
receiver: "discord"
receivers:
- name: "discord"
discord_configs:
- webhook_url: "TODO"
size: 15Gi

0 comments on commit 1d6fb87

Please sign in to comment.