Skip to content
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

Merged
merged 2 commits into from
May 5, 2019

Conversation

LinuxGit
Copy link
Contributor

@LinuxGit LinuxGit commented Apr 26, 2019

What problem does this PR solve?

remove set ClusterIP operation when syncing headless service

What is changed and how it works?

Check List

Tests

  • No code

Code changes

  • Has Go code change

Side effects

  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

weekface
weekface previously approved these changes Apr 28, 2019
@LinuxGit LinuxGit changed the title no need to set ClusterIP when syncing PD headless service no need to set ClusterIP when syncing headless service Apr 28, 2019
@LinuxGit
Copy link
Contributor Author

I added a commit to remove op in tidb_member_manager.go and dismissed your review.
PTAL again. @weekface

@@ -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
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@LinuxGit
Copy link
Contributor Author

/run-e2e-tests

1 similar comment
@xiaojingchen
Copy link
Contributor

/run-e2e-tests

@LinuxGit LinuxGit merged commit b0e6cd3 into pingcap:master May 5, 2019
@LinuxGit LinuxGit deleted the Louis/remove-clusterIP-set branch May 5, 2019 02:52
yahonda pushed a commit that referenced this pull request Dec 27, 2021
* Update access-dashboard.md

* fix md lint

Co-authored-by: DanielZhangQD <36026334+DanielZhangQD@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants