eventrouter-template.yaml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. # this openshift template should match (except nodeSelector) jinja2 template in
  2. # ../templates/eventrouter-template.j2
  3. kind: Template
  4. apiVersion: v1
  5. metadata:
  6. name: eventrouter-template
  7. annotations:
  8. description: "A pod forwarding kubernetes events to EFK aggregated logging stack."
  9. tags: "events,EFK,logging"
  10. objects:
  11. - kind: ServiceAccount
  12. apiVersion: v1
  13. metadata:
  14. name: aggregated-logging-eventrouter
  15. - kind: ClusterRole
  16. apiVersion: v1
  17. metadata:
  18. name: event-reader
  19. rules:
  20. - apiGroups: [""]
  21. resources: ["events"]
  22. verbs: ["get", "watch", "list"]
  23. - kind: ConfigMap
  24. apiVersion: v1
  25. metadata:
  26. name: logging-eventrouter
  27. data:
  28. config.json: |-
  29. {
  30. "sink": "${SINK}"
  31. }
  32. - kind: DeploymentConfig
  33. apiVersion: v1
  34. metadata:
  35. name: logging-eventrouter
  36. labels:
  37. component: eventrouter
  38. logging-infra: eventrouter
  39. provider: openshift
  40. spec:
  41. selector:
  42. component: eventrouter
  43. logging-infra: eventrouter
  44. provider: openshift
  45. replicas: ${REPLICAS}
  46. template:
  47. metadata:
  48. labels:
  49. component: eventrouter
  50. logging-infra: eventrouter
  51. provider: openshift
  52. name: logging-eventrouter
  53. spec:
  54. serviceAccount: aggregated-logging-eventrouter
  55. serviceAccountName: aggregated-logging-eventrouter
  56. containers:
  57. - name: kube-eventrouter
  58. image: ${IMAGE}
  59. imagePullPolicy: IfNotPresent
  60. resources:
  61. limits:
  62. memory: ${MEMORY}
  63. cpu: ${CPU}
  64. requires:
  65. memory: ${MEMORY}
  66. volumeMounts:
  67. - name: config-volume
  68. mountPath: /etc/eventrouter
  69. volumes:
  70. - name: config-volume
  71. configMap:
  72. name: logging-eventrouter
  73. - kind: ClusterRoleBinding
  74. apiVersion: v1
  75. metadata:
  76. name: event-reader-binding
  77. subjects:
  78. - kind: ServiceAccount
  79. name: aggregated-logging-eventrouter
  80. namespace: ${NAMESPACE}
  81. roleRef:
  82. kind: ClusterRole
  83. name: event-reader
  84. parameters:
  85. - name: SINK
  86. displayName: Sink
  87. value: stdout
  88. - name: REPLICAS
  89. displayName: Replicas
  90. value: "1"
  91. - name: IMAGE
  92. displayName: Image
  93. value: "docker.io/openshift/origin-logging-eventrouter:latest"
  94. - name: MEMORY
  95. displayName: Memory
  96. value: "128Mi"
  97. - name: CPU
  98. displayName: CPU
  99. value: "100m"
  100. - name: NAMESPACE
  101. displayName: Namespace
  102. value: default