Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 8. Feature gates


Streams for Apache Kafka operators use feature gates to enable or disable specific features and functions. Enabling a feature gate alters the behavior of the associated operator, introducing the corresponding feature to your Streams for Apache Kafka deployment.

The purpose of feature gates is to facilitate the trial and testing of a feature before it is fully adopted. The state (enabled or disabled) of a feature gate may vary by default, depending on its maturity level.

As a feature gate graduates and reaches General Availability (GA), it transitions to an enabled state by default and becomes a permanent part of the Streams for Apache Kafka deployment. A feature gate at the GA stage cannot be disabled.

The supported feature gates are applicable to all Streams for Apache Kafka operators. While a particular feature gate might be used by one operator and ignored by the others, it can still be configured in all operators. When deploying the User Operator and Topic Operator within the context of the`Kafka` custom resource, the Cluster Operator automatically propagates the feature gates configuration to them. When the User Operator and Topic Operator are deployed standalone, without a Cluster Operator available to configure the feature gates, they must be directly configured within their deployments.

8.1. Graduated feature gates (GA)

Graduated feature gates have reached General Availability (GA) and are permanently enabled features.

8.1.1. ControlPlaneListener feature gate

The ControlPlaneListener feature gate separates listeners for data replication and coordination:

  • Connections between the Kafka controller and brokers use an internal control plane listener on port 9090.
  • Replication of data between brokers, as well as internal connections from Streams for Apache Kafka operators, Cruise Control, or the Kafka Exporter use a replication listener on port 9091.
Important

With the ControlPlaneListener feature gate permanently enabled, direct upgrades or downgrades between Streams for Apache Kafka 1.7 and earlier and Streams for Apache Kafka 2.3 and newer are not possible. You must first upgrade or downgrade through one of the Streams for Apache Kafka versions in-between, disable the ControlPlaneListener feature gate, and then downgrade or upgrade (with the feature gate enabled) to the target version.

8.1.2. ServiceAccountPatching feature gate

The ServiceAccountPatching feature gate ensures that the Cluster Operator always reconciles service accounts and updates them when needed. For example, when you change service account labels or annotations using the template property of a custom resource, the operator automatically updates them on the existing service account resources.

8.1.3. UseStrimziPodSets feature gate

The UseStrimziPodSets feature gate introduced the StrimziPodSet custom resource for managing Kafka and ZooKeeper pods, replacing the use of OpenShift StatefulSet resources.

Important

With the UseStrimziPodSets feature gate permanently enabled, direct downgrades from Streams for Apache Kafka 2.5 and newer to Streams for Apache Kafka 2.0 or earlier are not possible. You must first downgrade through one of the Streams for Apache Kafka versions in-between, disable the UseStrimziPodSets feature gate, and then downgrade to Streams for Apache Kafka 2.0 or earlier.

8.1.4. StableConnectIdentities feature gate

The StableConnectIdentities feature gate introduced the StrimziPodSet custom resource for managing Kafka Connect and Kafka MirrorMaker 2 pods, replacing the use of OpenShift Deployment resources.

StrimziPodSet resources give the pods stable names and stable addresses, which do not change during rolling upgrades, replacing the use of OpenShift Deployment resources.

Important

With the StableConnectIdentities feature gate permanently enabled, direct downgrades from Streams for Apache Kafka 2.7 and newer to Streams for Apache Kafka 2.3 or earlier are not possible. You must first downgrade through one of the Streams for Apache Kafka versions in-between, disable the StableConnectIdentities feature gate, and then downgrade to Streams for Apache Kafka 2.3 or earlier.

8.1.5. KafkaNodePools feature gate

The KafkaNodePools feature gate introduced a new KafkaNodePool custom resource that enables the configuration of different pools of Apache Kafka nodes.

A node pool refers to a distinct group of Kafka nodes within a Kafka cluster. Each pool has its own unique configuration, which includes mandatory settings such as the number of replicas, storage configuration, and a list of assigned roles. You can assign the controller role, broker role, or both roles to all nodes in the pool using the .spec.roles property. When used with a ZooKeeper-based Apache Kafka cluster, it must be set to the broker role. When used with a KRaft-based Apache Kafka cluster, it can be set to broker, controller, or both.

