Chapter 3. Enhancements
Chapter 3. Enhancements Streams for Apache Kafka 2.7 adds a number of enhancements. 3.1. Kafka 3.7.0 enhancements For an overview of the enhancements introduced with Kafka 3.7.0, refer to the Kafka 3.7.0 Release Notes. 3.2. Improved broker scale-down handling By default, Streams for Apache Kafka performs a check to ensure that there are no partition replicas on a broker before initiating a scale-down operation on a Kafka cluster. Previously, if brokers were found to still be in use, the scale-down operation was blocked and reconciliation failed. Now, the scale-down changes are reverted but the reconciliation can proceed as usual. However, there may be scenarios where you want to bypass this blocking mechanism. For example, it might be useful to disable the check on busy clusters. To do this, you annotate the Kafka resource by setting strimzi.io/skip-broker-scaledown-check to true . See Skipping checks on scale-down operations . 3.3. Kafka Exporter: Preventing metrics collection on disconnected consumers You can now stop collecting metrics on consumers that are no longer connected. To stop collecting metrics on disconnected consumers, set the showAllOffsets property to false in the Kafka Exporter configuration. See KafkaExporterSpec schema reference . 3.4. Making CRD labels and annotations consistent Label and annotation definitions in our CRDs (for example in the template sections) no longer accept integer values and must always use string values. For example, this configuration: Example template configuration with annotation template: apiService: metadata: annotations: discovery.myapigateway.io/port: 8080 Must be as follows: Example template configuration with annotation template: apiService: metadata: annotations: discovery.myapigateway.io/port: "8080" This is to avoid the potential for receiving an invalid value error: Example invalid value error spec.template.apiService.metadata.annotations.discovery.myapigateway.io/port: Invalid value: "integer": spec.template.apiService.metadata.annotations.discovery.myapigateway.io/port in body must be of type string: "integer" 3.5. Drain Cleaner: Change to handling of eviction requests The way Streams for Apache Kafka Drain Cleaner handles Kubernetes pod eviction requests has changed. By default, the Drain Cleaner now denies (blocks) the Kubernetes eviction request to prevent Kubernetes from evicting the pods and instead uses the Cluster Operator to move the pod. You can still use the approach, where the Drain Cleaner allows the Kubernetes eviction request while also instructing the Cluster Operator to move the pod. For this legacy mode to work, you must do the following: Ste the STRIMZI_DENY_EVICTION Drain Cleaner environment variable to false . Configure the PodDisruptionBudget to not allow any pod evictions by setting the maxUnavailable option to 0 . See Evicting pods with the Strimzi Drain Cleaner . 3.6. Enhanced Kafka Connect metrics and dashboard examples The metrics collected for Kafka Connect have been enhanced to include the following: Collection of coordinator metrics Simplified metric regex The example Grafana dashboard file for Kafka Connect has been updated to add panels that display more connector information and rebalance metrics. 3.7. Enhanced MirrorMaker 2 dashboard example The example Grafana dashboard file for MirrorMaker 2 has been updated as follows: New rows to organize panels Updated panels that display more connector information and rebalance metrics 3.8. Kafka Bridge text format When performing producer operations, POST requests must provide Content-Type headers specifying the embedded data format of the messages produced. Previously, JSON and binary were the supported formats for record and key values. It's now possible to also use text format. Table 3.1. Supported content type formats Embedded data format Content-Type header JSON Content-Type: application/vnd.kafka.json.v2+json Binary Content-Type: application/vnd.kafka.binary.v2+json Text Content-Type: application/vnd.kafka.text.v2+json
template: apiService: metadata: annotations: discovery.myapigateway.io/port: 8080 template: apiService: metadata: annotations: discovery.myapigateway.io/port: "8080" spec.template.apiService.metadata.annotations.discovery.myapigateway.io/port: Invalid value: "integer": spec.template.apiService.metadata.annotations.discovery.myapigateway.io/port in body must be of type string: "integer"