{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/63135991","id":63135991,"diff_hunk":"@@ -0,0 +1,99 @@\n+/*\n+Copyright 2016 The Kubernetes Authors All rights reserved.\n+\n+Licensed under the Apache License, Version 2.0 (the \"License\");\n+you may not use this file except in compliance with the License.\n+You may obtain a copy of the License at\n+\n+    http://www.apache.org/licenses/LICENSE-2.0\n+\n+Unless required by applicable law or agreed to in writing, software\n+distributed under the License is distributed on an \"AS IS\" BASIS,\n+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+See the License for the specific language governing permissions and\n+limitations under the License.\n+*/\n+\n+package dnsprovider\n+\n+import (\n+\t\"fmt\"\n+\t\"io\"\n+\t\"os\"\n+\t\"sync\"\n+\n+\t\"github.com/golang/glog\"\n+)\n+\n+// Factory is a function that returns a dnsprovider.Interface.\n+// The config parameter provides an io.Reader handler to the factory in\n+// order to load specific configurations. If no configuration is provided\n+// the parameter is nil.\n+type Factory func(config io.Reader) (Interface, error)\n+\n+// All registered dns providers.\n+var providersMutex sync.Mutex\n+var providers = make(map[string]Factory)\n+\n+// RegisterDnsProvider registers a dnsprovider.Factory by name.  This\n+// is expected to happen during startup.\n+func RegisterDnsProvider(name string, cloud Factory) {\n+\tprovidersMutex.Lock()\n+\tdefer providersMutex.Unlock()\n+\tif _, found := providers[name]; found {\n+\t\tglog.Fatalf(\"DNS provider %q was registered twice\", name)\n+\t}\n+\tglog.V(1).Infof(\"Registered DNS provider %q\", name)\n+\tproviders[name] = cloud\n+}\n+\n+// GetDnsProvider creates an instance of the named DNS provider, or nil if\n+// the name is not known.  The error return is only used if the named provider\n+// was known but failed to initialize. The config parameter specifies the\n+// io.Reader handler of the configuration file for the DNS provider, or nil\n+// for no configuation.\n+func GetDnsProvider(name string, config io.Reader) (Interface, error) {\n+\tprovidersMutex.Lock()\n+\tdefer providersMutex.Unlock()\n+\tf, found := providers[name]\n+\tif !found {\n+\t\treturn nil, nil\n+\t}\n+\treturn f(config)\n+}\n+\n+// InitDnsProvider creates an instance of the named DNS provider.\n+func InitDnsProvider(name string, configFilePath string) (Interface, error) {\n+\tvar dns Interface\n+\tvar err error\n+\n+\tif name == \"\" {\n+\t\tglog.Info(\"No DNS provider specified.\")\n+\t\treturn nil, nil\n+\t}\n+\n+\tif configFilePath != \"\" {\n+\t\tvar config *os.File\n+\t\tconfig, err = os.Open(configFilePath)\n+\t\tif err != nil {\n+\t\t\tglog.Fatalf(\"Couldn't open DNS provider configuration %s: %#v\",","path":"federation/pkg/dnsprovider/plugins.go","position":79,"original_position":79,"commit_id":"cc571c65e099161759876ab76c1266eb2c817f09","original_commit_id":"cc571c65e099161759876ab76c1266eb2c817f09","user":{"login":"madhusudancs","id":10183,"avatar_url":"https://avatars.githubusercontent.com/u/10183?v=3","gravatar_id":"","url":"https://api.github.com/users/madhusudancs","html_url":"https://github.com/madhusudancs","followers_url":"https://api.github.com/users/madhusudancs/followers","following_url":"https://api.github.com/users/madhusudancs/following{/other_user}","gists_url":"https://api.github.com/users/madhusudancs/gists{/gist_id}","starred_url":"https://api.github.com/users/madhusudancs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madhusudancs/subscriptions","organizations_url":"https://api.github.com/users/madhusudancs/orgs","repos_url":"https://api.github.com/users/madhusudancs/repos","events_url":"https://api.github.com/users/madhusudancs/events{/privacy}","received_events_url":"https://api.github.com/users/madhusudancs/received_events","type":"User","site_admin":false},"body":"Should this be fatal? Can't the caller recover from this error?","created_at":"2016-05-13T05:52:18Z","updated_at":"2016-05-13T05:52:18Z","html_url":"https://github.com/kubernetes/kubernetes/pull/25389#discussion_r63135991","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/25389","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/63135991"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/25389#discussion_r63135991"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/25389"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/25389","id":69436496,"html_url":"https://github.com/kubernetes/kubernetes/pull/25389","diff_url":"https://github.com/kubernetes/kubernetes/pull/25389.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/25389.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/25389","number":25389,"state":"open","locked":false,"title":"Google Cloud DNS dnsprovider","user":{"login":"quinton-hoole","id":10390785,"avatar_url":"https://avatars.githubusercontent.com/u/10390785?v=3","gravatar_id":"","url":"https://api.github.com/users/quinton-hoole","html_url":"https://github.com/quinton-hoole","followers_url":"https://api.github.com/users/quinton-hoole/followers","following_url":"https://api.github.com/users/quinton-hoole/following{/other_user}","gists_url":"https://api.github.com/users/quinton-hoole/gists{/gist_id}","starred_url":"https://api.github.com/users/quinton-hoole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinton-hoole/subscriptions","organizations_url":"https://api.github.com/users/quinton-hoole/orgs","repos_url":"https://api.github.com/users/quinton-hoole/repos","events_url":"https://api.github.com/users/quinton-hoole/events{/privacy}","received_events_url":"https://api.github.com/users/quinton-hoole/received_events","type":"User","site_admin":false},"body":"Add Google Cloud DNS dnsprovider.\r\n","created_at":"2016-05-10T01:25:53Z","updated_at":"2016-05-13T05:52:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"782a89c4633607328be3e3692a98c327a4e96508","assignee":{"login":"madhusudancs","id":10183,"avatar_url":"https://avatars.githubusercontent.com/u/10183?v=3","gravatar_id":"","url":"https://api.github.com/users/madhusudancs","html_url":"https://github.com/madhusudancs","followers_url":"https://api.github.com/users/madhusudancs/followers","following_url":"https://api.github.com/users/madhusudancs/following{/other_user}","gists_url":"https://api.github.com/users/madhusudancs/gists{/gist_id}","starred_url":"https://api.github.com/users/madhusudancs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madhusudancs/subscriptions","organizations_url":"https://api.github.com/users/madhusudancs/orgs","repos_url":"https://api.github.com/users/madhusudancs/repos","events_url":"https://api.github.com/users/madhusudancs/events{/privacy}","received_events_url":"https://api.github.com/users/madhusudancs/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/18","html_url":"https://github.com/kubernetes/kubernetes/milestones/v1.3","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/18/labels","id":1638460,"number":18,"title":"v1.3","description":"https://github.com/kubernetes/kubernetes/wiki/Release-1.3","creator":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"open_issues":193,"closed_issues":72,"state":"open","created_at":"2016-03-11T07:40:20Z","updated_at":"2016-05-13T05:19:54Z","due_on":"2016-06-24T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/25389/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/25389/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/25389/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/cc571c65e099161759876ab76c1266eb2c817f09","head":{"label":"quinton-hoole:2016-05-07-google-cloud-dns","ref":"2016-05-07-google-cloud-dns","sha":"cc571c65e099161759876ab76c1266eb2c817f09","user":{"login":"quinton-hoole","id":10390785,"avatar_url":"https://avatars.githubusercontent.com/u/10390785?v=3","gravatar_id":"","url":"https://api.github.com/users/quinton-hoole","html_url":"https://github.com/quinton-hoole","followers_url":"https://api.github.com/users/quinton-hoole/followers","following_url":"https://api.github.com/users/quinton-hoole/following{/other_user}","gists_url":"https://api.github.com/users/quinton-hoole/gists{/gist_id}","starred_url":"https://api.github.com/users/quinton-hoole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinton-hoole/subscriptions","organizations_url":"https://api.github.com/users/quinton-hoole/orgs","repos_url":"https://api.github.com/users/quinton-hoole/repos","events_url":"https://api.github.com/users/quinton-hoole/events{/privacy}","received_events_url":"https://api.github.com/users/quinton-hoole/received_events","type":"User","site_admin":false},"repo":{"id":29155350,"name":"kubernetes","full_name":"quinton-hoole/kubernetes","owner":{"login":"quinton-hoole","id":10390785,"avatar_url":"https://avatars.githubusercontent.com/u/10390785?v=3","gravatar_id":"","url":"https://api.github.com/users/quinton-hoole","html_url":"https://github.com/quinton-hoole","followers_url":"https://api.github.com/users/quinton-hoole/followers","following_url":"https://api.github.com/users/quinton-hoole/following{/other_user}","gists_url":"https://api.github.com/users/quinton-hoole/gists{/gist_id}","starred_url":"https://api.github.com/users/quinton-hoole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinton-hoole/subscriptions","organizations_url":"https://api.github.com/users/quinton-hoole/orgs","repos_url":"https://api.github.com/users/quinton-hoole/repos","events_url":"https://api.github.com/users/quinton-hoole/events{/privacy}","received_events_url":"https://api.github.com/users/quinton-hoole/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/quinton-hoole/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/quinton-hoole/kubernetes","forks_url":"https://api.github.com/repos/quinton-hoole/kubernetes/forks","keys_url":"https://api.github.com/repos/quinton-hoole/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quinton-hoole/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quinton-hoole/kubernetes/teams","hooks_url":"https://api.github.com/repos/quinton-hoole/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/quinton-hoole/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/quinton-hoole/kubernetes/events","assignees_url":"https://api.github.com/repos/quinton-hoole/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/quinton-hoole/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/quinton-hoole/kubernetes/tags","blobs_url":"https://api.github.com/repos/quinton-hoole/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quinton-hoole/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quinton-hoole/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/quinton-hoole/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quinton-hoole/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/quinton-hoole/kubernetes/languages","stargazers_url":"https://api.github.com/repos/quinton-hoole/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/quinton-hoole/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/quinton-hoole/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/quinton-hoole/kubernetes/subscription","commits_url":"https://api.github.com/repos/quinton-hoole/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/quinton-hoole/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/quinton-hoole/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/quinton-hoole/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/quinton-hoole/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/quinton-hoole/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quinton-hoole/kubernetes/merges","archive_url":"https://api.github.com/repos/quinton-hoole/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quinton-hoole/kubernetes/downloads","issues_url":"https://api.github.com/repos/quinton-hoole/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/quinton-hoole/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/quinton-hoole/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/quinton-hoole/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quinton-hoole/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/quinton-hoole/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/quinton-hoole/kubernetes/deployments","created_at":"2015-01-12T20:28:39Z","updated_at":"2015-04-15T01:58:44Z","pushed_at":"2016-05-13T05:19:20Z","git_url":"git://github.com/quinton-hoole/kubernetes.git","ssh_url":"git@github.com:quinton-hoole/kubernetes.git","clone_url":"https://github.com/quinton-hoole/kubernetes.git","svn_url":"https://github.com/quinton-hoole/kubernetes","homepage":null,"size":187392,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"15919f336feff5bfe8f1fe094b43bd34341c0263","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","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":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","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/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2016-05-13T05:04:55Z","pushed_at":"2016-05-13T05:50:22Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":394260,"stargazers_count":14349,"watchers_count":14349,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4310,"mirror_url":null,"open_issues_count":3608,"forks":4310,"open_issues":3608,"watchers":14349,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/25389"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/25389"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/25389"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/25389/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/25389/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/25389/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/cc571c65e099161759876ab76c1266eb2c817f09"}}}}