Skip to content

Commit 59af863

Browse files
add flux grafana alert provider
1 parent c925d8e commit 59af863

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
apiVersion: notification.toolkit.fluxcd.io/v1beta3
3+
kind: Alert
4+
metadata:
5+
name: grafana
6+
spec:
7+
providerRef:
8+
name: grafana
9+
eventSeverity: info
10+
eventSources:
11+
- kind: GitRepository
12+
name: '*'
13+
namespace: flux-system
14+
---
15+
apiVersion: notification.toolkit.fluxcd.io/v1beta3
16+
kind: Provider
17+
metadata:
18+
name: grafana
19+
spec:
20+
type: grafana
21+
address: "http://grafana.grafana/api/annotations"
22+
secretRef:
23+
name: grafana
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
apiVersion: "external-secrets.io/v1beta1"
3+
kind: "ExternalSecret"
4+
metadata:
5+
name: "grafana"
6+
spec:
7+
refreshInterval: "12h"
8+
secretStoreRef:
9+
name: "vault"
10+
kind: "ClusterSecretStore"
11+
target:
12+
name: "grafana"
13+
creationPolicy: "Owner"
14+
data:
15+
- secretKey: "token"
16+
remoteRef:
17+
key: "secret/soeren.cloud/k8s/svc.pt.soeren.cloud/grafana/flux-svc.pt"
18+
property: "token"

clusters/svc.pt.soeren.cloud/infra/flux/kustomization.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
44
resources:
5-
- ../../../../infra/flux
5+
- "../../../../infra/flux"
6+
- "external-secret-grafana.yaml"
7+
- "alerts-grafana.yaml"
68
patches:
79
- target:
810
kind: Kustomization

0 commit comments

Comments
 (0)