In addition, a node pool can have its own configuration of resource requests and limits, Java JVM options, and resource templates. Configuration options not set in the KafkaNodePool resource are inherited from the Kafka custom resource.

The KafkaNodePool resources use a strimzi.io/cluster label to indicate to which Kafka cluster they belong. The label must be set to the name of the Kafka custom resource. The Kafka resource configuration must also include the strimzi.io/node-pools: enabled annotation, which is required when using node pools.

Examples of the KafkaNodePool resources can be found in the example configuration files provided by Streams for Apache Kafka.

Downgrading from KafkaNodePools

If your cluster already uses KafkaNodePool custom resources, and you wish to downgrade to an older version of Streams for Apache Kafka that does not support them or with the KafkaNodePools feature gate disabled, you must first migrate from KafkaNodePool custom resources to managing Kafka nodes using only Kafka custom resources. For more information, see the instructions for reversing a migration to node pools.

8.1.6. UnidirectionalTopicOperator feature gate

The UnidirectionalTopicOperator feature gate introduced a unidirectional topic management mode for creating Kafka topics using the KafkaTopic resource. Unidirectional mode is compatible with using KRaft for cluster management. With unidirectional mode, you create Kafka topics using the KafkaTopic resource, which are then managed by the Topic Operator. Any configuration changes to a topic outside the KafkaTopic resource are reverted. For more information on topic management, see Section 10.1, “Topic management”.

8.1.7. UseKRaft feature gate

The UseKRaft feature gate introduced the KRaft (Kafka Raft metadata) mode for running Apache Kafka clusters without ZooKeeper. ZooKeeper and KRaft are mechanisms used to manage metadata and coordinate operations in Kafka clusters. KRaft mode eliminates the need for an external coordination service like ZooKeeper. In KRaft mode, Kafka nodes take on the roles of brokers, controllers, or both. They collectively manage the metadata, which is replicated across partitions. Controllers are responsible for coordinating operations and maintaining the cluster’s state. For more information on using KRraft, see Chapter 5, Using Kafka in KRaft mode.

8.2. Stable feature gates (Beta)

Stable feature gates have reached a beta level of maturity, and are generally enabled by default for all users. Stable feature gates are production-ready, but they can still be disabled. Currently, there are no beta level feature gates.

8.3. Early access feature gates (Alpha)

Early access feature gates have not yet reached the beta stage, and are disabled by default. An early access feature gate provides an opportunity for assessment before its functionality is permanently incorporated into Streams for Apache Kafka.

The ContinueReconciliationOnManualRollingUpdateFailure feature gate has a default state of disabled.

The ContinueReconciliationOnManualRollingUpdateFailure feature gate allows the Cluster Operator to continue a reconciliation if the manual rolling update of the operands fails. It applies to the following operands that support manual rolling updates using the strimzi.io/manual-rolling-update annotation:

  • ZooKeeper
  • Kafka
  • Kafka Connect
  • Kafka MirrorMaker 2

Continuing the reconciliation after a manual rolling update failure allows the operator to recover from various situations that might prevent the update from succeeding. For example, a missing Persistent Volume Claim (PVC) or Persistent Volume (PV) might cause the manual rolling update to fail. However, the PVCs and PVs are created only in a later stage of the reconciliation. By continuing the reconciliation after this failure, the process can recreate the missing PVC or PV and recover.

The ContinueReconciliationOnManualRollingUpdateFailure feature gate is used by the Cluster Operator. It is ignored by the User and Topic Operators.

Enabling the ContinueReconciliationOnManualRollingUpdateFailure feature gate

To enable the ContinueReconciliationOnManualRollingUpdateFailure feature gate, specify +ContinueReconciliationOnManualRollingUpdateFailure in the STRIMZI_FEATURE_GATES environment variable in the Cluster Operator configuration.

