-
Notifications
You must be signed in to change notification settings - Fork 499
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
no need to set ClusterIP when syncing headless service #432
Conversation
I added a commit to remove op in tidb_member_manager.go and dismissed your review. |
@@ -152,8 +152,6 @@ func (pmm *pdMemberManager) syncPDHeadlessServiceForTidbCluster(tc *v1alpha1.Tid | |||
if !equal { | |||
svc := *oldSvc | |||
svc.Spec = newSvc.Spec | |||
// TODO add unit test | |||
svc.Spec.ClusterIP = oldSvc.Spec.ClusterIP |
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.
this line is to ensure that the ClusterIP
remains unchanged when svc updated.
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.
Yes. syncPDServiceForTidbCluster should keep ClusterIP unchanged. But when syncPDHeadlessServiceForTidbCluster, there's no need to set it, it should be default value of 'None' from newSvc.Spec.
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.
ok, that's right.
@@ -115,8 +115,6 @@ func (tmm *tidbMemberManager) syncTiDBHeadlessServiceForTidbCluster(tc *v1alpha1 | |||
if !equal { | |||
svc := *oldSvc | |||
svc.Spec = newSvc.Spec | |||
// TODO add unit test | |||
svc.Spec.ClusterIP = oldSvc.Spec.ClusterIP |
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.
ditto
/run-e2e-tests |
1 similar comment
/run-e2e-tests |
* Update access-dashboard.md * fix md lint Co-authored-by: DanielZhangQD <36026334+DanielZhangQD@users.noreply.github.com>
What problem does this PR solve?
remove set ClusterIP operation when syncing headless service
What is changed and how it works?
Check List
Tests
Code changes
Side effects
Related changes