diff --git a/docs/developer_docs/api-reference/cluster.md b/docs/developer_docs/api-reference/cluster.md index b14e2d0f76ae..5bcb31a6d9bc 100644 --- a/docs/developer_docs/api-reference/cluster.md +++ b/docs/developer_docs/api-reference/cluster.md @@ -1346,7 +1346,7 @@ ComponentAvailable
roles
roles
-(Appears on:ComponentDefinitionSpec) -
-ReplicaRole represents a role that can be assumed by a component instance.
-Field | -Description | -
---|---|
-name - -string - - |
-
- Defines the role’s identifier. It is used to set the “apps.kubeblocks.io/role” label value -on the corresponding object. -This field is immutable once set. - |
-
-serviceable - -bool - - |
-
-(Optional)
- Indicates whether a replica assigned this role is capable of providing services. -This field is immutable once set. - |
-
-writable - -bool - - |
-
-(Optional)
- Determines if a replica in this role has the authority to perform write operations. -A writable replica can modify data, handle update operations. -This field is immutable once set. - |
-
-votable - -bool - - |
-
-(Optional)
- Specifies whether a replica with this role has voting rights. -In distributed systems, this typically means the replica can participate in consensus decisions, -configuration changes, or other processes that require a quorum. -This field is immutable once set. - |
-
@@ -28363,9 +28290,6 @@ InstanceSetStatus
string
alias)-(Appears on:ReplicaRole) -
AccessMode defines SVC access mode enums.
-(Appears on:InstanceSetSpec, MemberStatus) +(Appears on:ComponentDefinitionSpec, InstanceSetSpec, MemberStatus)
ReplicaRole represents a role that can be assigned to a component instance, defining its behavior and responsibilities.
- Defines the role name of the replica. +Name defines the role’s unique identifier. This value is used to set the “apps.kubeblocks.io/role” label +on the corresponding object to identify its role. +For example, common role names include: +- “leader”: The primary/master instance that handles write operations +- “follower”: Secondary/replica instances that replicate data from the leader +- “learner”: Read-only instances that don’t participate in elections +This field is immutable once set. |
|
-accessMode + required - -AccessMode - +bool |
- Specifies the service capabilities of this member. +(Optional) +Required indicates if at least one replica with this role must exist for the component to be considered +operationally running. For example, a leader role may be required for the component to function. +This field is immutable once set. |
-canVote + updatePriority + +int + + |
+
+(Optional)
+ UpdatePriority determines the order in which pods with different roles are updated. +Pods are sorted by this priority (higher numbers = higher priority) and updated accordingly. +Roles with the highest priority will be updated last. +The default priority is 0. +For example: +- Leader role may have priority 2 (updated last) +- Follower role may have priority 1 (updated before leader) +- Learner role may have priority 0 (updated first) +This field is immutable once set. + |
+
+participatesInQuorum bool bool |
(Optional)
- Indicates if this member has voting rights. +ParticipatesInQuorum indicates if pods with this role are counted when determining quorum. +This affects update strategies that need to maintain quorum for availability. +For example, in a 5-pod component where: +- 2 learner pods (participatesInQuorum=false) +- 2 follower pods (participatesInQuorum=true) +- 1 leader pod (participatesInQuorum=true) +The quorum size would be 3 (based on the 3 participating pods), allowing parallel updates +of 2 learners and 1 follower while maintaining quorum. +This field is immutable once set. |
-isLeader + switchoverBeforeUpdate bool |
(Optional)
- Determines if this member is the leader. +SwitchoverBeforeUpdate indicates if a role switchover operation should be performed before +updating or scaling in pods with this role. This is typically used for leader roles to +ensure minimal disruption during updates. +This field is immutable once set. |