{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/62497","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/62497/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/62497/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/62497/events","html_url":"https://github.com/kubernetes/kubernetes/pull/62497","id":313914531,"number":62497,"title":"Fix a bug that headless service without ports fails to have endpoint created.","user":{"login":"MrHohn","id":8681801,"avatar_url":"https://avatars0.githubusercontent.com/u/8681801?v=4","gravatar_id":"","url":"https://api.github.com/users/MrHohn","html_url":"https://github.com/MrHohn","followers_url":"https://api.github.com/users/MrHohn/followers","following_url":"https://api.github.com/users/MrHohn/following{/other_user}","gists_url":"https://api.github.com/users/MrHohn/gists{/gist_id}","starred_url":"https://api.github.com/users/MrHohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrHohn/subscriptions","organizations_url":"https://api.github.com/users/MrHohn/orgs","repos_url":"https://api.github.com/users/MrHohn/repos","events_url":"https://api.github.com/users/MrHohn/events{/privacy}","received_events_url":"https://api.github.com/users/MrHohn/received_events","type":"User","site_admin":false},"labels":[{"id":477397086,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":148225179,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/lgtm","name":"lgtm","color":"15dd18","default":false},{"id":200149833,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note","name":"release-note","color":"c2e0c6","default":false},{"id":253450895,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/S","name":"size/S","color":"77bb00","default":false}],"state":"open","locked":false,"assignee":{"login":"thockin","id":5595220,"avatar_url":"https://avatars0.githubusercontent.com/u/5595220?v=4","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"assignees":[{"login":"thockin","id":5595220,"avatar_url":"https://avatars0.githubusercontent.com/u/5595220?v=4","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},{"login":"xiangpengzhao","id":15881573,"avatar_url":"https://avatars0.githubusercontent.com/u/15881573?v=4","gravatar_id":"","url":"https://api.github.com/users/xiangpengzhao","html_url":"https://github.com/xiangpengzhao","followers_url":"https://api.github.com/users/xiangpengzhao/followers","following_url":"https://api.github.com/users/xiangpengzhao/following{/other_user}","gists_url":"https://api.github.com/users/xiangpengzhao/gists{/gist_id}","starred_url":"https://api.github.com/users/xiangpengzhao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiangpengzhao/subscriptions","organizations_url":"https://api.github.com/users/xiangpengzhao/orgs","repos_url":"https://api.github.com/users/xiangpengzhao/repos","events_url":"https://api.github.com/users/xiangpengzhao/events{/privacy}","received_events_url":"https://api.github.com/users/xiangpengzhao/received_events","type":"User","site_admin":false}],"milestone":null,"comments":9,"created_at":"2018-04-12T22:53:51Z","updated_at":"2018-04-29T13:45:52Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/62497","html_url":"https://github.com/kubernetes/kubernetes/pull/62497","diff_url":"https://github.com/kubernetes/kubernetes/pull/62497.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/62497.patch"},"body":"**What this PR does / why we need it**:\r\nFollow up of https://github.com/kubernetes/kubernetes/pull/47250. Headless service without ports fails to have corresponding endpoint created because endpoint controller deliberately attaches a dummy endpointPort with portNum=0, which will fail API validation check. Error as below:\r\n```\r\nendpoints_controller.go:375] Error syncing endpoints for service \"default/XXX\": Endpoints \"XXX\" is invalid: subsets[0].ports[0].port: Invalid value: 0: must be between 1 and 65535, inclusive\r\n```\r\n\r\nThis PR makes endpoint controller not attach the dummy endpointPort for headless service.\r\n\r\n**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:\r\nFixes #55158, fixes #62440 \r\n\r\n**Special notes for your reviewer**:\r\ncc @xiangpengzhao \r\n\r\n**Release note**:\r\n<!--  Write your release note:\r\n1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, include the string \"action required\".\r\n2. If no release note is required, just write \"NONE\".\r\n-->\r\n```release-note\r\nFix a bug that headless service without ports fails to have endpoint created.\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/385252579","html_url":"https://github.com/kubernetes/kubernetes/pull/62497#issuecomment-385252579","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/62497","id":385252579,"user":{"login":"thockin","id":5595220,"avatar_url":"https://avatars0.githubusercontent.com/u/5595220?v=4","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"created_at":"2018-04-29T13:45:52Z","updated_at":"2018-04-29T13:45:52Z","author_association":"OWNER","body":"/approve"}}
{"actor":{"display_login":"thockin"}}