{"action":"created","comment":{"url":"https://api.github.com/repos/getsentry/xds/pulls/comments/337738798","pull_request_review_id":305493684,"id":337738798,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMzNzczODc5OA==","diff_hunk":"@@ -1,39 +1,71 @@\n package main\n \n import (\n+\t\"io/ioutil\"\n \t\"os\"\n \n-\t\"k8s.io/api/core/v1\"\n+\tv1 \"k8s.io/api/core/v1\"\n \t\"k8s.io/client-go/kubernetes\"\n )\n \n type Controller struct {\n \tk8sClient *kubernetes.Clientset\n \n-\tconfigStore *ConfigStore\n-\tepStore     *EpStore\n+\tbootstrapData *bootstrapData\n+\tconfigStore   *ConfigStore\n+\tepStore       *EpStore\n }\n \n func NewController(\n \tk8sClient *kubernetes.Clientset,\n ) *Controller {\n \tc := &Controller{\n-\t\tk8sClient: k8sClient,\n+\t\tk8sClient:   k8sClient,\n+\t\tconfigStore: NewConfigStore(k8sClient, os.Getenv(XDS_CONFIGMAP_ENV)),\n \t}\n \n-\tc.configStore = NewConfigStore(k8sClient, os.Getenv(XDS_CONFIGMAP_ENV))\n-\tif err := c.configStore.Init(); err != nil {\n-\t\tpanic(err)\n-\t}\n+\tbootstrapFile := os.Getenv(XDS_BOOTSTRAP_FILE)\n+\tif bootstrapFile != \"\" {\n+\t\tbootstrapFd, err := os.Open(bootstrapFile)","path":"controller.go","position":37,"original_position":37,"commit_id":"a24b523902b034bc4c5d6280cefe505a3d5f9d8d","original_commit_id":"a24b523902b034bc4c5d6280cefe505a3d5f9d8d","user":{"login":"mattrobenolt","id":375744,"node_id":"MDQ6VXNlcjM3NTc0NA==","avatar_url":"https://avatars1.githubusercontent.com/u/375744?v=4","gravatar_id":"","url":"https://api.github.com/users/mattrobenolt","html_url":"https://github.com/mattrobenolt","followers_url":"https://api.github.com/users/mattrobenolt/followers","following_url":"https://api.github.com/users/mattrobenolt/following{/other_user}","gists_url":"https://api.github.com/users/mattrobenolt/gists{/gist_id}","starred_url":"https://api.github.com/users/mattrobenolt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattrobenolt/subscriptions","organizations_url":"https://api.github.com/users/mattrobenolt/orgs","repos_url":"https://api.github.com/users/mattrobenolt/repos","events_url":"https://api.github.com/users/mattrobenolt/events{/privacy}","received_events_url":"https://api.github.com/users/mattrobenolt/received_events","type":"User","site_admin":false},"body":"Nothing is closing this handler.","created_at":"2019-10-22T20:40:37Z","updated_at":"2019-10-22T20:40:37Z","html_url":"https://github.com/getsentry/xds/pull/1#discussion_r337738798","pull_request_url":"https://api.github.com/repos/getsentry/xds/pulls/1","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/getsentry/xds/pulls/comments/337738798"},"html":{"href":"https://github.com/getsentry/xds/pull/1#discussion_r337738798"},"pull_request":{"href":"https://api.github.com/repos/getsentry/xds/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/getsentry/xds/pulls/1","id":331164380,"node_id":"MDExOlB1bGxSZXF1ZXN0MzMxMTY0Mzgw","html_url":"https://github.com/getsentry/xds/pull/1","diff_url":"https://github.com/getsentry/xds/pull/1.diff","patch_url":"https://github.com/getsentry/xds/pull/1.patch","issue_url":"https://api.github.com/repos/getsentry/xds/issues/1","number":1,"state":"open","locked":false,"title":"Initial support for \"bootstrap\" mode","user":{"login":"b1naryth1ef","id":599433,"node_id":"MDQ6VXNlcjU5OTQzMw==","avatar_url":"https://avatars2.githubusercontent.com/u/599433?v=4","gravatar_id":"","url":"https://api.github.com/users/b1naryth1ef","html_url":"https://github.com/b1naryth1ef","followers_url":"https://api.github.com/users/b1naryth1ef/followers","following_url":"https://api.github.com/users/b1naryth1ef/following{/other_user}","gists_url":"https://api.github.com/users/b1naryth1ef/gists{/gist_id}","starred_url":"https://api.github.com/users/b1naryth1ef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b1naryth1ef/subscriptions","organizations_url":"https://api.github.com/users/b1naryth1ef/orgs","repos_url":"https://api.github.com/users/b1naryth1ef/repos","events_url":"https://api.github.com/users/b1naryth1ef/events{/privacy}","received_events_url":"https://api.github.com/users/b1naryth1ef/received_events","type":"User","site_admin":false},"body":"This PR introduces the initial XDS parts of a \"bootstrap\" mode, where-in a XDS can be configured to read clusters, listeners and endpoints from a data file.\r\n\r\n## TODO\r\n\r\n- [ ] Start proxying requests to upstream xds at some point during runtime (timer or some other signal)\r\n- [ ] Don't proxy every request to bootstrapData, just proxy cds/lds/eds endpoints\r\n- [ ] Adjust /config\r\n- [ ] Block /bootstrap in proxy-mode\r\n- [ ] Cleanup (bootstrapData naming?)","created_at":"2019-10-22T19:39:51Z","updated_at":"2019-10-22T20:40:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"292c78b1bf5847b7b02da0a4b09b31260a1f5c67","assignee":{"login":"b1naryth1ef","id":599433,"node_id":"MDQ6VXNlcjU5OTQzMw==","avatar_url":"https://avatars2.githubusercontent.com/u/599433?v=4","gravatar_id":"","url":"https://api.github.com/users/b1naryth1ef","html_url":"https://github.com/b1naryth1ef","followers_url":"https://api.github.com/users/b1naryth1ef/followers","following_url":"https://api.github.com/users/b1naryth1ef/following{/other_user}","gists_url":"https://api.github.com/users/b1naryth1ef/gists{/gist_id}","starred_url":"https://api.github.com/users/b1naryth1ef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b1naryth1ef/subscriptions","organizations_url":"https://api.github.com/users/b1naryth1ef/orgs","repos_url":"https://api.github.com/users/b1naryth1ef/repos","events_url":"https://api.github.com/users/b1naryth1ef/events{/privacy}","received_events_url":"https://api.github.com/users/b1naryth1ef/received_events","type":"User","site_admin":false},"assignees":[{"login":"b1naryth1ef","id":599433,"node_id":"MDQ6VXNlcjU5OTQzMw==","avatar_url":"https://avatars2.githubusercontent.com/u/599433?v=4","gravatar_id":"","url":"https://api.github.com/users/b1naryth1ef","html_url":"https://github.com/b1naryth1ef","followers_url":"https://api.github.com/users/b1naryth1ef/followers","following_url":"https://api.github.com/users/b1naryth1ef/following{/other_user}","gists_url":"https://api.github.com/users/b1naryth1ef/gists{/gist_id}","starred_url":"https://api.github.com/users/b1naryth1ef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b1naryth1ef/subscriptions","organizations_url":"https://api.github.com/users/b1naryth1ef/orgs","repos_url":"https://api.github.com/users/b1naryth1ef/repos","events_url":"https://api.github.com/users/b1naryth1ef/events{/privacy}","received_events_url":"https://api.github.com/users/b1naryth1ef/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/getsentry/xds/pulls/1/commits","review_comments_url":"https://api.github.com/repos/getsentry/xds/pulls/1/comments","review_comment_url":"https://api.github.com/repos/getsentry/xds/pulls/comments{/number}","comments_url":"https://api.github.com/repos/getsentry/xds/issues/1/comments","statuses_url":"https://api.github.com/repos/getsentry/xds/statuses/a24b523902b034bc4c5d6280cefe505a3d5f9d8d","head":{"label":"getsentry:feature/bootstrap-mode","ref":"feature/bootstrap-mode","sha":"a24b523902b034bc4c5d6280cefe505a3d5f9d8d","user":{"login":"getsentry","id":1396951,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzOTY5NTE=","avatar_url":"https://avatars0.githubusercontent.com/u/1396951?v=4","gravatar_id":"","url":"https://api.github.com/users/getsentry","html_url":"https://github.com/getsentry","followers_url":"https://api.github.com/users/getsentry/followers","following_url":"https://api.github.com/users/getsentry/following{/other_user}","gists_url":"https://api.github.com/users/getsentry/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry/subscriptions","organizations_url":"https://api.github.com/users/getsentry/orgs","repos_url":"https://api.github.com/users/getsentry/repos","events_url":"https://api.github.com/users/getsentry/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry/received_events","type":"Organization","site_admin":false},"repo":{"id":190784891,"node_id":"MDEwOlJlcG9zaXRvcnkxOTA3ODQ4OTE=","name":"xds","full_name":"getsentry/xds","private":false,"owner":{"login":"getsentry","id":1396951,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzOTY5NTE=","avatar_url":"https://avatars0.githubusercontent.com/u/1396951?v=4","gravatar_id":"","url":"https://api.github.com/users/getsentry","html_url":"https://github.com/getsentry","followers_url":"https://api.github.com/users/getsentry/followers","following_url":"https://api.github.com/users/getsentry/following{/other_user}","gists_url":"https://api.github.com/users/getsentry/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry/subscriptions","organizations_url":"https://api.github.com/users/getsentry/orgs","repos_url":"https://api.github.com/users/getsentry/repos","events_url":"https://api.github.com/users/getsentry/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/getsentry/xds","description":"xDS service for Envoy","fork":false,"url":"https://api.github.com/repos/getsentry/xds","forks_url":"https://api.github.com/repos/getsentry/xds/forks","keys_url":"https://api.github.com/repos/getsentry/xds/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getsentry/xds/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getsentry/xds/teams","hooks_url":"https://api.github.com/repos/getsentry/xds/hooks","issue_events_url":"https://api.github.com/repos/getsentry/xds/issues/events{/number}","events_url":"https://api.github.com/repos/getsentry/xds/events","assignees_url":"https://api.github.com/repos/getsentry/xds/assignees{/user}","branches_url":"https://api.github.com/repos/getsentry/xds/branches{/branch}","tags_url":"https://api.github.com/repos/getsentry/xds/tags","blobs_url":"https://api.github.com/repos/getsentry/xds/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getsentry/xds/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getsentry/xds/git/refs{/sha}","trees_url":"https://api.github.com/repos/getsentry/xds/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getsentry/xds/statuses/{sha}","languages_url":"https://api.github.com/repos/getsentry/xds/languages","stargazers_url":"https://api.github.com/repos/getsentry/xds/stargazers","contributors_url":"https://api.github.com/repos/getsentry/xds/contributors","subscribers_url":"https://api.github.com/repos/getsentry/xds/subscribers","subscription_url":"https://api.github.com/repos/getsentry/xds/subscription","commits_url":"https://api.github.com/repos/getsentry/xds/commits{/sha}","git_commits_url":"https://api.github.com/repos/getsentry/xds/git/commits{/sha}","comments_url":"https://api.github.com/repos/getsentry/xds/comments{/number}","issue_comment_url":"https://api.github.com/repos/getsentry/xds/issues/comments{/number}","contents_url":"https://api.github.com/repos/getsentry/xds/contents/{+path}","compare_url":"https://api.github.com/repos/getsentry/xds/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getsentry/xds/merges","archive_url":"https://api.github.com/repos/getsentry/xds/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getsentry/xds/downloads","issues_url":"https://api.github.com/repos/getsentry/xds/issues{/number}","pulls_url":"https://api.github.com/repos/getsentry/xds/pulls{/number}","milestones_url":"https://api.github.com/repos/getsentry/xds/milestones{/number}","notifications_url":"https://api.github.com/repos/getsentry/xds/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getsentry/xds/labels{/name}","releases_url":"https://api.github.com/repos/getsentry/xds/releases{/id}","deployments_url":"https://api.github.com/repos/getsentry/xds/deployments","created_at":"2019-06-07T17:39:35Z","updated_at":"2019-09-25T18:01:19Z","pushed_at":"2019-10-22T19:39:51Z","git_url":"git://github.com/getsentry/xds.git","ssh_url":"git@github.com:getsentry/xds.git","clone_url":"https://github.com/getsentry/xds.git","svn_url":"https://github.com/getsentry/xds","homepage":null,"size":42,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"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":1,"watchers":1,"default_branch":"master"}},"base":{"label":"getsentry:master","ref":"master","sha":"f0005cfa4d9b16029d38cd68ca1d456933576a77","user":{"login":"getsentry","id":1396951,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzOTY5NTE=","avatar_url":"https://avatars0.githubusercontent.com/u/1396951?v=4","gravatar_id":"","url":"https://api.github.com/users/getsentry","html_url":"https://github.com/getsentry","followers_url":"https://api.github.com/users/getsentry/followers","following_url":"https://api.github.com/users/getsentry/following{/other_user}","gists_url":"https://api.github.com/users/getsentry/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry/subscriptions","organizations_url":"https://api.github.com/users/getsentry/orgs","repos_url":"https://api.github.com/users/getsentry/repos","events_url":"https://api.github.com/users/getsentry/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry/received_events","type":"Organization","site_admin":false},"repo":{"id":190784891,"node_id":"MDEwOlJlcG9zaXRvcnkxOTA3ODQ4OTE=","name":"xds","full_name":"getsentry/xds","private":false,"owner":{"login":"getsentry","id":1396951,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzOTY5NTE=","avatar_url":"https://avatars0.githubusercontent.com/u/1396951?v=4","gravatar_id":"","url":"https://api.github.com/users/getsentry","html_url":"https://github.com/getsentry","followers_url":"https://api.github.com/users/getsentry/followers","following_url":"https://api.github.com/users/getsentry/following{/other_user}","gists_url":"https://api.github.com/users/getsentry/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry/subscriptions","organizations_url":"https://api.github.com/users/getsentry/orgs","repos_url":"https://api.github.com/users/getsentry/repos","events_url":"https://api.github.com/users/getsentry/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/getsentry/xds","description":"xDS service for Envoy","fork":false,"url":"https://api.github.com/repos/getsentry/xds","forks_url":"https://api.github.com/repos/getsentry/xds/forks","keys_url":"https://api.github.com/repos/getsentry/xds/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getsentry/xds/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getsentry/xds/teams","hooks_url":"https://api.github.com/repos/getsentry/xds/hooks","issue_events_url":"https://api.github.com/repos/getsentry/xds/issues/events{/number}","events_url":"https://api.github.com/repos/getsentry/xds/events","assignees_url":"https://api.github.com/repos/getsentry/xds/assignees{/user}","branches_url":"https://api.github.com/repos/getsentry/xds/branches{/branch}","tags_url":"https://api.github.com/repos/getsentry/xds/tags","blobs_url":"https://api.github.com/repos/getsentry/xds/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getsentry/xds/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getsentry/xds/git/refs{/sha}","trees_url":"https://api.github.com/repos/getsentry/xds/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getsentry/xds/statuses/{sha}","languages_url":"https://api.github.com/repos/getsentry/xds/languages","stargazers_url":"https://api.github.com/repos/getsentry/xds/stargazers","contributors_url":"https://api.github.com/repos/getsentry/xds/contributors","subscribers_url":"https://api.github.com/repos/getsentry/xds/subscribers","subscription_url":"https://api.github.com/repos/getsentry/xds/subscription","commits_url":"https://api.github.com/repos/getsentry/xds/commits{/sha}","git_commits_url":"https://api.github.com/repos/getsentry/xds/git/commits{/sha}","comments_url":"https://api.github.com/repos/getsentry/xds/comments{/number}","issue_comment_url":"https://api.github.com/repos/getsentry/xds/issues/comments{/number}","contents_url":"https://api.github.com/repos/getsentry/xds/contents/{+path}","compare_url":"https://api.github.com/repos/getsentry/xds/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getsentry/xds/merges","archive_url":"https://api.github.com/repos/getsentry/xds/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getsentry/xds/downloads","issues_url":"https://api.github.com/repos/getsentry/xds/issues{/number}","pulls_url":"https://api.github.com/repos/getsentry/xds/pulls{/number}","milestones_url":"https://api.github.com/repos/getsentry/xds/milestones{/number}","notifications_url":"https://api.github.com/repos/getsentry/xds/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getsentry/xds/labels{/name}","releases_url":"https://api.github.com/repos/getsentry/xds/releases{/id}","deployments_url":"https://api.github.com/repos/getsentry/xds/deployments","created_at":"2019-06-07T17:39:35Z","updated_at":"2019-09-25T18:01:19Z","pushed_at":"2019-10-22T19:39:51Z","git_url":"git://github.com/getsentry/xds.git","ssh_url":"git@github.com:getsentry/xds.git","clone_url":"https://github.com/getsentry/xds.git","svn_url":"https://github.com/getsentry/xds","homepage":null,"size":42,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"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":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/getsentry/xds/pulls/1"},"html":{"href":"https://github.com/getsentry/xds/pull/1"},"issue":{"href":"https://api.github.com/repos/getsentry/xds/issues/1"},"comments":{"href":"https://api.github.com/repos/getsentry/xds/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/getsentry/xds/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/getsentry/xds/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/getsentry/xds/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/getsentry/xds/statuses/a24b523902b034bc4c5d6280cefe505a3d5f9d8d"}},"author_association":"NONE"}}
{"actor":{"display_login":"mattrobenolt"}}