kind: Template
apiVersion: v1
metadata:
name: eventrouter-template
annotations:
description: "A pod forwarding kubernetes events to cluster logging stack."
tags: "events,EFK,logging,cluster-logging"
objects:
- kind: ServiceAccount (1)
apiVersion: v1
metadata:
name: eventrouter
namespace: ${NAMESPACE}
- kind: ClusterRole (2)
apiVersion: v1
metadata:
name: event-reader
rules:
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "watch", "list"]
- kind: ClusterRoleBinding (3)
apiVersion: v1
metadata:
name: event-reader-binding
subjects:
- kind: ServiceAccount
name: eventrouter
namespace: ${NAMESPACE}
roleRef:
kind: ClusterRole
name: event-reader
- kind: ConfigMap (4)
apiVersion: v1
metadata:
name: eventrouter
namespace: ${NAMESPACE}
data:
config.json: |-
{
"sink": "stdout"
}
- kind: Deployment (5)
apiVersion: apps/v1
metadata:
name: eventrouter
namespace: ${NAMESPACE}
labels:
component: "eventrouter"
logging-infra: "eventrouter"
provider: "openshift"
spec:
selector:
matchLabels:
component: "eventrouter"
logging-infra: "eventrouter"
provider: "openshift"
replicas: 1
template:
metadata:
labels:
component: "eventrouter"
logging-infra: "eventrouter"
provider: "openshift"
name: eventrouter
spec:
serviceAccount: eventrouter
containers:
- name: kube-eventrouter
image: ${IMAGE}
imagePullPolicy: IfNotPresent
resources:
requests:
cpu: ${CPU}
memory: ${MEMORY}
volumeMounts:
- name: config-volume
mountPath: /etc/eventrouter
volumes:
- name: config-volume
configMap:
name: eventrouter
parameters:
- name: IMAGE
displayName: Image
value: "registry.redhat.io/openshift4/ose-logging-eventrouter:latest"
- name: CPU (6)
displayName: CPU
value: "100m"
- name: MEMORY (7)
displayName: Memory
value: "128Mi"
- name: NAMESPACE
displayName: Namespace
value: "openshift-logging" (8)