8.4. Enabling feature gates

To modify a feature gate’s default state, use the STRIMZI_FEATURE_GATES environment variable in the operator’s configuration. You can modify multiple feature gates using this single environment variable. Specify a comma-separated list of feature gate names and prefixes. A + prefix enables the feature gate and a - prefix disables it.

Example feature gate configuration that enables FeatureGate1 and disables FeatureGate2

env:
  - name: STRIMZI_FEATURE_GATES
    value: +FeatureGate1,-FeatureGate2
Copy to Clipboard Toggle word wrap

8.5. Feature gate releases

Feature gates have three stages of maturity:

  • Alpha — typically disabled by default
  • Beta — typically enabled by default
  • General Availability (GA) — typically always enabled

Alpha stage features might be experimental or unstable, subject to change, or not sufficiently tested for production use. Beta stage features are well tested and their functionality is not likely to change. GA stage features are stable and should not change in the future. Alpha and beta stage features are removed if they do not prove to be useful.

  • The ControlPlaneListener feature gate moved to GA stage in Streams for Apache Kafka 2.3. It is now permanently enabled and cannot be disabled.
  • The ServiceAccountPatching feature gate moved to GA stage in Streams for Apache Kafka 2.3. It is now permanently enabled and cannot be disabled.
  • The UseStrimziPodSets feature gate moved to GA stage in Streams for Apache Kafka 2.5 and the support for StatefulSets is completely removed. It is now permanently enabled and cannot be disabled.
  • The StableConnectIdentities feature gate moved to GA stage in Streams for Apache Kafka 2.7. It is now permanently enabled and cannot be disabled.
  • The KafkaNodePools feature gate moved to GA stage in Streams for Apache Kafka 2.8. It is now permanently enabled and cannot be disabled. To use KafkaNodePool resources, you still need to use the strimzi.io/node-pools: enabled annotation on the Kafka custom resources.
  • The UnidirectionalTopicOperator feature gate moved to GA stage in Streams for Apache Kafka 2.8. It is now permanently enabled and cannot be disabled.
  • The UseKRaft feature gate moved to GA stage in Streams for Apache Kafka 2.8. It is now permanently enabled and cannot be disabled. To use KRaft (ZooKeeper-less Apache Kafka), you still need to use the strimzi.io/kraft: enabled annotation on the Kafka custom resources or migrate from an existing ZooKeeper-based cluster.
  • The ContinueReconciliationOnManualRollingUpdateFailure feature was introduced in Streams for Apache Kafka 2.8 and is disabled by default.
Note

Feature gates might be removed when they reach GA. This means that the feature was incorporated into the Streams for Apache Kafka core features and can no longer be disabled.

Expand
Table 8.1. Feature gates and the Streams for Apache Kafka versions when they moved to alpha, beta, or GA
Feature gateAlphaBetaGA

ControlPlaneListener

1.8

2.0

2.3

ServiceAccountPatching

1.8

2.0

2.3

UseStrimziPodSets

2.1

2.3

2.5

UseKRaft

2.2

2.7

2.8

StableConnectIdentities

2.4

2.6

2.7

KafkaNodePools

2.5

2.7

2.8

UnidirectionalTopicOperator

2.5

2.7

2.8

ContinueReconciliationOnManualRollingUpdateFailure

2.8

-

-

If a feature gate is enabled, you may need to disable it before upgrading or downgrading from a specific Streams for Apache Kafka version (or first upgrade / downgrade to a version of Streams for Apache Kafka where it can be disabled). The following table shows which feature gates you need to disable when upgrading or downgrading Streams for Apache Kafka versions.

Expand
Table 8.2. Feature gates to disable when upgrading or downgrading Streams for Apache Kafka
Disable Feature gateUpgrading from Streams for Apache Kafka versionDowngrading to Streams for Apache Kafka version

ControlPlaneListener

1.7 and earlier

1.7 and earlier

UseStrimziPodSets

-

2.0 and earlier

StableConnectIdentities

-

2.3 and earlier

Retour au début
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2025 Red Hat