Skip to content

Commit

Permalink
docs(auto-rebalance): format fixes on API descriptions for auto-rebal…
Browse files Browse the repository at this point in the history
…ance properties (#10699)

Signed-off-by: prmellor <[email protected]>
  • Loading branch information
PaulRMellor authored Oct 11, 2024
1 parent cd91824 commit 701aab1
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public class KafkaAutoRebalanceConfiguration implements UnknownPropertyPreservin
private LocalObjectReference template;
private Map<String, Object> additionalProperties;

@Description("Mode for which running the auto-rebalancing on scaling, when brokers are added or removed. " +
"The supported modes are `add-brokers` and `remove-brokers`.\n")
@Description("Specifies the mode for automatically rebalancing when brokers are added or removed. " +
"Supported modes are `add-brokers` and `remove-brokers`. \n")
@JsonProperty(required = true)
public KafkaRebalanceMode getMode() {
return mode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ public class KafkaAutoRebalanceStatus implements UnknownPropertyPreserving {
private List<KafkaAutoRebalanceStatusBrokers> modes;
private Map<String, Object> additionalProperties;

@Description("The current state of the auto-rebalancing operation. Possible values are: \n\n" +
"* Idle as the initial state when an auto-rebalancing is requested or as final state when it completes or fails.\n" +
"* RebalanceOnScaleDown if a rebalancing related to a scale down operation is running.\n" +
"* RebalanceOnScaleUp if a rebalancing related to a scale up operation is running.\n")
@Description("The current state of an auto-rebalancing operation. Possible values are: \n\n" +
"* `Idle` as the initial state when an auto-rebalancing is requested or as final state when it completes or fails.\n" +
"* `RebalanceOnScaleDown` if an auto-rebalance related to a scale-down operation is running.\n" +
"* `RebalanceOnScaleUp` if an auto-rebalance related to a scale-up operation is running.")
public KafkaAutoRebalanceState getState() {
return state;
}
Expand All @@ -56,10 +56,10 @@ public void setLastTransitionTime(String lastTransitionTime) {
this.lastTransitionTime = lastTransitionTime;
}

@Description("List of the modes for which there is an auto-rebalancing operation already running or queued. " +
"For each mode entry, which could be for add-brokers or remove-brokers, it contains either:" +
"- the brokers' IDs relevant to the current ongoing auto-rebalance, or" +
"- the brokers' IDs relevant to a queued auto-rebalance (if a previous auto-rebalance is still in progress)")
@Description("List of modes where an auto-rebalancing operation is either running or queued. \n" +
"Each mode entry (`add-brokers` or `remove-brokers`) includes one of the following: \n\n" +
"* Broker IDs for a current auto-rebalance. \n" +
"* Broker IDs for a queued auto-rebalance (if a previous rebalance is still in progress).")
public List<KafkaAutoRebalanceStatusBrokers> getModes() {
return modes;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public void setMode(KafkaRebalanceMode mode) {
this.mode = mode;
}

@Description("List of brokers' IDs involved in an auto-rebalancing operation related to current mode. " +
"it contains either: " +
"- the brokers' IDs relevant to the current ongoing auto-rebalance, or " +
"- the brokers' IDs relevant to a queued auto-rebalance (if a previous auto-rebalance is still in progress)")
@Description("List of broker IDs involved in an auto-rebalancing operation related to the current mode. \n" +
"The list contains one of the following: \n\n" +
"* Broker IDs for a current auto-rebalance. \n" +
"* Broker IDs for a queued auto-rebalance (if a previous auto-rebalance is still in progress). \n")
public List<Integer> getBrokers() {
return brokers;
}
Expand Down
24 changes: 16 additions & 8 deletions documentation/modules/appendix_crds.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2031,7 +2031,7 @@ Used in: xref:type-CruiseControlSpec-{context}[`CruiseControlSpec`]
|Property |Property type |Description
|mode
|string (one of [remove-brokers, full, add-brokers])
|Mode for which running the auto-rebalancing on scaling, when brokers are added or removed. The supported modes are `add-brokers` and `remove-brokers`.
|Specifies the mode for automatically rebalancing when brokers are added or removed. Supported modes are `add-brokers` and `remove-brokers`.

|template
|xref:type-LocalObjectReference-{context}[`LocalObjectReference`]
Expand Down Expand Up @@ -2366,18 +2366,21 @@ Used in: xref:type-KafkaStatus-{context}[`KafkaStatus`]
|Property |Property type |Description
|state
|string (one of [RebalanceOnScaleUp, Idle, RebalanceOnScaleDown])
|The current state of the auto-rebalancing operation. Possible values are:

* Idle as the initial state when an auto-rebalancing is requested or as final state when it completes or fails.
* RebalanceOnScaleDown if a rebalancing related to a scale down operation is running.
* RebalanceOnScaleUp if a rebalancing related to a scale up operation is running.
|The current state of an auto-rebalancing operation. Possible values are:

* `Idle` as the initial state when an auto-rebalancing is requested or as final state when it completes or fails.
* `RebalanceOnScaleDown` if an auto-rebalance related to a scale-down operation is running.
* `RebalanceOnScaleUp` if an auto-rebalance related to a scale-up operation is running.
|lastTransitionTime
|string
|The timestamp of the latest auto-rebalancing state update.
|modes
|xref:type-KafkaAutoRebalanceStatusBrokers-{context}[`KafkaAutoRebalanceStatusBrokers`] array
|List of the modes for which there is an auto-rebalancing operation already running or queued. For each mode entry, which could be for add-brokers or remove-brokers, it contains either:- the brokers' IDs relevant to the current ongoing auto-rebalance, or- the brokers' IDs relevant to a queued auto-rebalance (if a previous auto-rebalance is still in progress).
|List of modes where an auto-rebalancing operation is either running or queued.
Each mode entry (`add-brokers` or `remove-brokers`) includes one of the following:

* Broker IDs for a current auto-rebalance.
* Broker IDs for a queued auto-rebalance (if a previous rebalance is still in progress).
|====

[id='type-KafkaAutoRebalanceStatusBrokers-{context}']
Expand All @@ -2394,7 +2397,12 @@ Used in: xref:type-KafkaAutoRebalanceStatus-{context}[`KafkaAutoRebalanceStatus`
|Mode for which there is an auto-rebalancing operation in progress or queued, when brokers are added or removed. The possible modes are `add-brokers` and `remove-brokers`.
|brokers
|integer array
|List of brokers' IDs involved in an auto-rebalancing operation related to current mode. it contains either: - the brokers' IDs relevant to the current ongoing auto-rebalance, or - the brokers' IDs relevant to a queued auto-rebalance (if a previous auto-rebalance is still in progress).
|List of broker IDs involved in an auto-rebalancing operation related to the current mode.
The list contains one of the following:

* Broker IDs for a current auto-rebalance.
* Broker IDs for a queued auto-rebalance (if a previous auto-rebalance is still in progress).

|====

[id='type-KafkaConnect-{context}']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6334,8 +6334,7 @@ spec:
- full
- add-brokers
- remove-brokers
description: |
Mode for which running the auto-rebalancing on scaling, when brokers are added or removed. The supported modes are `add-brokers` and `remove-brokers`.
description: "Specifies the mode for automatically rebalancing when brokers are added or removed. Supported modes are `add-brokers` and `remove-brokers`. \n"
template:
type: object
properties:
Expand Down Expand Up @@ -8215,7 +8214,7 @@ spec:
- Idle
- RebalanceOnScaleDown
- RebalanceOnScaleUp
description: "The current state of the auto-rebalancing operation. Possible values are: \n\n* Idle as the initial state when an auto-rebalancing is requested or as final state when it completes or fails.\n* RebalanceOnScaleDown if a rebalancing related to a scale down operation is running.\n* RebalanceOnScaleUp if a rebalancing related to a scale up operation is running.\n"
description: "The current state of an auto-rebalancing operation. Possible values are: \n\n* `Idle` as the initial state when an auto-rebalancing is requested or as final state when it completes or fails.\n* `RebalanceOnScaleDown` if an auto-rebalance related to a scale-down operation is running.\n* `RebalanceOnScaleUp` if an auto-rebalance related to a scale-up operation is running."
lastTransitionTime:
type: string
description: The timestamp of the latest auto-rebalancing state update.
Expand All @@ -8235,7 +8234,7 @@ spec:
type: array
items:
type: integer
description: "List of brokers' IDs involved in an auto-rebalancing operation related to current mode. it contains either: - the brokers' IDs relevant to the current ongoing auto-rebalance, or - the brokers' IDs relevant to a queued auto-rebalance (if a previous auto-rebalance is still in progress)."
description: "List of the modes for which there is an auto-rebalancing operation already running or queued. For each mode entry, which could be for add-brokers or remove-brokers, it contains either:- the brokers' IDs relevant to the current ongoing auto-rebalance, or- the brokers' IDs relevant to a queued auto-rebalance (if a previous auto-rebalance is still in progress)."
description: "List of broker IDs involved in an auto-rebalancing operation related to the current mode. \nThe list contains one of the following: \n\n* Broker IDs for a current auto-rebalance. \n* Broker IDs for a queued auto-rebalance (if a previous auto-rebalance is still in progress). \n"
description: "List of modes where an auto-rebalancing operation is either running or queued. \nEach mode entry (`add-brokers` or `remove-brokers`) includes one of the following: \n\n* Broker IDs for a current auto-rebalance. \n* Broker IDs for a queued auto-rebalance (if a previous rebalance is still in progress)."
description: The status of an auto-rebalancing triggered by a cluster scaling request.
description: "The status of the Kafka and ZooKeeper clusters, and Topic Operator."
9 changes: 4 additions & 5 deletions packaging/install/cluster-operator/040-Crd-kafka.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6333,8 +6333,7 @@ spec:
- full
- add-brokers
- remove-brokers
description: |
Mode for which running the auto-rebalancing on scaling, when brokers are added or removed. The supported modes are `add-brokers` and `remove-brokers`.
description: "Specifies the mode for automatically rebalancing when brokers are added or removed. Supported modes are `add-brokers` and `remove-brokers`. \n"
template:
type: object
properties:
Expand Down Expand Up @@ -8214,7 +8213,7 @@ spec:
- Idle
- RebalanceOnScaleDown
- RebalanceOnScaleUp
description: "The current state of the auto-rebalancing operation. Possible values are: \n\n* Idle as the initial state when an auto-rebalancing is requested or as final state when it completes or fails.\n* RebalanceOnScaleDown if a rebalancing related to a scale down operation is running.\n* RebalanceOnScaleUp if a rebalancing related to a scale up operation is running.\n"
description: "The current state of an auto-rebalancing operation. Possible values are: \n\n* `Idle` as the initial state when an auto-rebalancing is requested or as final state when it completes or fails.\n* `RebalanceOnScaleDown` if an auto-rebalance related to a scale-down operation is running.\n* `RebalanceOnScaleUp` if an auto-rebalance related to a scale-up operation is running."
lastTransitionTime:
type: string
description: The timestamp of the latest auto-rebalancing state update.
Expand All @@ -8234,7 +8233,7 @@ spec:
type: array
items:
type: integer
description: "List of brokers' IDs involved in an auto-rebalancing operation related to current mode. it contains either: - the brokers' IDs relevant to the current ongoing auto-rebalance, or - the brokers' IDs relevant to a queued auto-rebalance (if a previous auto-rebalance is still in progress)."
description: "List of the modes for which there is an auto-rebalancing operation already running or queued. For each mode entry, which could be for add-brokers or remove-brokers, it contains either:- the brokers' IDs relevant to the current ongoing auto-rebalance, or- the brokers' IDs relevant to a queued auto-rebalance (if a previous auto-rebalance is still in progress)."
description: "List of broker IDs involved in an auto-rebalancing operation related to the current mode. \nThe list contains one of the following: \n\n* Broker IDs for a current auto-rebalance. \n* Broker IDs for a queued auto-rebalance (if a previous auto-rebalance is still in progress). \n"
description: "List of modes where an auto-rebalancing operation is either running or queued. \nEach mode entry (`add-brokers` or `remove-brokers`) includes one of the following: \n\n* Broker IDs for a current auto-rebalance. \n* Broker IDs for a queued auto-rebalance (if a previous rebalance is still in progress)."
description: The status of an auto-rebalancing triggered by a cluster scaling request.
description: "The status of the Kafka and ZooKeeper clusters, and Topic Operator."

0 comments on commit 701aab1

Please sign in to comment.