Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #1060
The bootstrap controller is now chosen once and recorded in the KafkaCluster status:
status.kraftBootstrapControllerNodeId. At the first reconcile the operator sets it to the lowest controllernode.id, and never changes it afterwards. If the cached KafkaCluster has no value yet, the operator reads the live object before choosing, so an out-of-date cache can't lead to a different choice.--standalone. All other controllers, including those in role groups added later, format with--no-initial-controllersand join through thequorum-managersidecar. Adding a controller role group no longer restarts the existing controllers.pod_descriptors()into a reusable function,pod_node_ids(). Validation uses it to pick the bootstrap controller.Behavior changes
Known limitations
Tests
node.idadded later;node.idis chosen;--standalonewhen none is stored.operations-kraft): a new step adds a controller role group (extra) that hashes lower thandefault. It checks that the quorum has 4 voters when queried through both role groups, and thatstatus.kraftBootstrapControllerNodeIdstill points todefault-0. The next step removesextraagain, which also covers removing a voter.Docs
kraft-controller.adocdescribes how the bootstrap controller is chosen and recorded.Definition of Done Checklist
Author
Reviewer
Acceptance
type/deprecationlabel & add to the deprecation scheduletype/experimentallabel & add to the experimental features tracker