Skip to content

Commit

Permalink
feat: flux gh alerts to components (#8732)
Browse files Browse the repository at this point in the history
  • Loading branch information
onedr0p authored Jan 27, 2025
1 parent 97f38c1 commit 645ebbc
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./github
- ./helmrelease.yaml
- ./prometheusrule.yaml
- ./webhook
configMapGenerator:
- name: flux-instance-helm-values
files:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Alert
metadata:
name: alert-manager
name: alertmanager
spec:
providerRef:
name: alert-manager
name: alertmanager
eventSeverity: error
eventSources:
- kind: FluxInstance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./notifications
- ./webhooks
- ./alert.yaml
- ./provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: alert-manager
name: alertmanager
spec:
type: alertmanager
address: http://alertmanager-operated.observability.svc.cluster.local:9093/api/v2/alerts/
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/provider_v1beta3.json
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: github
spec:
type: github
address: https://github.com/onedr0p/home-ops
secretRef:
name: github-token-secret
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/alert_v1beta3.json
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Alert
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./alert.yaml
- ./externalsecret.yaml
- ./notification.yaml
- ./provider.yaml
11 changes: 11 additions & 0 deletions kubernetes/flux/components/alerts/github/provider.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/provider_v1beta3.json
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: github
spec:
type: github
address: https://github.com/onedr0p/home-ops
secretRef:
name: github-token-secret
4 changes: 2 additions & 2 deletions kubernetes/flux/components/alerts/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
resources:
- ./alert.yaml
- ./provider.yaml
- ./alertmanager
- ./github

0 comments on commit 645ebbc

Please sign in to comment.