Chapter 53. EntityTopicOperatorSpec schema reference


Used in: EntityOperatorSpec

Full list of EntityTopicOperatorSpec schema properties

Configures the Topic Operator.

53.1. Logging

The Topic Operator has a configurable logger:

  • rootLogger.level

The Topic Operator uses the Apache log4j2 logger implementation.

Use the logging property in the entityOperator.topicOperator field of the Kafka resource Kafka resource to configure loggers and logger levels.

You can set the log levels by specifying the logger and level directly (inline) or use a custom (external) ConfigMap. If a ConfigMap is used, you set logging.valueFrom.configMapKeyRef.name property to the name of the ConfigMap containing the external logging configuration. Inside the ConfigMap, the logging configuration is described using log4j2.properties. Both logging.valueFrom.configMapKeyRef.name and logging.valueFrom.configMapKeyRef.key properties are mandatory. A ConfigMap using the exact logging configuration specified is created with the custom resource when the Cluster Operator is running, then recreated after each reconciliation. If you do not specify a custom ConfigMap, default logging settings are used. If a specific logger value is not set, upper-level logger settings are inherited for that logger. For more information about log levels, see Apache logging services.

Here we see examples of inline and external logging. The inline logging specifies the root logger level. You can also set log levels for specific classes or loggers by adding them to the loggers property.

Inline logging

apiVersion: kafka.strimzi.io/v1beta2
kind: Kafka
metadata:
  name: my-cluster
spec:
  kafka:
    # ...
  zookeeper:
    # ...
  entityOperator:
    # ...
    topicOperator:
      watchedNamespace: my-topic-namespace
      reconciliationIntervalMs: 60000
      logging:
        type: inline
        loggers:
          rootLogger.level: INFO
          logger.top.name: io.strimzi.operator.topic 
1

          logger.top.level: DEBUG 
2

          logger.toc.name: io.strimzi.operator.topic.TopicOperator 
3

          logger.toc.level: TRACE 
4

          logger.clients.level: DEBUG 
5

  # ...
Copy to Clipboard Toggle word wrap

1
Creates a logger for the topic package.
2
Sets the logging level for the topic package.
3
Creates a logger for the TopicOperator class.
4
Sets the logging level for the TopicOperator class.
5
Changes the logging level for the default clients logger. The clients logger is part of the logging configuration provided with Streams for Apache Kafka. By default, it is set to INFO.
Note

When investigating an issue with the operator, it’s usually sufficient to change the rootLogger to DEBUG to get more detailed logs. However, keep in mind that setting the log level to DEBUG may result in a large amount of log output and may have performance implications.

External logging

apiVersion: kafka.strimzi.io/v1beta2
kind: Kafka
metadata:
  name: my-cluster
spec:
  kafka:
    # ...
  zookeeper:
    # ...
  entityOperator:
    # ...
    topicOperator:
      watchedNamespace: my-topic-namespace
      reconciliationIntervalMs: 60000
      logging:
        type: external
        valueFrom:
          configMapKeyRef:
            name: customConfigMap
            key: topic-operator-log4j2.properties
  # ...
Copy to Clipboard Toggle word wrap

Garbage collector (GC)

Garbage collector logging can also be enabled (or disabled) using the jvmOptions property.

53.2. EntityTopicOperatorSpec schema properties

Expand
PropertyProperty typeDescription

watchedNamespace

string

The namespace the Topic Operator should watch.

image

string

The image to use for the Topic Operator.

reconciliationIntervalSeconds

integer

The reconciliationIntervalSeconds property has been deprecated, and should now be configured using .spec.entityOperator.topicOperator.reconciliationIntervalMs. Interval between periodic reconciliations in seconds. Ignored if reconciliationIntervalMs is set.

reconciliationIntervalMs

integer

Interval between periodic reconciliations in milliseconds.

zookeeperSessionTimeoutSeconds

integer

The zookeeperSessionTimeoutSeconds property has been deprecated. This property is not used anymore in Streams for Apache Kafka 2.8 and it is ignored. Timeout for the ZooKeeper session.

startupProbe

Probe

Pod startup checking.

livenessProbe

Probe

Pod liveness checking.

readinessProbe

Probe

Pod readiness checking.

resources

ResourceRequirements

CPU and memory resources to reserve.

topicMetadataMaxAttempts

integer

The topicMetadataMaxAttempts property has been deprecated. This property is not used anymore in Streams for Apache Kafka 2.8 and it is ignored. The number of attempts at getting topic metadata.

logging

InlineLogging, ExternalLogging

Logging configuration.

jvmOptions

JvmOptions

JVM Options for pods.

Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat