Skip to content

Commit

Permalink
Deploy fork of eventrouter to capture Events in Loki
Browse files Browse the repository at this point in the history
Capture Kubernetes Events via eventrouter and punt these into Loki using
Promtail, along with a simple pipeline stage to extract a given event's
namespace out of the metadata for easier filtering.

This image is required because the RHEL ones are not public.
  • Loading branch information
drew-viles committed Feb 20, 2024
1 parent 1099c46 commit c831e2d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
17 changes: 8 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
FROM registry.redhat.io/ubi9/go-toolset:latest AS builder
FROM cgr.dev/chainguard/go:latest AS builder
WORKDIR /go/src/github.com/openshift/eventrouter
USER 0
COPY Makefile *.go go.mod go.sum ./
COPY *.go go.mod go.sum ./
COPY sinks ./sinks

RUN make build
RUN CGO_ENABLED=0 go build -mod=mod -o eventrouter
RUN chmod +x eventrouter

FROM registry.access.redhat.com/ubi9/ubi-minimal
USER 1000
COPY --from=builder /go/src/github.com/openshift/eventrouter/eventrouter /bin/eventrouter
CMD ["/bin/eventrouter", "-v", "3", "-logtostderr"]
LABEL version=release-5.9
FROM cgr.dev/chainguard/static:latest
COPY --from=builder /go/src/github.com/openshift/eventrouter/eventrouter /eventrouter
CMD ["/eventrouter", "-v", "3", "-logtostderr"]
LABEL version=release-5.8
1 change: 0 additions & 1 deletion Dockerfile.rhel8

This file was deleted.

10 changes: 5 additions & 5 deletions yaml/eventrouter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: eventrouter
name: eventrouter
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: eventrouter
name: eventrouter
rules:
- apiGroups: [""]
resources: ["events"]
Expand All @@ -30,7 +30,7 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: eventrouter
name: eventrouter
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand Down Expand Up @@ -71,12 +71,12 @@ spec:
spec:
containers:
- name: kube-eventrouter
image: registry.redhat.io/openshift-logging/eventrouter-rhel8:v0.3
image: ghcr.io/nscaledev/eventrouter:latest
resources:
requests:
cpu: 100m
memory: 128Mi
imagePullPolicy: IfNotPresent
imagePullPolicy: Always
volumeMounts:
- name: config-volume
mountPath: /etc/eventrouter
Expand Down

0 comments on commit c831e2d

Please sign in to comment.