{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/pulls/comments/205253376","pull_request_review_id":140488810,"id":205253376,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTI1MzM3Ng==","diff_hunk":"@@ -207,3 +248,40 @@ func parseNodeURL(nodeURL string) (project, zone, instance string, err error) {\n \tinstance = parts[2]\n \treturn\n }\n+\n+// TODO: move this to instance.Labels. This is gross.\n+func extractKubeLabels(instance *compute.Instance) (map[string]string, error) {\n+\tconst labelsKey = \"kube-labels\"\n+\n+\tif instance.Metadata == nil {\n+\t\treturn nil, fmt.Errorf(\"instance %q has no labels\")\n+\t}\n+\n+\tvar kubeLabels *string\n+\tfor _, item := range instance.Metadata.Items {\n+\t\tif item == nil || item.Key != labelsKey {\n+\t\t\tcontinue\n+\t\t}\n+\t\tif item.Value == nil {\n+\t\t\treturn nil, fmt.Errorf(\"instance %q had nil %q\", instance.SelfLink, labelsKey)","path":"cmd/gcp-controller-manager/app/node_annotater.go","position":111,"original_position":82,"commit_id":"cb6c7a2fa432aae5844c288540f670a6227f132d","original_commit_id":"d3b4dc0a6778837c2f97374989579f25f6f8f7cd","user":{"login":"mikedanese","id":1787169,"node_id":"MDQ6VXNlcjE3ODcxNjk=","avatar_url":"https://avatars3.githubusercontent.com/u/1787169?v=4","gravatar_id":"","url":"https://api.github.com/users/mikedanese","html_url":"https://github.com/mikedanese","followers_url":"https://api.github.com/users/mikedanese/followers","following_url":"https://api.github.com/users/mikedanese/following{/other_user}","gists_url":"https://api.github.com/users/mikedanese/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedanese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedanese/subscriptions","organizations_url":"https://api.github.com/users/mikedanese/orgs","repos_url":"https://api.github.com/users/mikedanese/repos","events_url":"https://api.github.com/users/mikedanese/events{/privacy}","received_events_url":"https://api.github.com/users/mikedanese/received_events","type":"User","site_admin":false},"body":"The annotator can't proceed unless this value is non-nil. Failures are just glog.Errorf'd in the body of the annotator.","created_at":"2018-07-25T20:35:11Z","updated_at":"2018-07-25T20:35:11Z","html_url":"https://github.com/kubernetes/cloud-provider-gcp/pull/38#discussion_r205253376","pull_request_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/pulls/38","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/pulls/comments/205253376"},"html":{"href":"https://github.com/kubernetes/cloud-provider-gcp/pull/38#discussion_r205253376"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/pulls/38"}},"in_reply_to_id":204842211},"pull_request":{"url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/pulls/38","id":203425045,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNDI1MDQ1","html_url":"https://github.com/kubernetes/cloud-provider-gcp/pull/38","diff_url":"https://github.com/kubernetes/cloud-provider-gcp/pull/38.diff","patch_url":"https://github.com/kubernetes/cloud-provider-gcp/pull/38.patch","issue_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/issues/38","number":38,"state":"open","locked":false,"title":" add annotater for label reconciliation","user":{"login":"mikedanese","id":1787169,"node_id":"MDQ6VXNlcjE3ODcxNjk=","avatar_url":"https://avatars3.githubusercontent.com/u/1787169?v=4","gravatar_id":"","url":"https://api.github.com/users/mikedanese","html_url":"https://github.com/mikedanese","followers_url":"https://api.github.com/users/mikedanese/followers","following_url":"https://api.github.com/users/mikedanese/following{/other_user}","gists_url":"https://api.github.com/users/mikedanese/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedanese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedanese/subscriptions","organizations_url":"https://api.github.com/users/mikedanese/orgs","repos_url":"https://api.github.com/users/mikedanese/repos","events_url":"https://api.github.com/users/mikedanese/events{/privacy}","received_events_url":"https://api.github.com/users/mikedanese/received_events","type":"User","site_admin":false},"body":"last two commits\r\n\r\ndepends on https://github.com/kubernetes/cloud-provider-gcp/pull/34","created_at":"2018-07-24T06:44:57Z","updated_at":"2018-07-25T20:35:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"df33994494fc790719b04a7240c5134d0ac4c0da","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":875358483,"node_id":"MDU6TGFiZWw4NzUzNTg0ODM=","url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":875362416,"node_id":"MDU6TGFiZWw4NzUzNjI0MTY=","url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/labels/size/M","name":"size/M","color":"eebb00","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/pulls/38/commits","review_comments_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/pulls/38/comments","review_comment_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/issues/38/comments","statuses_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/statuses/cb6c7a2fa432aae5844c288540f670a6227f132d","head":{"label":"mikedanese:annotater","ref":"annotater","sha":"cb6c7a2fa432aae5844c288540f670a6227f132d","user":{"login":"mikedanese","id":1787169,"node_id":"MDQ6VXNlcjE3ODcxNjk=","avatar_url":"https://avatars3.githubusercontent.com/u/1787169?v=4","gravatar_id":"","url":"https://api.github.com/users/mikedanese","html_url":"https://github.com/mikedanese","followers_url":"https://api.github.com/users/mikedanese/followers","following_url":"https://api.github.com/users/mikedanese/following{/other_user}","gists_url":"https://api.github.com/users/mikedanese/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedanese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedanese/subscriptions","organizations_url":"https://api.github.com/users/mikedanese/orgs","repos_url":"https://api.github.com/users/mikedanese/repos","events_url":"https://api.github.com/users/mikedanese/events{/privacy}","received_events_url":"https://api.github.com/users/mikedanese/received_events","type":"User","site_admin":false},"repo":{"id":126377345,"node_id":"MDEwOlJlcG9zaXRvcnkxMjYzNzczNDU=","name":"cloud-provider-gcp","full_name":"mikedanese/cloud-provider-gcp","owner":{"login":"mikedanese","id":1787169,"node_id":"MDQ6VXNlcjE3ODcxNjk=","avatar_url":"https://avatars3.githubusercontent.com/u/1787169?v=4","gravatar_id":"","url":"https://api.github.com/users/mikedanese","html_url":"https://github.com/mikedanese","followers_url":"https://api.github.com/users/mikedanese/followers","following_url":"https://api.github.com/users/mikedanese/following{/other_user}","gists_url":"https://api.github.com/users/mikedanese/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedanese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedanese/subscriptions","organizations_url":"https://api.github.com/users/mikedanese/orgs","repos_url":"https://api.github.com/users/mikedanese/repos","events_url":"https://api.github.com/users/mikedanese/events{/privacy}","received_events_url":"https://api.github.com/users/mikedanese/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mikedanese/cloud-provider-gcp","description":null,"fork":true,"url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp","forks_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/forks","keys_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/teams","hooks_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/hooks","issue_events_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/issues/events{/number}","events_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/events","assignees_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/assignees{/user}","branches_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/branches{/branch}","tags_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/tags","blobs_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/statuses/{sha}","languages_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/languages","stargazers_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/stargazers","contributors_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/contributors","subscribers_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/subscribers","subscription_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/subscription","commits_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/issues/comments{/number}","contents_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/contents/{+path}","compare_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/merges","archive_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/downloads","issues_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/issues{/number}","pulls_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/pulls{/number}","milestones_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/milestones{/number}","notifications_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/labels{/name}","releases_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/releases{/id}","deployments_url":"https://api.github.com/repos/mikedanese/cloud-provider-gcp/deployments","created_at":"2018-03-22T18:16:13Z","updated_at":"2018-07-17T15:54:17Z","pushed_at":"2018-07-24T20:14:04Z","git_url":"git://github.com/mikedanese/cloud-provider-gcp.git","ssh_url":"git@github.com:mikedanese/cloud-provider-gcp.git","clone_url":"https://github.com/mikedanese/cloud-provider-gcp.git","svn_url":"https://github.com/mikedanese/cloud-provider-gcp","homepage":null,"size":16399,"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":"kubernetes:master","ref":"master","sha":"f3680103acc7c7dc1fdc1e02486c61ccdbe4de69","user":{"login":"kubernetes","id":13629408,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjI5NDA4","avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","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":126136847,"node_id":"MDEwOlJlcG9zaXRvcnkxMjYxMzY4NDc=","name":"cloud-provider-gcp","full_name":"kubernetes/cloud-provider-gcp","owner":{"login":"kubernetes","id":13629408,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjI5NDA4","avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","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/cloud-provider-gcp","description":null,"fork":false,"url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp","forks_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/forks","keys_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/teams","hooks_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/events","assignees_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/tags","blobs_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/languages","stargazers_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/subscription","commits_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/merges","archive_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/downloads","issues_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/deployments","created_at":"2018-03-21T07:01:09Z","updated_at":"2018-07-25T20:24:59Z","pushed_at":"2018-07-25T20:24:57Z","git_url":"git://github.com/kubernetes/cloud-provider-gcp.git","ssh_url":"git@github.com:kubernetes/cloud-provider-gcp.git","clone_url":"https://github.com/kubernetes/cloud-provider-gcp.git","svn_url":"https://github.com/kubernetes/cloud-provider-gcp","homepage":null,"size":16400,"stargazers_count":4,"watchers_count":4,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":5,"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":6,"open_issues":5,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/pulls/38"},"html":{"href":"https://github.com/kubernetes/cloud-provider-gcp/pull/38"},"issue":{"href":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/issues/38"},"comments":{"href":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/cloud-provider-gcp/statuses/cb6c7a2fa432aae5844c288540f670a6227f132d"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mikedanese"}}