You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, KB assumes a special role "leader", inferred from a role that has serviceable and writable equals true. This "leader" role does not seem to be proper in some cases:
When updating pods with memberUpdateStrategy equals to bestEffortParallel, we need to determine quorum to make service available. Currently quorum is deduced by the votable role. However, there can be roles that are votable but do not participate in quorum.
When determining if a component is available, currently we check if there's a leader. That's not always the case, e.g. when a component is read-only and no leader is required.
When doing upgrade or sacle in, currenly we check if there's leader pod that needs switchover. That's also not always true because other roles may need switchover too.
As per suggested in #7757, I'll refactor a role to include the following fields:
// 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.//// 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.//// +kubebuilder:default=0// +optionalUpdatePriorityint`json:"updatePriority"`// 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.//// +kubebuilder:default=false// +optionalParticipatesInQuorumbool`json:"participatesInQuorum"`// 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.//// +kubebuilder:default=false// +optionalSwitchoverBeforeUpdatebool`json:"switchoverBeforeUpdate"`
Update: Required field is deleted since the availability of a component will be determined in the Available probe.
The text was updated successfully, but these errors were encountered:
Currently, KB assumes a special role "leader", inferred from a role that has
serviceable
andwritable
equals true. This "leader" role does not seem to be proper in some cases:memberUpdateStrategy
equals tobestEffortParallel
, we need to determine quorum to make service available. Currently quorum is deduced by thevotable
role. However, there can be roles that are votable but do not participate in quorum.As per suggested in #7757, I'll refactor a role to include the following fields:
Update:
Required
field is deleted since the availability of a component will be determined in the Available probe.The text was updated successfully, but these errors were encountered: