flux alerting
This commit is contained in:
parent
b9d8691969
commit
766fd809a8
@ -0,0 +1,18 @@
|
|||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: kubernetes-grafana-external-ingress
|
||||||
|
namespace: monitoring
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: traefik-external
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
routes:
|
||||||
|
- match: Host(`kubernetes-grafana.local.fascinated.cc`)
|
||||||
|
kind: Rule
|
||||||
|
services:
|
||||||
|
- name: kube-prometheus-stack-grafana
|
||||||
|
port: 80
|
||||||
|
tls:
|
||||||
|
secretName: mcutils-xyz
|
19
infrastructure/alerting/flux/alert.yaml
Normal file
19
infrastructure/alerting/flux/alert.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
apiVersion: notification.toolkit.fluxcd.io/v1beta3
|
||||||
|
kind: Alert
|
||||||
|
metadata:
|
||||||
|
name: discord-alert
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
summary: "Discord Alert"
|
||||||
|
# eventMetadata:
|
||||||
|
# env: "production"
|
||||||
|
# cluster: "my-cluster"
|
||||||
|
# region: "us-east-2"
|
||||||
|
providerRef:
|
||||||
|
name: discord-webhook
|
||||||
|
eventSeverity: info
|
||||||
|
eventSources:
|
||||||
|
- kind: GitRepository
|
||||||
|
name: "*"
|
||||||
|
- kind: Kustomization
|
||||||
|
name: "*"
|
18
infrastructure/alerting/flux/discord-secret.yaml
Normal file
18
infrastructure/alerting/flux/discord-secret.yaml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
apiVersion: notification.toolkit.fluxcd.io/v1beta3
|
||||||
|
kind: Provider
|
||||||
|
metadata:
|
||||||
|
name: discord
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
type: discord
|
||||||
|
secretRef:
|
||||||
|
name: discord-webhook
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: discord-webhook
|
||||||
|
namespace: flux-system
|
||||||
|
stringData:
|
||||||
|
address: "https://discord.com/api/webhooks/1287224007820574841/4lZh3e3OxI6Qu0BnzyEBzbGBc3tdhzWG66Dh9t8RdVbenClhOOAnqooclrw1amRoY5nB"
|
6
infrastructure/alerting/flux/kustomization.yaml
Normal file
6
infrastructure/alerting/flux/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- discord-secret.yaml
|
||||||
|
- alert.yaml
|
@ -4,3 +4,4 @@ kind: Kustomization
|
|||||||
resources:
|
resources:
|
||||||
- crds
|
- crds
|
||||||
- nfs
|
- nfs
|
||||||
|
- alerting/flux
|
||||||
|
Reference in New Issue
Block a user