feat: Add alerting

This commit is contained in:
Tony Du 2025-02-05 22:32:50 -08:00
parent b7f1006eec
commit ed0a889cf3
6 changed files with 63 additions and 5 deletions

View File

@ -5,6 +5,8 @@ metadata:
name: bitnami
namespace: flux-system
spec:
interval: 10m0s
url: https://charts.bitnami.com/bitnami
type: "oci"
interval: 5m
url: oci://registry-1.docker.io/bitnamicharts

View File

@ -0,0 +1,5 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- bitnami-repository.yaml

View File

@ -3,6 +3,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- repository.yaml
- secret.yaml
- release.yaml

View File

@ -5,7 +5,7 @@ metadata:
name: ghost
namespace: ghost
spec:
interval: 10m0s
interval: 1m
chart:
spec:
chart: ghost
@ -19,6 +19,7 @@ spec:
name: ghost-creds
valuesKey: ghost-password
targetPath: ghostPassword
values:
global:
defaultStorageClass: longhorn

View File

@ -0,0 +1,49 @@
---
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: discord
namespace: default
spec:
type: discord
secretRef:
name: discord-webhook
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: discord-webhook
namespace: default
spec:
secretStoreRef:
kind: ClusterSecretStore
name: infisical
target:
name: discord-webhook
data:
- secretKey: address
remoteRef:
key: discord-webhook-url
---
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Alert
metadata:
name: on-call-webapp
namespace: flux-system
spec:
summary: "cluster addons"
eventMetadata:
env: "production"
cluster: "dolo"
providerRef:
name: discord
eventSeverity: info
eventSources:
- kind: GitRepository
name: '*'
- kind: Kustomization
name: '*'

View File

@ -1,4 +1,5 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources: []
resources:
- alerts.yaml