Repository navigation
Implementation of basic controller logic - #20
Closed
Kirill Ilin (sircthulhu) wants to merge 2 commits into
Closed
Kirill Ilin (sircthulhu) wants to merge 2 commits into
Kirill Ilin (sircthulhu) wants to merge 2 commits into
Conversation
- sts, svc and cm are created by operator - "Initialized" status is being set and updated - etcd cluster successfully bootstraps
Collaborator
Author
|
Broke things up because of squash and git branch from webhooks branch. Will open new PR with cherry picked commit. |
Terry Tang (saymololy)
pushed a commit
to saymololy/etcd-operator
that referenced
this pull request
Nov 2, 2026
…zystack#20) ensurePod previously returned the existing Pod regardless of whose EtcdMember owned it. Mirror ensurePVC's safety check: a podOwnedBy helper that requires an EtcdMember owner ref whose UID matches the current EtcdMember; refuse adoption otherwise with an error that prompts controller-runtime to back off and retry on the next reconcile. Failure modes the gate now prevents: - Same-named Pod left behind by a deleted prior EtcdMember whose GC hasn't completed yet. Adoption would have the operator reconciling a Pod whose spec was written by a different controller generation. - Pod with no owner refs (manually created, or leaked from a prior incarnation). Adoption would silently bind unowned state. - Pod owned by some other resource (a ReplicaSet, another operator's CR). Adoption would mount foreign state into the etcd member. Less load-bearing than the PVC equivalent — Pod corruption is recoverable since the operator can drop and recreate the Pod — but the inconsistency was a footgun: future Pod-recreate flows (in-place version upgrade) would need this gate to be safe. Test trio mirrors TestEnsurePVC_RefusesStaleOwner / RefusesPVCWith NoOwnerRefs / RefusesPVCOwnedByOther / AcceptsOwnPVC against Pods. Closes cozystack#8. Signed-off-by: Timofei Larkin <[email protected]>
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.
Controller now can successfully bootstrap etcd cluster :)