此内容没有您所选择的语言版本。

Chapter 133. 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

133.1. Logging

Kafka Bridge has its own preconfigured loggers:

Expand
LoggerDescriptionDefault Level

rootLogger

Default logger for all classes

INFO

bridge

All classes in the io.strimzi.kafka.bridge package

INFO

healthy

Uses http.openapi.operation.healthy endpoint

WARN

ready

Uses http.openapi.operation.ready endpoint

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.

133.2. KafkaBridgeSpec schema properties

Expand
PropertyProperty typeDescription

replicas

integer

The number of pods in the Deployment. Defaults to 1.

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

ClientTls

TLS configuration for connecting Kafka Bridge to the cluster.

authentication

KafkaClientAuthenticationTls, KafkaClientAuthenticationScramSha256, KafkaClientAuthenticationScramSha512, KafkaClientAuthenticationPlain, KafkaClientAuthenticationOAuth, KafkaClientAuthenticationCustom

Authentication configuration for connecting to the cluster.

http

KafkaBridgeHttpConfig

The HTTP related configuration.

adminClient

KafkaBridgeAdminClientSpec

Kafka AdminClient related configuration.

consumer

KafkaBridgeConsumerSpec

Kafka consumer related configuration.

producer

KafkaBridgeProducerSpec

Kafka producer related configuration.

resources

ResourceRequirements

CPU and memory resources to reserve.

jvmOptions

JvmOptions

JVM Options for pods.

logging

InlineLogging, ExternalLogging

Logging configuration for Kafka Bridge.

clientRackInitImage

string

The image of the init container used for initializing the client.rack.

rack

Rack

Configuration of the node label which will be used as the client.rack consumer configuration.

enableMetrics

boolean

The enableMetrics property has been deprecated, and should now be configured using .spec.metricsConfig. The enableMetrics configuration is deprecated and will be removed in the future. Enable the metrics for the Kafka Bridge. Default is false.

metricsConfig

JmxPrometheusExporterMetrics, StrimziMetricsReporter

Metrics configuration.

livenessProbe

Probe

Pod liveness checking.

readinessProbe

Probe

Pod readiness checking.

template

KafkaBridgeTemplate

Template for Kafka Bridge resources. The template allows users to specify how a Deployment and Pod is generated.

tracing

JaegerTracing, OpenTelemetryTracing

The configuration of tracing in Kafka Bridge.

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部