{
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "The specification of the Kafka rebalance.",
      "properties": {
        "brokers": {
          "description": "The list of newly added brokers in case of scaling up or the ones to be removed in case of scaling down to use for rebalancing. This list can be used only with rebalancing mode `add-brokers` and `removed-brokers`. It is ignored with `full` mode.",
          "items": {
            "type": "integer"
          },
          "type": "array"
        },
        "concurrentIntraBrokerPartitionMovements": {
          "description": "The upper bound of ongoing partition replica movements between disks within each broker. Default is 2.",
          "minimum": 0,
          "type": "integer"
        },
        "concurrentLeaderMovements": {
          "description": "The upper bound of ongoing partition leadership movements. Default is 1000.",
          "minimum": 0,
          "type": "integer"
        },
        "concurrentPartitionMovementsPerBroker": {
          "description": "The upper bound of ongoing partition replica movements going into/out of each broker. Default is 5.",
          "minimum": 0,
          "type": "integer"
        },
        "excludedTopics": {
          "description": "A regular expression where any matching topics will be excluded from the calculation of optimization proposals. This expression will be parsed by the java.util.regex.Pattern class; for more information on the supported format consult the documentation for that class.",
          "type": "string"
        },
        "goals": {
          "description": "A list of goals, ordered by decreasing priority, to use for generating and executing the rebalance proposal. The supported goals are available at https://github.com/linkedin/cruise-control#goals. If an empty goals list is provided, the goals declared in the default.goals Cruise Control configuration parameter are used.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "mode": {
          "description": "Mode to run the rebalancing. The supported modes are `full`, `add-brokers`, `remove-brokers`.\nIf not specified, the `full` mode is used by default. \n\n* `full` mode runs the rebalancing across all the brokers in the cluster.\n* `add-brokers` mode can be used after scaling up the cluster to move some replicas to the newly added brokers.\n* `remove-brokers` mode can be used before scaling down the cluster to move replicas out of the brokers to be removed.\n* `remove-disks` mode can be used to move data across the volumes within the same broker\n.",
          "enum": [
            "full",
            "add-brokers",
            "remove-brokers",
            "remove-disks"
          ],
          "type": "string"
        },
        "moveReplicasOffVolumes": {
          "description": "List of brokers and their corresponding volumes from which replicas need to be moved.",
          "items": {
            "properties": {
              "brokerId": {
                "description": "ID of the broker that contains the disk from which you want to move the partition replicas.",
                "type": "integer"
              },
              "volumeIds": {
                "description": "IDs of the disks from which the partition replicas need to be moved.",
                "items": {
                  "type": "integer"
                },
                "minItems": 1,
                "type": "array"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "minItems": 1,
          "type": "array"
        },
        "rebalanceDisk": {
          "description": "Enables intra-broker disk balancing, which balances disk space utilization between disks on the same broker. Only applies to Kafka deployments that use JBOD storage with multiple disks. When enabled, inter-broker balancing is disabled. Default is false.",
          "type": "boolean"
        },
        "replicaMovementStrategies": {
          "description": "A list of strategy class names used to determine the execution order for the replica movements in the generated optimization proposal. By default BaseReplicaMovementStrategy is used, which will execute the replica movements in the order that they were generated.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "replicationThrottle": {
          "description": "The upper bound, in bytes per second, on the bandwidth used to move replicas. There is no limit by default.",
          "minimum": 0,
          "type": "integer"
        },
        "skipHardGoalCheck": {
          "description": "Whether to allow the hard goals specified in the Kafka CR to be skipped in optimization proposal generation. This can be useful when some of those hard goals are preventing a balance solution being found. Default is false.",
          "type": "boolean"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "The status of the Kafka rebalance.",
      "properties": {
        "conditions": {
          "description": "List of status conditions.",
          "items": {
            "properties": {
              "lastTransitionTime": {
                "description": "Last time the condition of a type changed from one status to another. The required format is 'yyyy-MM-ddTHH:mm:ssZ', in the UTC time zone.",
                "type": "string"
              },
              "message": {
                "description": "Human-readable message indicating details about the condition's last transition.",
                "type": "string"
              },
              "reason": {
                "description": "The reason for the condition's last transition (a single word in CamelCase).",
                "type": "string"
              },
              "status": {
                "description": "The status of the condition, either True, False or Unknown.",
                "type": "string"
              },
              "type": {
                "description": "The unique identifier of a condition, used to distinguish between other conditions in the resource.",
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "observedGeneration": {
          "description": "The generation of the CRD that was last reconciled by the operator.",
          "type": "integer"
        },
        "optimizationResult": {
          "description": "A JSON object describing the optimization result.",
          "type": "object",
          "x-kubernetes-preserve-unknown-fields": true
        },
        "progress": {
          "description": "A reference to Config Map with the progress information.",
          "properties": {
            "rebalanceProgressConfigMap": {
              "description": "The name of the `ConfigMap` containing information related to the progress of a partition rebalance.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "sessionId": {
          "description": "The session identifier for requests to Cruise Control pertaining to this KafkaRebalance resource. This is used by the Kafka Rebalance operator to track the status of ongoing rebalancing operations.",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
