Questo contenuto non è disponibile nella lingua selezionata.

Chapter 53. EntityUserOperatorSpec schema reference


Used in: EntityOperatorSpec

Full list of EntityUserOperatorSpec schema properties

Configures the User Operator.

53.1. Logging

The User Operator has a configurable logger:

  • rootLogger.level

The User Operator uses the Apache log4j2 logger implementation.

Use the logging property in the entityOperator.userOperator field of the 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 rootLogger.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:
    # ...
    userOperator:
      watchedNamespace: my-topic-namespace
      reconciliationIntervalMs: 60000
      logging:
        type: inline
        loggers:
          rootLogger.level: INFO
          logger.uop.name: io.strimzi.operator.user 
1

          logger.uop.level: DEBUG 
2

          logger.abstractcache.name: io.strimzi.operator.user.operator.cache.AbstractCache 
3

          logger.abstractcache.level: TRACE 
4

          logger.jetty.level: DEBUG 
5


  # ...
Copy to Clipboard Toggle word wrap

1
Creates a logger for the user package.
2
Sets the logging level for the user package.
3
Creates a logger for the AbstractCache class.
4
Sets the logging level for the AbstractCache class.
5
Changes the logging level for the default jetty logger. The jetty 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:
    # ...
    userOperator:
      watchedNamespace: my-topic-namespace
      reconciliationIntervalMs: 60000
      logging:
        type: external
        valueFrom:
          configMapKeyRef:
            name: customConfigMap
            key: user-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. EntityUserOperatorSpec schema properties

Expand
PropertyProperty typeDescription

watchedNamespace

string

The namespace the User Operator should watch.

image

string

The image to use for the User Operator.

reconciliationIntervalSeconds

integer

The reconciliationIntervalSeconds property has been deprecated, and should now be configured using .spec.entityOperator.userOperator.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 has been deprecated because ZooKeeper is not used anymore by the User Operator. Timeout for the ZooKeeper session.

secretPrefix

string

The prefix that will be added to the KafkaUser name to be used as the Secret name.

livenessProbe

Probe

Pod liveness checking.

readinessProbe

Probe

Pod readiness checking.

resources

ResourceRequirements

CPU and memory resources to reserve.

logging

InlineLogging, ExternalLogging

Logging configuration.

jvmOptions

JvmOptions

JVM Options for pods.

Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat