summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-02-13 15:14:32 -0800
committerGitHub <noreply@github.com>2018-02-13 15:14:32 -0800
commitea96a91a2775321aa60062e25934e22ad8be9de3 (patch)
tree87b6120a02b94756442adea37193fdb446a13085
parent39a8e54ff578f0ce5b1d7eec874b4172331bf4a3 (diff)
parent3f2eb7420839c2fac076d80adfee0fbff5e5a6d1 (diff)
downloadopenshift-ea96a91a2775321aa60062e25934e22ad8be9de3.tar.gz
openshift-ea96a91a2775321aa60062e25934e22ad8be9de3.tar.bz2
openshift-ea96a91a2775321aa60062e25934e22ad8be9de3.tar.xz
openshift-ea96a91a2775321aa60062e25934e22ad8be9de3.zip
Merge pull request #7133 from ewolinetz/logging_eventrouter_template_fix
Automatic merge from submit-queue. Adding missing template Adding missing template. Addresses https://bugzilla.redhat.com/show_bug.cgi?id=1544657
-rw-r--r--roles/openshift_logging_eventrouter/templates/2.x/eventrouter-template.j2109
1 files changed, 109 insertions, 0 deletions
diff --git a/roles/openshift_logging_eventrouter/templates/2.x/eventrouter-template.j2 b/roles/openshift_logging_eventrouter/templates/2.x/eventrouter-template.j2
new file mode 100644
index 000000000..3bd29163b
--- /dev/null
+++ b/roles/openshift_logging_eventrouter/templates/2.x/eventrouter-template.j2
@@ -0,0 +1,109 @@
+# this jinja2 template should always match (except nodeSelector) openshift template in
+# ../files/eventrouter-template.yaml
+kind: Template
+apiVersion: v1
+metadata:
+ name: eventrouter-template
+ annotations:
+ description: "A pod forwarding kubernetes events to EFK aggregated logging stack."
+ tags: "events,EFK,logging"
+objects:
+ - kind: ServiceAccount
+ apiVersion: v1
+ metadata:
+ name: aggregated-logging-eventrouter
+ - kind: ClusterRole
+ apiVersion: v1
+ metadata:
+ name: event-reader
+ rules:
+ - apiGroups: [""]
+ resources: ["events"]
+ verbs: ["get", "watch", "list"]
+ - kind: ConfigMap
+ apiVersion: v1
+ metadata:
+ name: logging-eventrouter
+ data:
+ config.json: |-
+ {
+ "sink": "${SINK}"
+ }
+ - kind: DeploymentConfig
+ apiVersion: v1
+ metadata:
+ name: logging-eventrouter
+ labels:
+ component: eventrouter
+ logging-infra: eventrouter
+ provider: openshift
+ spec:
+ selector:
+ component: eventrouter
+ logging-infra: eventrouter
+ provider: openshift
+ replicas: "${{ '{{' }}REPLICAS{{ '}}' }}"
+ template:
+ metadata:
+ labels:
+ component: eventrouter
+ logging-infra: eventrouter
+ provider: openshift
+ name: logging-eventrouter
+ spec:
+ serviceAccount: aggregated-logging-eventrouter
+ serviceAccountName: aggregated-logging-eventrouter
+{% if node_selector is iterable and node_selector | length > 0 %}
+ nodeSelector:
+{% for key, value in node_selector.items() %}
+ {{ key }}: "{{ value }}"
+{% endfor %}
+{% endif %}
+ containers:
+ - name: kube-eventrouter
+ image: ${IMAGE}
+ imagePullPolicy: IfNotPresent
+ resources:
+ limits:
+ memory: ${MEMORY}
+ requires:
+ cpu: ${CPU}
+ memory: ${MEMORY}
+ volumeMounts:
+ - name: config-volume
+ mountPath: /etc/eventrouter
+ volumes:
+ - name: config-volume
+ configMap:
+ name: logging-eventrouter
+ - kind: ClusterRoleBinding
+ apiVersion: v1
+ metadata:
+ name: event-reader-binding
+ subjects:
+ - kind: ServiceAccount
+ name: aggregated-logging-eventrouter
+ namespace: ${NAMESPACE}
+ roleRef:
+ kind: ClusterRole
+ name: event-reader
+
+parameters:
+ - name: SINK
+ displayName: Sink
+ value: stdout
+ - name: REPLICAS
+ displayName: Replicas
+ value: "1"
+ - name: IMAGE
+ displayName: Image
+ value: "docker.io/openshift/origin-logging-eventrouter:latest"
+ - name: MEMORY
+ displayName: Memory
+ value: "128Mi"
+ - name: CPU
+ displayName: CPU
+ value: "100m"
+ - name: NAMESPACE
+ displayName: Namespace
+ value: default