Chapter 128. KafkaBridgeSpec schema reference
Used in: KafkaBridge
Full list of KafkaBridgeSpec schema properties
Configures a Kafka Bridge cluster.
Configuration options relate to:
- Kafka cluster bootstrap address
- Security (encryption, authentication, and authorization)
- Consumer configuration
- Producer configuration
- HTTP configuration
128.1. Logging Copy linkLink copied to clipboard!
Kafka Bridge has its own preconfigured loggers:
| Logger | Description | Default Level |
|---|---|---|
|
| Default logger for all classes | INFO |
|
|
All classes in the | INFO |
|
|
Uses | WARN |
|
|
Uses | WARN |
You can configure log levels directly for these loggers. For example:
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaBridge
spec:
# ...
logging:
type: inline
loggers:
rootLogger.level: INFO
logger.ready.level: DEBUG
# ...
You can also specify custom loggers for other operations:
-
createConsumer -
deleteConsumer -
subscribe -
unsubscribe -
poll -
assign -
commit -
send -
sendToPartition -
seekToBeginning -
seekToEnd -
seek -
openapi
Each operation maps to an API endpoint, defined according to the OpenAPI specification, and supports fine-grained logging via http.openapi.operation.<operation_id>.
For example, to set the logging level for the send operation logger:
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaBridge
spec:
# ...
logging:
type: inline
loggers:
logger.send.name: http.openapi.operation.send
logger.send.level: DEBUG
# ...
Kafka Bridge uses the Apache log4j2 logger implementation. Use the logging property to configure loggers and logger levels.
You can set log levels using either the inline or external logging configuration types.
Specify loggers and levels directly in the custom resource for inline configuration:
Example inline logging configuration
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaBridge
spec:
# ...
logging:
type: inline
loggers:
rootLogger.level: INFO
# enabling DEBUG for send operation
logger.send.name: http.openapi.operation.send
logger.send.level: DEBUG
# ...
Alternatively, you can reference an external ConfigMap containing a complete log4j2.properties file that defines your own log4j2 configuration, including loggers, appenders, and layout configuration:
Example external logging configuration
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaBridge
spec:
# ...
logging:
type: external
valueFrom:
configMapKeyRef:
# name and key are mandatory
name: customConfigMap
key: log4j2.properties
# ...
Garbage collector (GC)
Garbage collector logging can also be enabled (or disabled) using the jvmOptions property.
128.2. KafkaBridgeSpec schema properties Copy linkLink copied to clipboard!
| Property | Property type | Description |
|---|---|---|
| replicas | integer |
The number of pods in the |
| image | string | The container image used for Kafka Bridge pods. If no image name is explicitly specified, the image name corresponds to the image specified in the Cluster Operator configuration. If an image name is not defined in the Cluster Operator configuration, a default value is used. |
| bootstrapServers | string | A list of host:port pairs for establishing the initial connection to the Kafka cluster. |
| tls | TLS configuration for connecting Kafka Bridge to the cluster. | |
| authentication |
| Authentication configuration for connecting to the cluster. |
| http | The HTTP related configuration. | |
| adminClient | Kafka AdminClient related configuration. | |
| consumer | Kafka consumer related configuration. | |
| producer | Kafka producer related configuration. | |
| resources | CPU and memory resources to reserve. | |
| jvmOptions | Currently not supported JVM Options for pods. | |
| logging | Logging configuration for Kafka Bridge. | |
| clientRackInitImage | string |
The image of the init container used for initializing the |
| rack | Configuration of the node label which will be used as the client.rack consumer configuration. | |
| enableMetrics | boolean | Enable the metrics for the Kafka Bridge. Default is false. |
| livenessProbe | Pod liveness checking. | |
| readinessProbe | Pod readiness checking. | |
| template |
Template for Kafka Bridge resources. The template allows users to specify how a | |
| tracing | The configuration of tracing in Kafka Bridge. |