Enum KafkaMetadataState

java.lang.Object
java.lang.Enum<KafkaMetadataState>
io.strimzi.api.kafka.model.kafka.KafkaMetadataState
All Implemented Interfaces:
Serializable, Comparable<KafkaMetadataState>

public enum KafkaMetadataState extends Enum<KafkaMetadataState>
Represents where metadata are stored for the current cluster (ZooKeeper or KRaft) or if a migration from ZooKeeper to KRaft is in progress and in which phase
  • Enum Constant Details

    • ZooKeeper

      public static final KafkaMetadataState ZooKeeper
      The metadata are stored in ZooKeeper. The strimzi.io/kraft: disabled annotation is set on the Kafka resource. Waiting for the user to create the controllers pool and start the migration. Transitions to:
      ZooKeeper
      If the user hasn't created the controller node pool yet or set the strimzi.io/kraft: migration annotation, or set it to invalid value (e.g. enabled or rollback)
      KRaftMigration
      If user has created the controller node pool and set the strimzi.io/kraft: migration annotation. The controllers are deployed with ZooKeeper migration enabled and connection to it.
    • KRaftMigration

      public static final KafkaMetadataState KRaftMigration
      Pre-migration phase is running and migration is going to start. The KRaft controllers were rolled and are now running with ZooKeeper migration enabled, and they are connected to it. Next expected step is to roll brokers with ZooKeeper migration enabled and connection information to controllers configured. Unless user wants to rollback. After rolling brokers, the metadata migration starts. This state represents when it is in progress as well. A first reconcile on this state would roll the brokers, next reconciliations will be used to check the migration status on corresponding metrics. Transitions to:
      KRaftMigration
      If the user keeps the strimzi.io/kraft: migration annotation. The brokers are rolled with ZooKeeper migration enabled and connection information to controllers configured. It is also in this phase, when the migration is still ongoing or has invalid annotation value (enabled and rollback)
      ZooKeeper
      If the user wants to rollback and set strimzi.io/kraft: disabled annotation. The brokers are rolled back with ZooKeeper migration disabled and no connection to controllers.
      KRaftDualWriting
      Metadata migration finished. The cluster is in "dual write" mode. Metadata are written on both ZooKeeper and KRaft controllers.
    • KRaftDualWriting

      public static final KafkaMetadataState KRaftDualWriting
      The cluster is working in "dual write" mode. Metadata are written on both ZooKeeper and KRaft controllers. Next expected step is to finalize the migration and disable ZooKeeper. Transitions to:
      KRaftDualWriting
      If user applies any invalid values for this state on the strimzi.io/kraft annotation (enabled or rollback)
      ZooKeeper
      If the user wants to rollback and sets strimzi.io/kraft: disabled annotation. The brokers are rolled back with ZooKeeper migration disabled and no connection to controllers.
      KRaftPostMigration
      The user keeps the strimzi.io/kraft: migration annotation. The brokers are rolled with ZooKeeper migration disabled and without connection to it anymore.
    • KRaftPostMigration

      public static final KafkaMetadataState KRaftPostMigration
      There is a post-migration phase running. The brokers were rolled and are now running with ZooKeeper migration disabled and without any connection to it anymore. Next expected step is to finalize the migration and disable ZooKeeper on controllers as well. Transitions to:
      KraftDualWriting
      If user applies the strimzi.io/kraft: rollback annotation because they want to rollback to a ZooKeeper-based cluster.
      KRaftPostMigration
      If user applies any invalid values for this state on the strimzi.io/kraft annotation.
      PreKRaft
      The strimzi.io/kraft: enabled is still in place, and after brokers, the operator has rolled controllers with ZooKeeper migration disabled and no connection to it anymore. ZooKeeper pods are still running.
    • PreKRaft

      public static final KafkaMetadataState PreKRaft
      The matadata are stored in KRaft. The strimzi.io/kraft: enabled annotation is set on the Kafka resource. ZooKeeper pods are still running and they will be removed during migration finalization when moving to KRaft. Transitions to:
      KRaft
      The strimzi.io/kraft: enabled is still in place, and after brokers, the operator has rolled controllers with ZooKeeper migration disabled and no connection to it anymore. ZooKeeper pods are also deleted.
    • KRaft

      public static final KafkaMetadataState KRaft
      The metadata are stored in KRaft. The strimzi.io/kraft: enabled annotation is set on the Kafka resource. Transitions to:
      KRaft
      If the user sets strimzi.io/kraft: migration annotation but, of course, it's not possible because the cluster is already KRaft-based.
      KRaft
      If the user sets strimzi.io/kraft: rollback or disabled annotation which can't be used to rollback to be ZooKeeper-based from this state.
  • Method Details

    • values

      public static KafkaMetadataState[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static KafkaMetadataState valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • forValue

      public static KafkaMetadataState forValue(String value)
    • toValue

      public String toValue()