kube-event-exporter

Crates.iokube-event-exporter
lib.rskube-event-exporter
version1.0.0
sourcesrc
created_at2021-05-16 18:47:31.882713
updated_at2022-12-21 11:11:31.528836
descriptionWatches for kubernetes events and prints them to the console.
homepage
repositoryhttps://github.com/JensWalter/kube-event-exporter/
max_upload_size
id398281
size44,477
Jens Walter (JensWalter)

documentation

https://docs.rs/kube-event-exporter

README

kube-event-exporter

a container which exports kubernetes events to stdout

Building

git clone https://github.com/JensWalter/kube-event-exporter.git
cd kube-event-exporter
docker build -t kube-event-exporter .

Configuration

variable values description
IGNORE_OLD_ENTRIES TRUE, FALSE default: TRUE, do not print entries older then 60 seconds
OUTPUT_FORMAT PLAIN, JSON default: PLAIN, print output as plain text

Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: kube-event-exporter
  labels:
    app: kube-event-exporter
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kube-event-exporter
  template:
    metadata:
      labels:
        app: kube-event-exporter
    spec:
      serviceAccountName: kube-event-reader-account
      containers:
      - name: kube-event-exporter
        resources:
          requests:
            memory: "20Mi"
            cpu: "10m"
          limits:
            memory: "30Mi"
            cpu: "50m"
        image: {image-registry}/kube-event-exporter:latest
      imagePullSecrets:
      - name: cr-secret
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: kube-event-reader-account
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: kube-event-reader-role
rules:
- apiGroups: [""]
  resources: ["events"]
  verbs: ["get", "watch", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: kube-event-reader-clusterrolebinding
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: kube-event-reader-role
subjects:
- kind: ServiceAccount
  name: kube-event-reader-account
Commit count: 22

cargo fmt