Skip to content

Commit

Permalink
ROX-13092: Add openshift eventrouter to persist kubernetes events to …
Browse files Browse the repository at this point in the history
…CloudWatch (#911)
  • Loading branch information
rhybrillou authored Apr 13, 2023
1 parent 4e323bb commit c2229e0
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 0 deletions.
1 change: 1 addition & 0 deletions dp-terraform/helm/rhacs-terraform/charts/logging/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Data plane terraform logging Helm chart

This chart installs resource into `openshift-logging` namespace. This namespace is Openshift dedicated namespace for logging stack for OSD cluster.
It installs on top the openshift eventrouter in order to log kubernetes events in the `openshift-logging` namespace.

## Custom resource definitions

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: eventrouter
namespace: openshift-logging
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: event-reader
rules:
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "watch", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: event-reader-binding
subjects:
- kind: ServiceAccount
name: eventrouter
namespace: openshift-logging
roleRef:
aoiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: event-reader
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: eventrouter
namespace: openshift-logging
data:
config.json: |-
{
"sink": "stdout"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: eventrouter
namespace: openshift-logging
labels:
component: "eventrouter"
logging-infra: "eventrouter"
provider: "openshift"
spec:
replicas: 1
selector:
component: "eventrouter"
logging-infra: "eventrouter"
provider: "openshift"
template:
metadata:
labels:
component: "eventrouter"
logging-infra: "eventrouter"
provider: "openshift"
name: eventrouter
spec:
serviceAccount: eventrouter
containers:
- name: kube-eventrouter
image: "registry.redhat.io/openshift-logging/eventrouter-rhel8:v0.4"
imagePullPolicy: IfNotPresent
resources:
requests:
cpu: "100m"
memory: "128Mi"
volumeMounts:
- name: config-volume
mountPath: /etc/eventrouter
volumes:
- name: config-volume
configMap:
name: eventrouter

0 comments on commit c2229e0

Please sign in to comment.