Chapter 48. EntityUserOperatorSpec schema reference
Used in: EntityOperatorSpec
Full list of EntityUserOperatorSpec schema properties
Configures the User Operator.
48.1. logging Copy linkLink copied to clipboard!
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
- 1
- Creates a logger for the
userpackage. - 2
- Sets the logging level for the
userpackage. - 3
- Creates a logger for the
AbstractCacheclass. - 4
- Sets the logging level for the
AbstractCacheclass. - 5
- Changes the logging level for the default
jettylogger. Thejettylogger is part of the logging configuration provided with AMQ Streams. By default, it is set toINFO.
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
Garbage collector (GC)
Garbage collector logging can also be enabled (or disabled) using the jvmOptions property.
48.2. EntityUserOperatorSpec schema properties Copy linkLink copied to clipboard!
| Property | Description |
|---|---|
| watchedNamespace | The namespace the User Operator should watch. |
| string | |
| image | The image to use for the User Operator. |
| string | |
| reconciliationIntervalSeconds | Interval between periodic reconciliations. |
| integer | |
| zookeeperSessionTimeoutSeconds |
The |
| integer | |
| secretPrefix | The prefix that will be added to the KafkaUser name to be used as the Secret name. |
| string | |
| livenessProbe | Pod liveness checking. |
| readinessProbe | Pod readiness checking. |
| resources | CPU and memory resources to reserve. For more information, see the external documentation for core/v1 resourcerequirements. |
| logging |
Logging configuration. The type depends on the value of the |
| jvmOptions | JVM Options for pods. |