Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions modules/cluster-logging-eventrouter-deploy.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ The following Template object creates the service account, cluster role, and clu
[source,yaml]
----
kind: Template
apiVersion: v1
apiVersion: template.openshift.io/v1
metadata:
name: eventrouter-template
annotations:
description: "A pod forwarding kubernetes events to cluster logging stack."
description: "A pod forwarding kubernetes events to OpenShift Logging stack."
tags: "events,EFK,logging,cluster-logging"
objects:
- kind: ServiceAccount <1>
Expand All @@ -36,15 +36,15 @@ objects:
name: eventrouter
namespace: ${NAMESPACE}
- kind: ClusterRole <2>
apiVersion: v1
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: event-reader
rules:
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "watch", "list"]
- kind: ClusterRoleBinding <3>
apiVersion: v1
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: event-reader-binding
subjects:
Expand Down Expand Up @@ -105,27 +105,28 @@ objects:
configMap:
name: eventrouter
parameters:
- name: IMAGE
- name: IMAGE <6>
displayName: Image
value: "registry.redhat.io/openshift4/ose-logging-eventrouter:latest"
- name: CPU <6>
value: "registry.redhat.io/openshift-logging/eventrouter-rhel8:v0.3"
- name: CPU <7>
displayName: CPU
value: "100m"
- name: MEMORY <7>
- name: MEMORY <8>
displayName: Memory
value: "128Mi"
- name: NAMESPACE
displayName: Namespace
value: "openshift-logging" <8>
value: "openshift-logging" <9>
----
<1> Creates a Service Account in the `openshift-logging` project for the Event Router.
<2> Creates a ClusterRole to monitor for events in the cluster.
<3> Creates a ClusterRoleBinding to bind the ClusterRole to the service account.
<4> Creates a config map in the `openshift-logging` project to generate the required `config.json` file.
<5> Creates a deployment in the `openshift-logging` project to generate and configure the Event Router pod.
<6> Specifies the minimum amount of memory to allocate to the Event Router pod. Defaults to `128Mi`.
<7> Specifies the minimum amount of CPU to allocate to the Event Router pod. Defaults to `100m`.
<8> Specifies the `openshift-logging` project to install objects in.
<6> Specifies the image, identified by a tag such as `v0.3`.
<7> Specifies the minimum amount of memory to allocate to the Event Router pod. Defaults to `128Mi`.
<8> Specifies the minimum amount of CPU to allocate to the Event Router pod. Defaults to `100m`.
<9> Specifies the `openshift-logging` project to install objects in.

. Use the following command to process and apply the template:
+
Expand All @@ -144,11 +145,11 @@ $ oc process -f eventrouter.yaml | oc apply -n openshift-logging -f -
.Example output
[source,terminal]
----
serviceaccount/logging-eventrouter created
serviceaccount/eventrouter created
clusterrole.authorization.openshift.io/event-reader created
clusterrolebinding.authorization.openshift.io/event-reader-binding created
configmap/logging-eventrouter created
deployment.apps/logging-eventrouter created
configmap/eventrouter created
deployment.apps/eventrouter created
----

. Validate that the Event Router installed in the `openshift-logging` project:
Expand Down