Skip to content

Commit

Permalink
feat: install event-exporter
Browse files Browse the repository at this point in the history
Log kubernetes events to loki so I can look them up even hours after
they happened (they vanish after an hour from etcd). Need this to debug
a weird issue that happens infrequently at nighttime.
  • Loading branch information
martinohmann committed Jan 20, 2025
1 parent c1b983f commit 284f8ed
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.18b.haus/helm.toolkit.fluxcd.io/helmrelease_v2.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: event-exporter
spec:
interval: 2h
chart:
spec:
chart: kubernetes-event-exporter
version: 3.3.2
sourceRef:
kind: HelmRepository
name: bitnami
namespace: flux-system
maxHistory: 2
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
strategy: uninstall
uninstall:
keepHistory: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml
21 changes: 21 additions & 0 deletions kubernetes/main/apps/monitoring/event-exporter/ks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.18b.haus/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app event-exporter
namespace: flux-system
spec:
targetNamespace: monitoring
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/main/apps/monitoring/event-exporter/app
prune: true
sourceRef:
kind: GitRepository
name: home-kubernetes
wait: false
interval: 2h
retryInterval: 1m
timeout: 5m
1 change: 1 addition & 0 deletions kubernetes/main/apps/monitoring/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resources:
- ./namespace.yaml
- ./alertmanager-telegram/ks.yaml
- ./blackbox-exporter/ks.yaml
- ./event-exporter/ks.yaml
- ./fritz-exporter/ks.yaml
- ./gatus/ks.yaml
- ./grafana/ks.yaml
Expand Down

0 comments on commit 284f8ed

Please sign in to comment.