{"action":"created","comment":{"url":"https://api.github.com/repos/gravitational/gravity/pulls/comments/313768067","pull_request_review_id":274747953,"id":313768067,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMxMzc2ODA2Nw==","diff_hunk":"@@ -329,6 +333,24 @@ func (r *applications) StartAppHook(ctx context.Context, req appservice.HookRunR\n \t}, nil\n }\n \n+// injectEnvVars updates the provided hook run request with additional\n+// environment variables such as cluster information.\n+func (r *applications) injectEnvVars(req *appservice.HookRunRequest, client *kubernetes.Clientset) error {\n+\tconfigMap, err := client.Core().ConfigMaps(metav1.NamespaceSystem).Get(\n+\t\tconstants.ClusterInfoMap, metav1.GetOptions{})","path":"lib/app/service/app.go","position":41,"original_position":41,"commit_id":"f96cf0bc199acb6cdfd922c3f09dd100ee8f06e0","original_commit_id":"f96cf0bc199acb6cdfd922c3f09dd100ee8f06e0","user":{"login":"a-palchikov","id":965809,"node_id":"MDQ6VXNlcjk2NTgwOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/965809?v=4","gravatar_id":"","url":"https://api.github.com/users/a-palchikov","html_url":"https://github.com/a-palchikov","followers_url":"https://api.github.com/users/a-palchikov/followers","following_url":"https://api.github.com/users/a-palchikov/following{/other_user}","gists_url":"https://api.github.com/users/a-palchikov/gists{/gist_id}","starred_url":"https://api.github.com/users/a-palchikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-palchikov/subscriptions","organizations_url":"https://api.github.com/users/a-palchikov/orgs","repos_url":"https://api.github.com/users/a-palchikov/repos","events_url":"https://api.github.com/users/a-palchikov/events{/privacy}","received_events_url":"https://api.github.com/users/a-palchikov/received_events","type":"User","site_admin":false},"body":"Which means we have now more things to worry about w/o for reconciliation.","created_at":"2019-08-14T08:48:56Z","updated_at":"2019-08-14T08:48:57Z","html_url":"https://github.com/gravitational/gravity/pull/582#discussion_r313768067","pull_request_url":"https://api.github.com/repos/gravitational/gravity/pulls/582","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/gravitational/gravity/pulls/comments/313768067"},"html":{"href":"https://github.com/gravitational/gravity/pull/582#discussion_r313768067"},"pull_request":{"href":"https://api.github.com/repos/gravitational/gravity/pulls/582"}},"in_reply_to_id":313561976},"pull_request":{"url":"https://api.github.com/repos/gravitational/gravity/pulls/582","id":307009069,"node_id":"MDExOlB1bGxSZXF1ZXN0MzA3MDA5MDY5","html_url":"https://github.com/gravitational/gravity/pull/582","diff_url":"https://github.com/gravitational/gravity/pull/582.diff","patch_url":"https://github.com/gravitational/gravity/pull/582.patch","issue_url":"https://api.github.com/repos/gravitational/gravity/issues/582","number":582,"state":"closed","locked":false,"title":"Fix hook vars.","user":{"login":"r0mant","id":339322,"node_id":"MDQ6VXNlcjMzOTMyMg==","avatar_url":"https://avatars0.githubusercontent.com/u/339322?v=4","gravatar_id":"","url":"https://api.github.com/users/r0mant","html_url":"https://github.com/r0mant","followers_url":"https://api.github.com/users/r0mant/followers","following_url":"https://api.github.com/users/r0mant/following{/other_user}","gists_url":"https://api.github.com/users/r0mant/gists{/gist_id}","starred_url":"https://api.github.com/users/r0mant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r0mant/subscriptions","organizations_url":"https://api.github.com/users/r0mant/orgs","repos_url":"https://api.github.com/users/r0mant/repos","events_url":"https://api.github.com/users/r0mant/events{/privacy}","received_events_url":"https://api.github.com/users/r0mant/received_events","type":"User","site_admin":false},"body":"Instead of mounting config map with cluster info into hooks (which won't work if the hook is launched from any namespace other than kube-system), read vars from it and populate environment in the request.","created_at":"2019-08-13T17:43:31Z","updated_at":"2019-08-14T08:48:57Z","closed_at":"2019-08-14T00:01:15Z","merged_at":"2019-08-14T00:01:15Z","merge_commit_sha":"42f5b8a2309109de4346c669be710fb05929290f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gravitational/gravity/pulls/582/commits","review_comments_url":"https://api.github.com/repos/gravitational/gravity/pulls/582/comments","review_comment_url":"https://api.github.com/repos/gravitational/gravity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gravitational/gravity/issues/582/comments","statuses_url":"https://api.github.com/repos/gravitational/gravity/statuses/f96cf0bc199acb6cdfd922c3f09dd100ee8f06e0","head":{"label":"gravitational:roman/varfix","ref":"roman/varfix","sha":"f96cf0bc199acb6cdfd922c3f09dd100ee8f06e0","user":{"login":"gravitational","id":10781132,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNzgxMTMy","avatar_url":"https://avatars2.githubusercontent.com/u/10781132?v=4","gravatar_id":"","url":"https://api.github.com/users/gravitational","html_url":"https://github.com/gravitational","followers_url":"https://api.github.com/users/gravitational/followers","following_url":"https://api.github.com/users/gravitational/following{/other_user}","gists_url":"https://api.github.com/users/gravitational/gists{/gist_id}","starred_url":"https://api.github.com/users/gravitational/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gravitational/subscriptions","organizations_url":"https://api.github.com/users/gravitational/orgs","repos_url":"https://api.github.com/users/gravitational/repos","events_url":"https://api.github.com/users/gravitational/events{/privacy}","received_events_url":"https://api.github.com/users/gravitational/received_events","type":"Organization","site_admin":false},"repo":{"id":145904906,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU5MDQ5MDY=","name":"gravity","full_name":"gravitational/gravity","private":false,"owner":{"login":"gravitational","id":10781132,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNzgxMTMy","avatar_url":"https://avatars2.githubusercontent.com/u/10781132?v=4","gravatar_id":"","url":"https://api.github.com/users/gravitational","html_url":"https://github.com/gravitational","followers_url":"https://api.github.com/users/gravitational/followers","following_url":"https://api.github.com/users/gravitational/following{/other_user}","gists_url":"https://api.github.com/users/gravitational/gists{/gist_id}","starred_url":"https://api.github.com/users/gravitational/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gravitational/subscriptions","organizations_url":"https://api.github.com/users/gravitational/orgs","repos_url":"https://api.github.com/users/gravitational/repos","events_url":"https://api.github.com/users/gravitational/events{/privacy}","received_events_url":"https://api.github.com/users/gravitational/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/gravitational/gravity","description":"Opinionated image-based Kubernetes packaging and management tools.","fork":false,"url":"https://api.github.com/repos/gravitational/gravity","forks_url":"https://api.github.com/repos/gravitational/gravity/forks","keys_url":"https://api.github.com/repos/gravitational/gravity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gravitational/gravity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gravitational/gravity/teams","hooks_url":"https://api.github.com/repos/gravitational/gravity/hooks","issue_events_url":"https://api.github.com/repos/gravitational/gravity/issues/events{/number}","events_url":"https://api.github.com/repos/gravitational/gravity/events","assignees_url":"https://api.github.com/repos/gravitational/gravity/assignees{/user}","branches_url":"https://api.github.com/repos/gravitational/gravity/branches{/branch}","tags_url":"https://api.github.com/repos/gravitational/gravity/tags","blobs_url":"https://api.github.com/repos/gravitational/gravity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gravitational/gravity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gravitational/gravity/git/refs{/sha}","trees_url":"https://api.github.com/repos/gravitational/gravity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gravitational/gravity/statuses/{sha}","languages_url":"https://api.github.com/repos/gravitational/gravity/languages","stargazers_url":"https://api.github.com/repos/gravitational/gravity/stargazers","contributors_url":"https://api.github.com/repos/gravitational/gravity/contributors","subscribers_url":"https://api.github.com/repos/gravitational/gravity/subscribers","subscription_url":"https://api.github.com/repos/gravitational/gravity/subscription","commits_url":"https://api.github.com/repos/gravitational/gravity/commits{/sha}","git_commits_url":"https://api.github.com/repos/gravitational/gravity/git/commits{/sha}","comments_url":"https://api.github.com/repos/gravitational/gravity/comments{/number}","issue_comment_url":"https://api.github.com/repos/gravitational/gravity/issues/comments{/number}","contents_url":"https://api.github.com/repos/gravitational/gravity/contents/{+path}","compare_url":"https://api.github.com/repos/gravitational/gravity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gravitational/gravity/merges","archive_url":"https://api.github.com/repos/gravitational/gravity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gravitational/gravity/downloads","issues_url":"https://api.github.com/repos/gravitational/gravity/issues{/number}","pulls_url":"https://api.github.com/repos/gravitational/gravity/pulls{/number}","milestones_url":"https://api.github.com/repos/gravitational/gravity/milestones{/number}","notifications_url":"https://api.github.com/repos/gravitational/gravity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gravitational/gravity/labels{/name}","releases_url":"https://api.github.com/repos/gravitational/gravity/releases{/id}","deployments_url":"https://api.github.com/repos/gravitational/gravity/deployments","created_at":"2018-08-23T20:41:07Z","updated_at":"2019-08-14T00:19:22Z","pushed_at":"2019-08-14T00:19:22Z","git_url":"git://github.com/gravitational/gravity.git","ssh_url":"git@github.com:gravitational/gravity.git","clone_url":"https://github.com/gravitational/gravity.git","svn_url":"https://github.com/gravitational/gravity","homepage":"","size":32957,"stargazers_count":471,"watchers_count":471,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":30,"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":39,"open_issues":30,"watchers":471,"default_branch":"master"}},"base":{"label":"gravitational:master","ref":"master","sha":"5fec6234e07da8a9e16af51a8e35436bc7ffa98b","user":{"login":"gravitational","id":10781132,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNzgxMTMy","avatar_url":"https://avatars2.githubusercontent.com/u/10781132?v=4","gravatar_id":"","url":"https://api.github.com/users/gravitational","html_url":"https://github.com/gravitational","followers_url":"https://api.github.com/users/gravitational/followers","following_url":"https://api.github.com/users/gravitational/following{/other_user}","gists_url":"https://api.github.com/users/gravitational/gists{/gist_id}","starred_url":"https://api.github.com/users/gravitational/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gravitational/subscriptions","organizations_url":"https://api.github.com/users/gravitational/orgs","repos_url":"https://api.github.com/users/gravitational/repos","events_url":"https://api.github.com/users/gravitational/events{/privacy}","received_events_url":"https://api.github.com/users/gravitational/received_events","type":"Organization","site_admin":false},"repo":{"id":145904906,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU5MDQ5MDY=","name":"gravity","full_name":"gravitational/gravity","private":false,"owner":{"login":"gravitational","id":10781132,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNzgxMTMy","avatar_url":"https://avatars2.githubusercontent.com/u/10781132?v=4","gravatar_id":"","url":"https://api.github.com/users/gravitational","html_url":"https://github.com/gravitational","followers_url":"https://api.github.com/users/gravitational/followers","following_url":"https://api.github.com/users/gravitational/following{/other_user}","gists_url":"https://api.github.com/users/gravitational/gists{/gist_id}","starred_url":"https://api.github.com/users/gravitational/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gravitational/subscriptions","organizations_url":"https://api.github.com/users/gravitational/orgs","repos_url":"https://api.github.com/users/gravitational/repos","events_url":"https://api.github.com/users/gravitational/events{/privacy}","received_events_url":"https://api.github.com/users/gravitational/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/gravitational/gravity","description":"Opinionated image-based Kubernetes packaging and management tools.","fork":false,"url":"https://api.github.com/repos/gravitational/gravity","forks_url":"https://api.github.com/repos/gravitational/gravity/forks","keys_url":"https://api.github.com/repos/gravitational/gravity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gravitational/gravity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gravitational/gravity/teams","hooks_url":"https://api.github.com/repos/gravitational/gravity/hooks","issue_events_url":"https://api.github.com/repos/gravitational/gravity/issues/events{/number}","events_url":"https://api.github.com/repos/gravitational/gravity/events","assignees_url":"https://api.github.com/repos/gravitational/gravity/assignees{/user}","branches_url":"https://api.github.com/repos/gravitational/gravity/branches{/branch}","tags_url":"https://api.github.com/repos/gravitational/gravity/tags","blobs_url":"https://api.github.com/repos/gravitational/gravity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gravitational/gravity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gravitational/gravity/git/refs{/sha}","trees_url":"https://api.github.com/repos/gravitational/gravity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gravitational/gravity/statuses/{sha}","languages_url":"https://api.github.com/repos/gravitational/gravity/languages","stargazers_url":"https://api.github.com/repos/gravitational/gravity/stargazers","contributors_url":"https://api.github.com/repos/gravitational/gravity/contributors","subscribers_url":"https://api.github.com/repos/gravitational/gravity/subscribers","subscription_url":"https://api.github.com/repos/gravitational/gravity/subscription","commits_url":"https://api.github.com/repos/gravitational/gravity/commits{/sha}","git_commits_url":"https://api.github.com/repos/gravitational/gravity/git/commits{/sha}","comments_url":"https://api.github.com/repos/gravitational/gravity/comments{/number}","issue_comment_url":"https://api.github.com/repos/gravitational/gravity/issues/comments{/number}","contents_url":"https://api.github.com/repos/gravitational/gravity/contents/{+path}","compare_url":"https://api.github.com/repos/gravitational/gravity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gravitational/gravity/merges","archive_url":"https://api.github.com/repos/gravitational/gravity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gravitational/gravity/downloads","issues_url":"https://api.github.com/repos/gravitational/gravity/issues{/number}","pulls_url":"https://api.github.com/repos/gravitational/gravity/pulls{/number}","milestones_url":"https://api.github.com/repos/gravitational/gravity/milestones{/number}","notifications_url":"https://api.github.com/repos/gravitational/gravity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gravitational/gravity/labels{/name}","releases_url":"https://api.github.com/repos/gravitational/gravity/releases{/id}","deployments_url":"https://api.github.com/repos/gravitational/gravity/deployments","created_at":"2018-08-23T20:41:07Z","updated_at":"2019-08-14T00:19:22Z","pushed_at":"2019-08-14T00:19:22Z","git_url":"git://github.com/gravitational/gravity.git","ssh_url":"git@github.com:gravitational/gravity.git","clone_url":"https://github.com/gravitational/gravity.git","svn_url":"https://github.com/gravitational/gravity","homepage":"","size":32957,"stargazers_count":471,"watchers_count":471,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":30,"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":39,"open_issues":30,"watchers":471,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gravitational/gravity/pulls/582"},"html":{"href":"https://github.com/gravitational/gravity/pull/582"},"issue":{"href":"https://api.github.com/repos/gravitational/gravity/issues/582"},"comments":{"href":"https://api.github.com/repos/gravitational/gravity/issues/582/comments"},"review_comments":{"href":"https://api.github.com/repos/gravitational/gravity/pulls/582/comments"},"review_comment":{"href":"https://api.github.com/repos/gravitational/gravity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gravitational/gravity/pulls/582/commits"},"statuses":{"href":"https://api.github.com/repos/gravitational/gravity/statuses/f96cf0bc199acb6cdfd922c3f09dd100ee8f06e0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"a-palchikov"}}