{"action":"created","comment":{"url":"https://api.github.com/repos/istio/istio/pulls/comments/225674156","pull_request_review_id":165324606,"id":225674156,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTY3NDE1Ng==","diff_hunk":"@@ -27,55 +27,107 @@ import (\n \n \t\"github.com/ghodss/yaml\"\n \t\"k8s.io/api/admissionregistration/v1beta1\"\n+\t\"k8s.io/api/core/v1\"\n \tk8serrors \"k8s.io/apimachinery/pkg/api/errors\"\n \tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n \tadmissionregistration \"k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1\"\n+\t\"k8s.io/client-go/tools/cache\"\n+\t\"k8s.io/client-go/util/workqueue\"\n \n \t\"istio.io/istio/pkg/log\"\n )\n \n-// Check if the galley validation endpoint is ready to receive requests.\n-func (wh *Webhook) endpointReady() error {\n-\tendpoints, err := wh.clientset.CoreV1().Endpoints(wh.deploymentNamespace).Get(wh.deploymentName, metav1.GetOptions{})\n-\tif err != nil {\n-\t\treturn fmt.Errorf(\"%s/%v endpoint ready check failed: %v\", wh.deploymentNamespace, wh.deploymentName, err)\n+func endpointReady(store cache.Store, queue workqueue.RateLimitingInterface, namespace, name string) (shutdown, ready bool) {\n+\tkey, quit := queue.Get()","path":"galley/pkg/crd/validation/config.go","position":20,"original_position":20,"commit_id":"c73093a4ed42ecc874a5e5100e00ff9b7c5114df","original_commit_id":"c73093a4ed42ecc874a5e5100e00ff9b7c5114df","user":{"login":"ozevren","id":17071139,"node_id":"MDQ6VXNlcjE3MDcxMTM5","avatar_url":"https://avatars0.githubusercontent.com/u/17071139?v=4","gravatar_id":"","url":"https://api.github.com/users/ozevren","html_url":"https://github.com/ozevren","followers_url":"https://api.github.com/users/ozevren/followers","following_url":"https://api.github.com/users/ozevren/following{/other_user}","gists_url":"https://api.github.com/users/ozevren/gists{/gist_id}","starred_url":"https://api.github.com/users/ozevren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozevren/subscriptions","organizations_url":"https://api.github.com/users/ozevren/orgs","repos_url":"https://api.github.com/users/ozevren/repos","events_url":"https://api.github.com/users/ozevren/events{/privacy}","received_events_url":"https://api.github.com/users/ozevren/received_events","type":"User","site_admin":false},"body":"Nit: Consider changing the order of the return variables. That aligns better with (value, error) type of idiomatic returns in Go.","created_at":"2018-10-16T19:16:20Z","updated_at":"2018-10-16T19:30:59Z","html_url":"https://github.com/istio/istio/pull/9023#discussion_r225674156","pull_request_url":"https://api.github.com/repos/istio/istio/pulls/9023","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/istio/istio/pulls/comments/225674156"},"html":{"href":"https://github.com/istio/istio/pull/9023#discussion_r225674156"},"pull_request":{"href":"https://api.github.com/repos/istio/istio/pulls/9023"}}},"pull_request":{"url":"https://api.github.com/repos/istio/istio/pulls/9023","id":218821931,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4ODIxOTMx","html_url":"https://github.com/istio/istio/pull/9023","diff_url":"https://github.com/istio/istio/pull/9023.diff","patch_url":"https://github.com/istio/istio/pull/9023.patch","issue_url":"https://api.github.com/repos/istio/istio/issues/9023","number":9023,"state":"open","locked":false,"title":"Use a k8s.io/client-go informer in validating webhook","user":{"login":"ayj","id":116378,"node_id":"MDQ6VXNlcjExNjM3OA==","avatar_url":"https://avatars1.githubusercontent.com/u/116378?v=4","gravatar_id":"","url":"https://api.github.com/users/ayj","html_url":"https://github.com/ayj","followers_url":"https://api.github.com/users/ayj/followers","following_url":"https://api.github.com/users/ayj/following{/other_user}","gists_url":"https://api.github.com/users/ayj/gists{/gist_id}","starred_url":"https://api.github.com/users/ayj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayj/subscriptions","organizations_url":"https://api.github.com/users/ayj/orgs","repos_url":"https://api.github.com/users/ayj/repos","events_url":"https://api.github.com/users/ayj/events{/privacy}","received_events_url":"https://api.github.com/users/ayj/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-28T00:13:39Z","updated_at":"2018-10-16T19:30:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f4735247e6cf99b2eb467c3df82d1e9836404e87","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":491318011,"node_id":"MDU6TGFiZWw0OTEzMTgwMTE=","url":"https://api.github.com/repos/istio/istio/labels/cla:%20yes","name":"cla: yes","color":"bfdadc","default":false},{"id":663804851,"node_id":"MDU6TGFiZWw2NjM4MDQ4NTE=","url":"https://api.github.com/repos/istio/istio/labels/needs-rebase","name":"needs-rebase","color":"bfdadc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/istio/istio/pulls/9023/commits","review_comments_url":"https://api.github.com/repos/istio/istio/pulls/9023/comments","review_comment_url":"https://api.github.com/repos/istio/istio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/istio/istio/issues/9023/comments","statuses_url":"https://api.github.com/repos/istio/istio/statuses/c73093a4ed42ecc874a5e5100e00ff9b7c5114df","head":{"label":"ayj:use-informer-in-validating-webhook","ref":"use-informer-in-validating-webhook","sha":"c73093a4ed42ecc874a5e5100e00ff9b7c5114df","user":{"login":"ayj","id":116378,"node_id":"MDQ6VXNlcjExNjM3OA==","avatar_url":"https://avatars1.githubusercontent.com/u/116378?v=4","gravatar_id":"","url":"https://api.github.com/users/ayj","html_url":"https://github.com/ayj","followers_url":"https://api.github.com/users/ayj/followers","following_url":"https://api.github.com/users/ayj/following{/other_user}","gists_url":"https://api.github.com/users/ayj/gists{/gist_id}","starred_url":"https://api.github.com/users/ayj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayj/subscriptions","organizations_url":"https://api.github.com/users/ayj/orgs","repos_url":"https://api.github.com/users/ayj/repos","events_url":"https://api.github.com/users/ayj/events{/privacy}","received_events_url":"https://api.github.com/users/ayj/received_events","type":"User","site_admin":false},"repo":{"id":109037660,"node_id":"MDEwOlJlcG9zaXRvcnkxMDkwMzc2NjA=","name":"istio","full_name":"ayj/istio","private":false,"owner":{"login":"ayj","id":116378,"node_id":"MDQ6VXNlcjExNjM3OA==","avatar_url":"https://avatars1.githubusercontent.com/u/116378?v=4","gravatar_id":"","url":"https://api.github.com/users/ayj","html_url":"https://github.com/ayj","followers_url":"https://api.github.com/users/ayj/followers","following_url":"https://api.github.com/users/ayj/following{/other_user}","gists_url":"https://api.github.com/users/ayj/gists{/gist_id}","starred_url":"https://api.github.com/users/ayj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayj/subscriptions","organizations_url":"https://api.github.com/users/ayj/orgs","repos_url":"https://api.github.com/users/ayj/repos","events_url":"https://api.github.com/users/ayj/events{/privacy}","received_events_url":"https://api.github.com/users/ayj/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ayj/istio","description":"Sample code, build and tests and governance material for the Istio project.","fork":true,"url":"https://api.github.com/repos/ayj/istio","forks_url":"https://api.github.com/repos/ayj/istio/forks","keys_url":"https://api.github.com/repos/ayj/istio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ayj/istio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ayj/istio/teams","hooks_url":"https://api.github.com/repos/ayj/istio/hooks","issue_events_url":"https://api.github.com/repos/ayj/istio/issues/events{/number}","events_url":"https://api.github.com/repos/ayj/istio/events","assignees_url":"https://api.github.com/repos/ayj/istio/assignees{/user}","branches_url":"https://api.github.com/repos/ayj/istio/branches{/branch}","tags_url":"https://api.github.com/repos/ayj/istio/tags","blobs_url":"https://api.github.com/repos/ayj/istio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ayj/istio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ayj/istio/git/refs{/sha}","trees_url":"https://api.github.com/repos/ayj/istio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ayj/istio/statuses/{sha}","languages_url":"https://api.github.com/repos/ayj/istio/languages","stargazers_url":"https://api.github.com/repos/ayj/istio/stargazers","contributors_url":"https://api.github.com/repos/ayj/istio/contributors","subscribers_url":"https://api.github.com/repos/ayj/istio/subscribers","subscription_url":"https://api.github.com/repos/ayj/istio/subscription","commits_url":"https://api.github.com/repos/ayj/istio/commits{/sha}","git_commits_url":"https://api.github.com/repos/ayj/istio/git/commits{/sha}","comments_url":"https://api.github.com/repos/ayj/istio/comments{/number}","issue_comment_url":"https://api.github.com/repos/ayj/istio/issues/comments{/number}","contents_url":"https://api.github.com/repos/ayj/istio/contents/{+path}","compare_url":"https://api.github.com/repos/ayj/istio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ayj/istio/merges","archive_url":"https://api.github.com/repos/ayj/istio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ayj/istio/downloads","issues_url":"https://api.github.com/repos/ayj/istio/issues{/number}","pulls_url":"https://api.github.com/repos/ayj/istio/pulls{/number}","milestones_url":"https://api.github.com/repos/ayj/istio/milestones{/number}","notifications_url":"https://api.github.com/repos/ayj/istio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ayj/istio/labels{/name}","releases_url":"https://api.github.com/repos/ayj/istio/releases{/id}","deployments_url":"https://api.github.com/repos/ayj/istio/deployments","created_at":"2017-10-31T18:35:53Z","updated_at":"2018-08-15T20:03:56Z","pushed_at":"2018-10-16T19:24:45Z","git_url":"git://github.com/ayj/istio.git","ssh_url":"git@github.com:ayj/istio.git","clone_url":"https://github.com/ayj/istio.git","svn_url":"https://github.com/ayj/istio","homepage":"https://istio.io","size":50931,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"istio:master","ref":"master","sha":"02ae5136553521ae5b53314ec5e74833653ad043","user":{"login":"istio","id":23534644,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTM0NjQ0","avatar_url":"https://avatars1.githubusercontent.com/u/23534644?v=4","gravatar_id":"","url":"https://api.github.com/users/istio","html_url":"https://github.com/istio","followers_url":"https://api.github.com/users/istio/followers","following_url":"https://api.github.com/users/istio/following{/other_user}","gists_url":"https://api.github.com/users/istio/gists{/gist_id}","starred_url":"https://api.github.com/users/istio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/istio/subscriptions","organizations_url":"https://api.github.com/users/istio/orgs","repos_url":"https://api.github.com/users/istio/repos","events_url":"https://api.github.com/users/istio/events{/privacy}","received_events_url":"https://api.github.com/users/istio/received_events","type":"Organization","site_admin":false},"repo":{"id":74175805,"node_id":"MDEwOlJlcG9zaXRvcnk3NDE3NTgwNQ==","name":"istio","full_name":"istio/istio","private":false,"owner":{"login":"istio","id":23534644,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTM0NjQ0","avatar_url":"https://avatars1.githubusercontent.com/u/23534644?v=4","gravatar_id":"","url":"https://api.github.com/users/istio","html_url":"https://github.com/istio","followers_url":"https://api.github.com/users/istio/followers","following_url":"https://api.github.com/users/istio/following{/other_user}","gists_url":"https://api.github.com/users/istio/gists{/gist_id}","starred_url":"https://api.github.com/users/istio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/istio/subscriptions","organizations_url":"https://api.github.com/users/istio/orgs","repos_url":"https://api.github.com/users/istio/repos","events_url":"https://api.github.com/users/istio/events{/privacy}","received_events_url":"https://api.github.com/users/istio/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/istio/istio","description":"Connect, secure, control, and observe services.","fork":false,"url":"https://api.github.com/repos/istio/istio","forks_url":"https://api.github.com/repos/istio/istio/forks","keys_url":"https://api.github.com/repos/istio/istio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/istio/istio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/istio/istio/teams","hooks_url":"https://api.github.com/repos/istio/istio/hooks","issue_events_url":"https://api.github.com/repos/istio/istio/issues/events{/number}","events_url":"https://api.github.com/repos/istio/istio/events","assignees_url":"https://api.github.com/repos/istio/istio/assignees{/user}","branches_url":"https://api.github.com/repos/istio/istio/branches{/branch}","tags_url":"https://api.github.com/repos/istio/istio/tags","blobs_url":"https://api.github.com/repos/istio/istio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/istio/istio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/istio/istio/git/refs{/sha}","trees_url":"https://api.github.com/repos/istio/istio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/istio/istio/statuses/{sha}","languages_url":"https://api.github.com/repos/istio/istio/languages","stargazers_url":"https://api.github.com/repos/istio/istio/stargazers","contributors_url":"https://api.github.com/repos/istio/istio/contributors","subscribers_url":"https://api.github.com/repos/istio/istio/subscribers","subscription_url":"https://api.github.com/repos/istio/istio/subscription","commits_url":"https://api.github.com/repos/istio/istio/commits{/sha}","git_commits_url":"https://api.github.com/repos/istio/istio/git/commits{/sha}","comments_url":"https://api.github.com/repos/istio/istio/comments{/number}","issue_comment_url":"https://api.github.com/repos/istio/istio/issues/comments{/number}","contents_url":"https://api.github.com/repos/istio/istio/contents/{+path}","compare_url":"https://api.github.com/repos/istio/istio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/istio/istio/merges","archive_url":"https://api.github.com/repos/istio/istio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/istio/istio/downloads","issues_url":"https://api.github.com/repos/istio/istio/issues{/number}","pulls_url":"https://api.github.com/repos/istio/istio/pulls{/number}","milestones_url":"https://api.github.com/repos/istio/istio/milestones{/number}","notifications_url":"https://api.github.com/repos/istio/istio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/istio/istio/labels{/name}","releases_url":"https://api.github.com/repos/istio/istio/releases{/id}","deployments_url":"https://api.github.com/repos/istio/istio/deployments","created_at":"2016-11-18T23:57:21Z","updated_at":"2018-10-16T18:57:15Z","pushed_at":"2018-10-16T19:24:48Z","git_url":"git://github.com/istio/istio.git","ssh_url":"git@github.com:istio/istio.git","clone_url":"https://github.com/istio/istio.git","svn_url":"https://github.com/istio/istio","homepage":"https://istio.io","size":50957,"stargazers_count":12418,"watchers_count":12418,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1832,"mirror_url":null,"archived":false,"open_issues_count":989,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1832,"open_issues":989,"watchers":12418,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/istio/istio/pulls/9023"},"html":{"href":"https://github.com/istio/istio/pull/9023"},"issue":{"href":"https://api.github.com/repos/istio/istio/issues/9023"},"comments":{"href":"https://api.github.com/repos/istio/istio/issues/9023/comments"},"review_comments":{"href":"https://api.github.com/repos/istio/istio/pulls/9023/comments"},"review_comment":{"href":"https://api.github.com/repos/istio/istio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/istio/istio/pulls/9023/commits"},"statuses":{"href":"https://api.github.com/repos/istio/istio/statuses/c73093a4ed42ecc874a5e5100e00ff9b7c5114df"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ozevren"}}