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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Leader election to backup-restore and allow only backup-restore Leader to take and uploads the snapshots. #353
Add Leader election to backup-restore and allow only backup-restore Leader to take and uploads the snapshots. #353
Changes from 1 commit
dd24af4
d078ef9
b08a8a0
b71b64b
406d798
00d5709
9ef6153
e772e7f
a429301
3e5f65d
f836e65
64e21fc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the first endpoint always used here, is it guaranteed to be our sidecar's endpoint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is the endpoint of
etcd
which comes fom the etcdConnectionConfig, I think it should be passed through environment variable but I'm also not so sure how and which PR will take care of this. so this thing need to be discussed and taken care.cc @abdasgupta @shreyas-s-rao @timuthy @aaronfern
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I know is that Endpoints may have different values like private IP, public IP, proxy IP. So, it's an array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, endpoints of etcd comes as an array but actually Question was "How to make sure that endpoints present at 0th index in a array is always endpoint of their corresponding etcd?" @amshuman-kr also raised this question.
answer to this questions could be that etcd endpoints should passed as environment variable to their corresponding sidecar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing different config to different sidecars will be hard given that we have only one
StatefulSet
which creates all the pods of the ETCD cluster.The member sidecars need to still distinguish between themselves and this can be achieved by passing the pod name (which would also be the ETCD member name according to the proposal) as an environment variable using
fieldRef
mechanism.The code here should ideally either iterate through the member names and select the correct endpoint of the member by comparing with the pod/member name passed via env variable or it should rely on some convention in configuration where the endpoint can be computed based on the passed pod/member name.