{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/40349865","id":40349865,"diff_hunk":"@@ -212,26 +227,10 @@ func (c *Controller) SetEndpoints(serviceName string, ip net.IP, port int) error\n \t\tglog.Warningf(\"Resetting endpoints for master service %q to %v\", serviceName, e)\n \t\treturn c.EndpointRegistry.UpdateEndpoints(ctx, e)\n \t} else if !ipCorrect {\n-\t\t// We *always* add our own IP address; if there are too many IP\n-\t\t// addresses, we remove the ones lexicographically after our\n-\t\t// own IP address.  Given the requirements stated at the top of\n-\t\t// this function, this should cause the list of IP addresses to\n-\t\t// become eventually correct.\n \t\te.Subsets[0].Addresses = append(e.Subsets[0].Addresses, api.EndpointAddress{IP: ip.String()})\n \t\te.Subsets = endpoints.RepackSubsets(e.Subsets)\n-\t\tif addrs := &e.Subsets[0].Addresses; len(*addrs) > c.MasterCount {","path":"pkg/master/controller.go","position":121,"original_position":121,"commit_id":"882f858cb8b883a9890595001236109bd0bd03c9","original_commit_id":"882f858cb8b883a9890595001236109bd0bd03c9","user":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"body":"Right, it would be totally different and would involve e.g. locking keys in\netcd.\n\nOn Thu, Sep 24, 2015 at 10:48 AM, Clayton Coleman <notifications@github.com>\nwrote:\n\n> In pkg/master/controller.go\n> <https://github.com/kubernetes/kubernetes/pull/13978#discussion_r40348998>\n> :\n>\n> >  \t\te.Subsets[0].Addresses = append(e.Subsets[0].Addresses, api.EndpointAddress{IP: ip.String()})\n> >  \t\te.Subsets = endpoints.RepackSubsets(e.Subsets)\n> > -\t\tif addrs := &e.Subsets[0].Addresses; len(*addrs) > c.MasterCount {\n>\n> An algorithm that didn't require master count would involve heartbeating\n> the endpoints with a timestamp so that other apiservers could observe out\n> of date endpoints and purge them.\n> … <#1500078e94dcfd5f_>\n> On Thu, Sep 24, 2015 at 1:23 PM, Daniel Smith <notifications@github.com>\n> wrote: In pkg/master/controller.go <\n> https://github.com/kubernetes/kubernetes/pull/13978#discussion_r40346118>\n> : > e.Subsets[0].Addresses = append(e.Subsets[0].Addresses,\n> api.EndpointAddress{IP: ip.String()}) > e.Subsets =\n> endpoints.RepackSubsets(e.Subsets) > - if addrs := &e.Subsets[0].Addresses;\n> len(*addrs) > c.MasterCount { This is critical for multiple apiservers\n> coordinating to get all of their IP addresses in the endpoints list. …\n> <#150006191b35e254_> On Thu, Sep 24, 2015 at 10:08 AM, jay vyas <\n> notifications@github.com> wrote: In pkg/master/controller.go <\n> https://github.com/kubernetes/kubernetes/pull/13978#discussion_r40344524>\n> : > e.Subsets[0].Addresses = append(e.Subsets[0].Addresses,\n> api.EndpointAddress{IP: ip.String()}) > e.Subsets =\n> endpoints.RepackSubsets(e.Subsets) > - if addrs := &e.Subsets[0].Addresses;\n> len(*addrs) > c.MasterCount { My thought is that this does nothing other\n> than prune old IPs, based on if too many were already in the subset... From\n> looking at the unit tests, that also seems to be the case. Maybe I've\n> misread this? — Reply to this email directly or view it on GitHub <\n> https://github.com/kubernetes/kubernetes/pull/13978/files#r40344524>. —\n> Reply to this email directly or view it on GitHub <\n> https://github.com/kubernetes/kubernetes/pull/13978/files#r40346118>.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/kubernetes/kubernetes/pull/13978/files#r40348998>.\n>\n","created_at":"2015-09-24T17:56:13Z","updated_at":"2015-09-24T17:56:13Z","html_url":"https://github.com/kubernetes/kubernetes/pull/13978#discussion_r40349865","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13978","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/40349865"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/13978#discussion_r40349865"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13978"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13978","id":45081556,"html_url":"https://github.com/kubernetes/kubernetes/pull/13978","diff_url":"https://github.com/kubernetes/kubernetes/pull/13978.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/13978.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/13978","number":13978,"state":"open","locked":false,"title":"NodePort option: Allowing for apiservers behind load-balanced endpoint.","user":{"login":"jayunit100","id":826111,"avatar_url":"https://avatars.githubusercontent.com/u/826111?v=3","gravatar_id":"","url":"https://api.github.com/users/jayunit100","html_url":"https://github.com/jayunit100","followers_url":"https://api.github.com/users/jayunit100/followers","following_url":"https://api.github.com/users/jayunit100/following{/other_user}","gists_url":"https://api.github.com/users/jayunit100/gists{/gist_id}","starred_url":"https://api.github.com/users/jayunit100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayunit100/subscriptions","organizations_url":"https://api.github.com/users/jayunit100/orgs","repos_url":"https://api.github.com/users/jayunit100/repos","events_url":"https://api.github.com/users/jayunit100/events{/privacy}","received_events_url":"https://api.github.com/users/jayunit100/received_events","type":"User","site_admin":false},"body":"This is a place holder for the WIP example for hiding apiservers behind the service endpoint ( issue #13152 ) \r\n- I'm rebasing it and so on now.\r\n- Also, I'll generalize it w/ cmd line args rather than hardcoded port.","created_at":"2015-09-15T18:00:08Z","updated_at":"2015-09-24T17:56:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2e5c2f29c9f0b2e4d643fcbb60533ecce5b362b7","assignee":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13978/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13978/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/13978/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/882f858cb8b883a9890595001236109bd0bd03c9","head":{"label":"jayunit100:api_server_append_13152","ref":"api_server_append_13152","sha":"882f858cb8b883a9890595001236109bd0bd03c9","user":{"login":"jayunit100","id":826111,"avatar_url":"https://avatars.githubusercontent.com/u/826111?v=3","gravatar_id":"","url":"https://api.github.com/users/jayunit100","html_url":"https://github.com/jayunit100","followers_url":"https://api.github.com/users/jayunit100/followers","following_url":"https://api.github.com/users/jayunit100/following{/other_user}","gists_url":"https://api.github.com/users/jayunit100/gists{/gist_id}","starred_url":"https://api.github.com/users/jayunit100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayunit100/subscriptions","organizations_url":"https://api.github.com/users/jayunit100/orgs","repos_url":"https://api.github.com/users/jayunit100/repos","events_url":"https://api.github.com/users/jayunit100/events{/privacy}","received_events_url":"https://api.github.com/users/jayunit100/received_events","type":"User","site_admin":false},"repo":{"id":28862683,"name":"kubernetes","full_name":"jayunit100/kubernetes","owner":{"login":"jayunit100","id":826111,"avatar_url":"https://avatars.githubusercontent.com/u/826111?v=3","gravatar_id":"","url":"https://api.github.com/users/jayunit100","html_url":"https://github.com/jayunit100","followers_url":"https://api.github.com/users/jayunit100/followers","following_url":"https://api.github.com/users/jayunit100/following{/other_user}","gists_url":"https://api.github.com/users/jayunit100/gists{/gist_id}","starred_url":"https://api.github.com/users/jayunit100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayunit100/subscriptions","organizations_url":"https://api.github.com/users/jayunit100/orgs","repos_url":"https://api.github.com/users/jayunit100/repos","events_url":"https://api.github.com/users/jayunit100/events{/privacy}","received_events_url":"https://api.github.com/users/jayunit100/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jayunit100/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/jayunit100/kubernetes","forks_url":"https://api.github.com/repos/jayunit100/kubernetes/forks","keys_url":"https://api.github.com/repos/jayunit100/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jayunit100/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jayunit100/kubernetes/teams","hooks_url":"https://api.github.com/repos/jayunit100/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/jayunit100/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/jayunit100/kubernetes/events","assignees_url":"https://api.github.com/repos/jayunit100/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/jayunit100/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/jayunit100/kubernetes/tags","blobs_url":"https://api.github.com/repos/jayunit100/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jayunit100/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jayunit100/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/jayunit100/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jayunit100/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/jayunit100/kubernetes/languages","stargazers_url":"https://api.github.com/repos/jayunit100/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/jayunit100/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/jayunit100/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/jayunit100/kubernetes/subscription","commits_url":"https://api.github.com/repos/jayunit100/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/jayunit100/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/jayunit100/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/jayunit100/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/jayunit100/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/jayunit100/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jayunit100/kubernetes/merges","archive_url":"https://api.github.com/repos/jayunit100/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jayunit100/kubernetes/downloads","issues_url":"https://api.github.com/repos/jayunit100/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/jayunit100/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/jayunit100/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/jayunit100/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jayunit100/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/jayunit100/kubernetes/releases{/id}","created_at":"2015-01-06T12:36:29Z","updated_at":"2015-08-01T13:36:57Z","pushed_at":"2015-09-22T20:30:53Z","git_url":"git://github.com/jayunit100/kubernetes.git","ssh_url":"git@github.com:jayunit100/kubernetes.git","clone_url":"https://github.com/jayunit100/kubernetes.git","svn_url":"https://github.com/jayunit100/kubernetes","homepage":null,"size":110257,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"2d69baf920d0dd391fb4540dfd40b196c014d609","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-09-24T17:05:20Z","pushed_at":"2015-09-24T17:53:01Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":428930,"stargazers_count":10416,"watchers_count":10416,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2590,"mirror_url":null,"open_issues_count":1898,"forks":2590,"open_issues":1898,"watchers":10416,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13978"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/13978"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/13978"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/13978/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13978/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13978/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/882f858cb8b883a9890595001236109bd0bd03c9"}}}}