{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/pulls/comments/177723288","pull_request_review_id":107645525,"id":177723288,"diff_hunk":"@@ -210,6 +225,48 @@ func createWorker(queue workqueue.RateLimitingInterface, resourceType string, ma\n \t}()\n }\n \n+func (c *controller) monitorConfigMap() {\n+\t// Cannot wait for the informer to push something into a queue.\n+\t// What we're waiting on may never exist without us configuring\n+\t// it, so we have to poll/ ask for it the first time to get it set.\n+\n+\t// Can we ask 'through' an informer? Is it a writeback cache? I\n+\t// only ever want to monitor and be notified about one configmap\n+\t// in a hardcoded place.\n+\tglog.V(9).Info(\"cluster ID monitor loop enter\")\n+\tcm, err := c.kubeClient.CoreV1().ConfigMaps(\"default\").Get(\"cluster-info\", metav1.GetOptions{})\n+\tif errors.IsNotFound(err) {\n+\t\tm := make(map[string]string)\n+\t\tm[\"id\"] = c.getClusterID()\n+\t\tcm := &corev1.ConfigMap{\n+\t\t\tObjectMeta: metav1.ObjectMeta{\n+\t\t\t\tName: \"cluster-info\",\n+\t\t\t},\n+\t\t\tData: m,\n+\t\t}\n+\t\t// if we fail to set the id,\n+\t\t// it could be due to permissions\n+\t\t// or due to being already set while we were trying\n+\t\tif _, err := c.kubeClient.CoreV1().ConfigMaps(\"default\").Create(cm); err != nil {\n+\t\t\tglog.Warningf(\"due to error %q, could not set clusterid configmap to %#v \", err, cm)\n+\t\t}\n+\t} else if nil == err {\n+\t\t// cluster id exists and is set\n+\t\t// get id out of cm\n+\t\tif id := cm.Data[\"id\"]; \"\" != id {\n+\t\t\tc.setClusterID(id)\n+\t\t} else {\n+\t\t\tm := make(map[string]string)\n+\t\t\tcm.Data = m\n+\t\t\tm[\"id\"] = c.getClusterID()\n+\t\t\tc.kubeClient.CoreV1().ConfigMaps(\"default\").Update(cm)","path":"pkg/controller/controller.go","position":77,"original_position":77,"commit_id":"77c1e4dc33cc9ccaea28e45868e7cc7e6cf8bdc1","original_commit_id":"77c1e4dc33cc9ccaea28e45868e7cc7e6cf8bdc1","user":{"login":"duglin","id":1944671,"avatar_url":"https://avatars1.githubusercontent.com/u/1944671?v=4","gravatar_id":"","url":"https://api.github.com/users/duglin","html_url":"https://github.com/duglin","followers_url":"https://api.github.com/users/duglin/followers","following_url":"https://api.github.com/users/duglin/following{/other_user}","gists_url":"https://api.github.com/users/duglin/gists{/gist_id}","starred_url":"https://api.github.com/users/duglin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duglin/subscriptions","organizations_url":"https://api.github.com/users/duglin/orgs","repos_url":"https://api.github.com/users/duglin/repos","events_url":"https://api.github.com/users/duglin/events{/privacy}","received_events_url":"https://api.github.com/users/duglin/received_events","type":"User","site_admin":false},"body":"What's the pattern we're following for when something is a cmd line flag vs a config file property? Seems like something as permanent (unchanging) as where to store this info would be better suited for the config file. I tend to think of cmd line stuff as things that might need to be changed (or overwritten) more often than this would.","created_at":"2018-03-28T11:54:20Z","updated_at":"2018-03-28T11:54:20Z","html_url":"https://github.com/kubernetes-incubator/service-catalog/pull/1658#discussion_r177723288","pull_request_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/pulls/1658","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kubernetes-incubator/service-catalog/pulls/comments/177723288"},"html":{"href":"https://github.com/kubernetes-incubator/service-catalog/pull/1658#discussion_r177723288"},"pull_request":{"href":"https://api.github.com/repos/kubernetes-incubator/service-catalog/pulls/1658"}},"in_reply_to_id":177637637},"pull_request":{"url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/pulls/1658","id":161753236,"html_url":"https://github.com/kubernetes-incubator/service-catalog/pull/1658","diff_url":"https://github.com/kubernetes-incubator/service-catalog/pull/1658.diff","patch_url":"https://github.com/kubernetes-incubator/service-catalog/pull/1658.patch","issue_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/issues/1658","number":1658,"state":"open","locked":false,"title":"Cluster-id configmap","user":{"login":"MHBauer","id":13337345,"avatar_url":"https://avatars2.githubusercontent.com/u/13337345?v=4","gravatar_id":"","url":"https://api.github.com/users/MHBauer","html_url":"https://github.com/MHBauer","followers_url":"https://api.github.com/users/MHBauer/followers","following_url":"https://api.github.com/users/MHBauer/following{/other_user}","gists_url":"https://api.github.com/users/MHBauer/gists{/gist_id}","starred_url":"https://api.github.com/users/MHBauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MHBauer/subscriptions","organizations_url":"https://api.github.com/users/MHBauer/orgs","repos_url":"https://api.github.com/users/MHBauer/repos","events_url":"https://api.github.com/users/MHBauer/events{/privacy}","received_events_url":"https://api.github.com/users/MHBauer/received_events","type":"User","site_admin":false},"body":"alternate to #1624\r\n\r\nI've been fighting with getting the tests to work and not blow up or race. \r\n\r\nI thought a poller would be simpler/easier than implementing the entire complexity of a new queue.\r\n\r\nMaybe this is better in some other controller, like an admission controller. ","created_at":"2018-01-08T23:41:03Z","updated_at":"2018-03-28T11:54:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"851af4eee4158c3bff83748e016e2b73d92ffc75","assignee":null,"assignees":[],"requested_reviewers":[{"login":"arschles","id":70865,"avatar_url":"https://avatars1.githubusercontent.com/u/70865?v=4","gravatar_id":"","url":"https://api.github.com/users/arschles","html_url":"https://github.com/arschles","followers_url":"https://api.github.com/users/arschles/followers","following_url":"https://api.github.com/users/arschles/following{/other_user}","gists_url":"https://api.github.com/users/arschles/gists{/gist_id}","starred_url":"https://api.github.com/users/arschles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arschles/subscriptions","organizations_url":"https://api.github.com/users/arschles/orgs","repos_url":"https://api.github.com/users/arschles/repos","events_url":"https://api.github.com/users/arschles/events{/privacy}","received_events_url":"https://api.github.com/users/arschles/received_events","type":"User","site_admin":false},{"login":"kibbles-n-bytes","id":4024724,"avatar_url":"https://avatars0.githubusercontent.com/u/4024724?v=4","gravatar_id":"","url":"https://api.github.com/users/kibbles-n-bytes","html_url":"https://github.com/kibbles-n-bytes","followers_url":"https://api.github.com/users/kibbles-n-bytes/followers","following_url":"https://api.github.com/users/kibbles-n-bytes/following{/other_user}","gists_url":"https://api.github.com/users/kibbles-n-bytes/gists{/gist_id}","starred_url":"https://api.github.com/users/kibbles-n-bytes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kibbles-n-bytes/subscriptions","organizations_url":"https://api.github.com/users/kibbles-n-bytes/orgs","repos_url":"https://api.github.com/users/kibbles-n-bytes/repos","events_url":"https://api.github.com/users/kibbles-n-bytes/events{/privacy}","received_events_url":"https://api.github.com/users/kibbles-n-bytes/received_events","type":"User","site_admin":false},{"login":"vaikas-google","id":11279988,"avatar_url":"https://avatars3.githubusercontent.com/u/11279988?v=4","gravatar_id":"","url":"https://api.github.com/users/vaikas-google","html_url":"https://github.com/vaikas-google","followers_url":"https://api.github.com/users/vaikas-google/followers","following_url":"https://api.github.com/users/vaikas-google/following{/other_user}","gists_url":"https://api.github.com/users/vaikas-google/gists{/gist_id}","starred_url":"https://api.github.com/users/vaikas-google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaikas-google/subscriptions","organizations_url":"https://api.github.com/users/vaikas-google/orgs","repos_url":"https://api.github.com/users/vaikas-google/repos","events_url":"https://api.github.com/users/vaikas-google/events{/privacy}","received_events_url":"https://api.github.com/users/vaikas-google/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":485046198,"url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"ededed","default":false},{"id":678154349,"url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/labels/size/XL","name":"size/XL","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/pulls/1658/commits","review_comments_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/pulls/1658/comments","review_comment_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/issues/1658/comments","statuses_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/statuses/77c1e4dc33cc9ccaea28e45868e7cc7e6cf8bdc1","head":{"label":"MHBauer:cluster-id-configmap","ref":"cluster-id-configmap","sha":"77c1e4dc33cc9ccaea28e45868e7cc7e6cf8bdc1","user":{"login":"MHBauer","id":13337345,"avatar_url":"https://avatars2.githubusercontent.com/u/13337345?v=4","gravatar_id":"","url":"https://api.github.com/users/MHBauer","html_url":"https://github.com/MHBauer","followers_url":"https://api.github.com/users/MHBauer/followers","following_url":"https://api.github.com/users/MHBauer/following{/other_user}","gists_url":"https://api.github.com/users/MHBauer/gists{/gist_id}","starred_url":"https://api.github.com/users/MHBauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MHBauer/subscriptions","organizations_url":"https://api.github.com/users/MHBauer/orgs","repos_url":"https://api.github.com/users/MHBauer/repos","events_url":"https://api.github.com/users/MHBauer/events{/privacy}","received_events_url":"https://api.github.com/users/MHBauer/received_events","type":"User","site_admin":false},"repo":{"id":70524191,"name":"service-catalog","full_name":"MHBauer/service-catalog","owner":{"login":"MHBauer","id":13337345,"avatar_url":"https://avatars2.githubusercontent.com/u/13337345?v=4","gravatar_id":"","url":"https://api.github.com/users/MHBauer","html_url":"https://github.com/MHBauer","followers_url":"https://api.github.com/users/MHBauer/followers","following_url":"https://api.github.com/users/MHBauer/following{/other_user}","gists_url":"https://api.github.com/users/MHBauer/gists{/gist_id}","starred_url":"https://api.github.com/users/MHBauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MHBauer/subscriptions","organizations_url":"https://api.github.com/users/MHBauer/orgs","repos_url":"https://api.github.com/users/MHBauer/repos","events_url":"https://api.github.com/users/MHBauer/events{/privacy}","received_events_url":"https://api.github.com/users/MHBauer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MHBauer/service-catalog","description":"Share and consume services in Kubernetes using service brokers","fork":true,"url":"https://api.github.com/repos/MHBauer/service-catalog","forks_url":"https://api.github.com/repos/MHBauer/service-catalog/forks","keys_url":"https://api.github.com/repos/MHBauer/service-catalog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MHBauer/service-catalog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MHBauer/service-catalog/teams","hooks_url":"https://api.github.com/repos/MHBauer/service-catalog/hooks","issue_events_url":"https://api.github.com/repos/MHBauer/service-catalog/issues/events{/number}","events_url":"https://api.github.com/repos/MHBauer/service-catalog/events","assignees_url":"https://api.github.com/repos/MHBauer/service-catalog/assignees{/user}","branches_url":"https://api.github.com/repos/MHBauer/service-catalog/branches{/branch}","tags_url":"https://api.github.com/repos/MHBauer/service-catalog/tags","blobs_url":"https://api.github.com/repos/MHBauer/service-catalog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MHBauer/service-catalog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MHBauer/service-catalog/git/refs{/sha}","trees_url":"https://api.github.com/repos/MHBauer/service-catalog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MHBauer/service-catalog/statuses/{sha}","languages_url":"https://api.github.com/repos/MHBauer/service-catalog/languages","stargazers_url":"https://api.github.com/repos/MHBauer/service-catalog/stargazers","contributors_url":"https://api.github.com/repos/MHBauer/service-catalog/contributors","subscribers_url":"https://api.github.com/repos/MHBauer/service-catalog/subscribers","subscription_url":"https://api.github.com/repos/MHBauer/service-catalog/subscription","commits_url":"https://api.github.com/repos/MHBauer/service-catalog/commits{/sha}","git_commits_url":"https://api.github.com/repos/MHBauer/service-catalog/git/commits{/sha}","comments_url":"https://api.github.com/repos/MHBauer/service-catalog/comments{/number}","issue_comment_url":"https://api.github.com/repos/MHBauer/service-catalog/issues/comments{/number}","contents_url":"https://api.github.com/repos/MHBauer/service-catalog/contents/{+path}","compare_url":"https://api.github.com/repos/MHBauer/service-catalog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MHBauer/service-catalog/merges","archive_url":"https://api.github.com/repos/MHBauer/service-catalog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MHBauer/service-catalog/downloads","issues_url":"https://api.github.com/repos/MHBauer/service-catalog/issues{/number}","pulls_url":"https://api.github.com/repos/MHBauer/service-catalog/pulls{/number}","milestones_url":"https://api.github.com/repos/MHBauer/service-catalog/milestones{/number}","notifications_url":"https://api.github.com/repos/MHBauer/service-catalog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MHBauer/service-catalog/labels{/name}","releases_url":"https://api.github.com/repos/MHBauer/service-catalog/releases{/id}","deployments_url":"https://api.github.com/repos/MHBauer/service-catalog/deployments","created_at":"2016-10-10T20:05:09Z","updated_at":"2018-03-22T23:22:37Z","pushed_at":"2018-03-27T14:54:13Z","git_url":"git://github.com/MHBauer/service-catalog.git","ssh_url":"git@github.com:MHBauer/service-catalog.git","clone_url":"https://github.com/MHBauer/service-catalog.git","svn_url":"https://github.com/MHBauer/service-catalog","homepage":"","size":98346,"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"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes-incubator:master","ref":"master","sha":"fb136f12c9e22997b9daba0f8ebd47b3d3498ad6","user":{"login":"kubernetes-incubator","id":20862812,"avatar_url":"https://avatars2.githubusercontent.com/u/20862812?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes-incubator","html_url":"https://github.com/kubernetes-incubator","followers_url":"https://api.github.com/users/kubernetes-incubator/followers","following_url":"https://api.github.com/users/kubernetes-incubator/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes-incubator/subscriptions","organizations_url":"https://api.github.com/users/kubernetes-incubator/orgs","repos_url":"https://api.github.com/users/kubernetes-incubator/repos","events_url":"https://api.github.com/users/kubernetes-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes-incubator/received_events","type":"Organization","site_admin":false},"repo":{"id":68024288,"name":"service-catalog","full_name":"kubernetes-incubator/service-catalog","owner":{"login":"kubernetes-incubator","id":20862812,"avatar_url":"https://avatars2.githubusercontent.com/u/20862812?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes-incubator","html_url":"https://github.com/kubernetes-incubator","followers_url":"https://api.github.com/users/kubernetes-incubator/followers","following_url":"https://api.github.com/users/kubernetes-incubator/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes-incubator/subscriptions","organizations_url":"https://api.github.com/users/kubernetes-incubator/orgs","repos_url":"https://api.github.com/users/kubernetes-incubator/repos","events_url":"https://api.github.com/users/kubernetes-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes-incubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes-incubator/service-catalog","description":"Consume services in Kubernetes using the Open Service Broker API","fork":false,"url":"https://api.github.com/repos/kubernetes-incubator/service-catalog","forks_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/forks","keys_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/teams","hooks_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/hooks","issue_events_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/events","assignees_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/tags","blobs_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/languages","stargazers_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/stargazers","contributors_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/contributors","subscribers_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/subscribers","subscription_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/subscription","commits_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/merges","archive_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/downloads","issues_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes-incubator/service-catalog/deployments","created_at":"2016-09-12T15:58:39Z","updated_at":"2018-03-27T20:34:22Z","pushed_at":"2018-03-28T00:33:44Z","git_url":"git://github.com/kubernetes-incubator/service-catalog.git","ssh_url":"git@github.com:kubernetes-incubator/service-catalog.git","clone_url":"https://github.com/kubernetes-incubator/service-catalog.git","svn_url":"https://github.com/kubernetes-incubator/service-catalog","homepage":"","size":97902,"stargazers_count":435,"watchers_count":435,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":159,"mirror_url":null,"archived":false,"open_issues_count":219,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":159,"open_issues":219,"watchers":435,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes-incubator/service-catalog/pulls/1658"},"html":{"href":"https://github.com/kubernetes-incubator/service-catalog/pull/1658"},"issue":{"href":"https://api.github.com/repos/kubernetes-incubator/service-catalog/issues/1658"},"comments":{"href":"https://api.github.com/repos/kubernetes-incubator/service-catalog/issues/1658/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes-incubator/service-catalog/pulls/1658/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes-incubator/service-catalog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes-incubator/service-catalog/pulls/1658/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes-incubator/service-catalog/statuses/77c1e4dc33cc9ccaea28e45868e7cc7e6cf8bdc1"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"duglin"}}