summaryrefslogtreecommitdiffstats
path: root/kubernetes/strimzi
diff options
context:
space:
mode:
authorefiacor <fiachra.corcoran@est.tech>2023-02-23 16:24:51 +0000
committerFiachra Corcoran <fiachra.corcoran@est.tech>2023-03-07 12:19:59 +0000
commit913d54693dd61e81125c5432827f6cef99b50a4e (patch)
tree5a2654fc9ba896f8f46796e037703f6a7892ee90 /kubernetes/strimzi
parentd3c55abb3bbdab8e864a4997f7699cae8a253e37 (diff)
[STRIMZI] Add logging overrides to kafka bridge
Add ability to control http bridge logging Signed-off-by: efiacor <fiachra.corcoran@est.tech> Change-Id: I4ade04d6c8f67ce82a4360b99e93b4f3323c00df Issue-ID: DMAAP-1874
Diffstat (limited to 'kubernetes/strimzi')
-rw-r--r--kubernetes/strimzi/components/strimzi-kafka-bridge/resources/config/log4j2.properties38
-rw-r--r--kubernetes/strimzi/components/strimzi-kafka-bridge/templates/configmap.yaml24
-rw-r--r--kubernetes/strimzi/components/strimzi-kafka-bridge/templates/strimzi-kb.yaml6
3 files changed, 68 insertions, 0 deletions
diff --git a/kubernetes/strimzi/components/strimzi-kafka-bridge/resources/config/log4j2.properties b/kubernetes/strimzi/components/strimzi-kafka-bridge/resources/config/log4j2.properties
new file mode 100644
index 0000000000..e6ad8e0920
--- /dev/null
+++ b/kubernetes/strimzi/components/strimzi-kafka-bridge/resources/config/log4j2.properties
@@ -0,0 +1,38 @@
+name=BridgeConfig
+
+appender.console.type=Console
+appender.console.name=STDOUT
+
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = [%d] %-5p <%-12.12c{1}:%L> [%-12.12t] %m%n
+
+# Alternate JSONLayout pattern config
+#appender.console.layout.type=JSONLayout
+#appender.console.layout.compact=true
+#appender.console.layout.eventEol=true
+#appender.console.layout.complete=true
+#appender.console.layout.properties=false
+#appender.console.layout.propertiesAsList=false
+#appender.console.layout.locationInfo=true
+#appender.console.layout.includeStacktrace=true
+#appender.console.layout.stacktraceAsString=true
+#appender.console.layout.includeNullDelimiter=false
+#appender.console.layout.objectMessageAsJsonObject=true
+
+rootLogger.level=INFO
+rootLogger.appenderRefs=console
+rootLogger.appenderRef.console.ref=STDOUT
+rootLogger.additivity=false
+
+logger.bridge.name=io.strimzi.kafka.bridge
+logger.bridge.level=INFO
+logger.bridge.appenderRefs=console
+logger.bridge.appenderRef.console.ref=STDOUT
+logger.bridge.additivity=false
+
+logger.healthy.name=http.openapi.operation.healthy
+logger.healthy.level=WARN
+logger.ready.name=http.openapi.operation.ready
+logger.ready.level=WARN
+
+monitorInterval=30
diff --git a/kubernetes/strimzi/components/strimzi-kafka-bridge/templates/configmap.yaml b/kubernetes/strimzi/components/strimzi-kafka-bridge/templates/configmap.yaml
new file mode 100644
index 0000000000..25fbf3df77
--- /dev/null
+++ b/kubernetes/strimzi/components/strimzi-kafka-bridge/templates/configmap.yaml
@@ -0,0 +1,24 @@
+{{/*
+# Copyright © 2023 Nordix Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+*/}}
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-kb-logging-cm
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/log4j2.properties").AsConfig . | indent 2 }}
+
diff --git a/kubernetes/strimzi/components/strimzi-kafka-bridge/templates/strimzi-kb.yaml b/kubernetes/strimzi/components/strimzi-kafka-bridge/templates/strimzi-kb.yaml
index 3abb04af10..7788dc145a 100644
--- a/kubernetes/strimzi/components/strimzi-kafka-bridge/templates/strimzi-kb.yaml
+++ b/kubernetes/strimzi/components/strimzi-kafka-bridge/templates/strimzi-kb.yaml
@@ -28,3 +28,9 @@ spec:
enableMetrics: {{ .Values.config.enableMetrics }}
http:
port: {{ .Values.config.port }}
+ logging:
+ type: external
+ valueFrom:
+ configMapKeyRef:
+ key: log4j2.properties
+ name: {{ include "common.fullname" . }}-kb-logging-cm