{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/minikube/pulls/comments/62715876","id":62715876,"diff_hunk":"@@ -71,4 +80,23 @@ func (lk LocalkubeServer) GetAPIServerInsecureURL() string {\n // Get the host's public IP address\n func (lk LocalkubeServer) GetHostIP() (net.IP, error) {\n \treturn utilnet.ChooseBindAddress(net.ParseIP(\"0.0.0.0\"))\n-}\n\\ No newline at end of file\n+}\n+\n+func (lk LocalkubeServer) GenerateCerts() {\n+\n+\tif util.CanReadFile(lk.GetPublicKeyCertPath()) && util.CanReadFile(lk.GetPrivateKeyCertPath()) {\n+\t\tfmt.Println(\"Using existing certs\")\n+\t\treturn\n+\t}\n+\n+\talternateIPs := []net.IP{lk.ServiceClusterIPRange.IP}\n+\talternateDNS := []string{fmt.Sprintf(\"%s.%s\", \"kubernetes.default.svc\", lk.DNSDomain), \"kubernetes.default.svc\", \"kubernetes.default\", \"kubernetes\"}\n+\thostIP, err := lk.GetHostIP()\n+\tif err != nil {\n+\t\tfmt.Println(\"Failed to get host IP: \", err)\n+\t}\n+\n+\tif err := utilcrypto.GenerateSelfSignedCert(hostIP.String(), lk.GetPublicKeyCertPath(), lk.GetPrivateKeyCertPath(), alternateIPs, alternateDNS); err != nil {\n+\t\tfmt.Println(\"Failed to create certs: \", err)","path":"pkg/localkube/localkube.go","position":null,"original_position":51,"commit_id":"f94581f132fa72785495325ac526416e616a7f03","original_commit_id":"0c05a831b48e6a0cdc0e81b83eac6fc016707d22","user":{"login":"luxas","id":5442475,"avatar_url":"https://avatars.githubusercontent.com/u/5442475?v=3","gravatar_id":"","url":"https://api.github.com/users/luxas","html_url":"https://github.com/luxas","followers_url":"https://api.github.com/users/luxas/followers","following_url":"https://api.github.com/users/luxas/following{/other_user}","gists_url":"https://api.github.com/users/luxas/gists{/gist_id}","starred_url":"https://api.github.com/users/luxas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luxas/subscriptions","organizations_url":"https://api.github.com/users/luxas/orgs","repos_url":"https://api.github.com/users/luxas/repos","events_url":"https://api.github.com/users/luxas/events{/privacy}","received_events_url":"https://api.github.com/users/luxas/received_events","type":"User","site_admin":false},"body":"The whole error handling have to be refactored and taken care of as a whole. \r\nThe same for logging.\r\nBut updating this to return the error :)","created_at":"2016-05-10T17:31:31Z","updated_at":"2016-05-10T17:31:32Z","html_url":"https://github.com/kubernetes/minikube/pull/54#discussion_r62715876","pull_request_url":"https://api.github.com/repos/kubernetes/minikube/pulls/54","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/minikube/pulls/comments/62715876"},"html":{"href":"https://github.com/kubernetes/minikube/pull/54#discussion_r62715876"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/minikube/pulls/54"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/minikube/pulls/54","id":69407528,"html_url":"https://github.com/kubernetes/minikube/pull/54","diff_url":"https://github.com/kubernetes/minikube/pull/54.diff","patch_url":"https://github.com/kubernetes/minikube/pull/54.patch","issue_url":"https://api.github.com/repos/kubernetes/minikube/issues/54","number":54,"state":"open","locked":false,"title":"Very large refactor of localkube","user":{"login":"luxas","id":5442475,"avatar_url":"https://avatars.githubusercontent.com/u/5442475?v=3","gravatar_id":"","url":"https://api.github.com/users/luxas","html_url":"https://github.com/luxas","followers_url":"https://api.github.com/users/luxas/followers","following_url":"https://api.github.com/users/luxas/following{/other_user}","gists_url":"https://api.github.com/users/luxas/gists{/gist_id}","starred_url":"https://api.github.com/users/luxas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luxas/subscriptions","organizations_url":"https://api.github.com/users/luxas/orgs","repos_url":"https://api.github.com/users/luxas/repos","events_url":"https://api.github.com/users/luxas/events{/privacy}","received_events_url":"https://api.github.com/users/luxas/received_events","type":"User","site_admin":false},"body":"Fixed lots of bugs, added flags and commands via cobra, extracted a simple interface for SimpleServer for all Kubernetes components, made DNS working again, created the type LocalkubeServer which holds all necessary data etc.\r\n\r\nThe job isn't done, but it's a step in the right direction.\r\n\r\nLocalkube requires the certs to be present to work right now, but that's the next step for us to do: get certs generated by localkube.\r\n\r\nPTAL @dlorenc @ethernetdan @mfburnett","created_at":"2016-05-09T20:43:57Z","updated_at":"2016-05-10T17:31:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"80ae07cabfa4787b3d2504d7f736f757609daa08","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/minikube/pulls/54/commits","review_comments_url":"https://api.github.com/repos/kubernetes/minikube/pulls/54/comments","review_comment_url":"https://api.github.com/repos/kubernetes/minikube/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/minikube/issues/54/comments","statuses_url":"https://api.github.com/repos/kubernetes/minikube/statuses/f94581f132fa72785495325ac526416e616a7f03","head":{"label":"luxas:remove_weave","ref":"remove_weave","sha":"f94581f132fa72785495325ac526416e616a7f03","user":{"login":"luxas","id":5442475,"avatar_url":"https://avatars.githubusercontent.com/u/5442475?v=3","gravatar_id":"","url":"https://api.github.com/users/luxas","html_url":"https://github.com/luxas","followers_url":"https://api.github.com/users/luxas/followers","following_url":"https://api.github.com/users/luxas/following{/other_user}","gists_url":"https://api.github.com/users/luxas/gists{/gist_id}","starred_url":"https://api.github.com/users/luxas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luxas/subscriptions","organizations_url":"https://api.github.com/users/luxas/orgs","repos_url":"https://api.github.com/users/luxas/repos","events_url":"https://api.github.com/users/luxas/events{/privacy}","received_events_url":"https://api.github.com/users/luxas/received_events","type":"User","site_admin":false},"repo":{"id":56478548,"name":"minikube","full_name":"luxas/minikube","owner":{"login":"luxas","id":5442475,"avatar_url":"https://avatars.githubusercontent.com/u/5442475?v=3","gravatar_id":"","url":"https://api.github.com/users/luxas","html_url":"https://github.com/luxas","followers_url":"https://api.github.com/users/luxas/followers","following_url":"https://api.github.com/users/luxas/following{/other_user}","gists_url":"https://api.github.com/users/luxas/gists{/gist_id}","starred_url":"https://api.github.com/users/luxas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luxas/subscriptions","organizations_url":"https://api.github.com/users/luxas/orgs","repos_url":"https://api.github.com/users/luxas/repos","events_url":"https://api.github.com/users/luxas/events{/privacy}","received_events_url":"https://api.github.com/users/luxas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/luxas/minikube","description":"Run Kubernetes locally","fork":true,"url":"https://api.github.com/repos/luxas/minikube","forks_url":"https://api.github.com/repos/luxas/minikube/forks","keys_url":"https://api.github.com/repos/luxas/minikube/keys{/key_id}","collaborators_url":"https://api.github.com/repos/luxas/minikube/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/luxas/minikube/teams","hooks_url":"https://api.github.com/repos/luxas/minikube/hooks","issue_events_url":"https://api.github.com/repos/luxas/minikube/issues/events{/number}","events_url":"https://api.github.com/repos/luxas/minikube/events","assignees_url":"https://api.github.com/repos/luxas/minikube/assignees{/user}","branches_url":"https://api.github.com/repos/luxas/minikube/branches{/branch}","tags_url":"https://api.github.com/repos/luxas/minikube/tags","blobs_url":"https://api.github.com/repos/luxas/minikube/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/luxas/minikube/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/luxas/minikube/git/refs{/sha}","trees_url":"https://api.github.com/repos/luxas/minikube/git/trees{/sha}","statuses_url":"https://api.github.com/repos/luxas/minikube/statuses/{sha}","languages_url":"https://api.github.com/repos/luxas/minikube/languages","stargazers_url":"https://api.github.com/repos/luxas/minikube/stargazers","contributors_url":"https://api.github.com/repos/luxas/minikube/contributors","subscribers_url":"https://api.github.com/repos/luxas/minikube/subscribers","subscription_url":"https://api.github.com/repos/luxas/minikube/subscription","commits_url":"https://api.github.com/repos/luxas/minikube/commits{/sha}","git_commits_url":"https://api.github.com/repos/luxas/minikube/git/commits{/sha}","comments_url":"https://api.github.com/repos/luxas/minikube/comments{/number}","issue_comment_url":"https://api.github.com/repos/luxas/minikube/issues/comments{/number}","contents_url":"https://api.github.com/repos/luxas/minikube/contents/{+path}","compare_url":"https://api.github.com/repos/luxas/minikube/compare/{base}...{head}","merges_url":"https://api.github.com/repos/luxas/minikube/merges","archive_url":"https://api.github.com/repos/luxas/minikube/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/luxas/minikube/downloads","issues_url":"https://api.github.com/repos/luxas/minikube/issues{/number}","pulls_url":"https://api.github.com/repos/luxas/minikube/pulls{/number}","milestones_url":"https://api.github.com/repos/luxas/minikube/milestones{/number}","notifications_url":"https://api.github.com/repos/luxas/minikube/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/luxas/minikube/labels{/name}","releases_url":"https://api.github.com/repos/luxas/minikube/releases{/id}","deployments_url":"https://api.github.com/repos/luxas/minikube/deployments","created_at":"2016-04-18T05:07:48Z","updated_at":"2016-05-01T14:29:35Z","pushed_at":"2016-05-10T16:55:06Z","git_url":"git://github.com/luxas/minikube.git","ssh_url":"git@github.com:luxas/minikube.git","clone_url":"https://github.com/luxas/minikube.git","svn_url":"https://github.com/luxas/minikube","homepage":null,"size":7086,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"488e4dcc6e170b40cac6357b6d189cf4b6c0d383","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":56353740,"name":"minikube","full_name":"kubernetes/minikube","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/minikube","description":"Run Kubernetes locally","fork":false,"url":"https://api.github.com/repos/kubernetes/minikube","forks_url":"https://api.github.com/repos/kubernetes/minikube/forks","keys_url":"https://api.github.com/repos/kubernetes/minikube/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/minikube/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/minikube/teams","hooks_url":"https://api.github.com/repos/kubernetes/minikube/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/minikube/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/minikube/events","assignees_url":"https://api.github.com/repos/kubernetes/minikube/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/minikube/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/minikube/tags","blobs_url":"https://api.github.com/repos/kubernetes/minikube/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/minikube/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/minikube/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/minikube/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/minikube/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/minikube/languages","stargazers_url":"https://api.github.com/repos/kubernetes/minikube/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/minikube/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/minikube/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/minikube/subscription","commits_url":"https://api.github.com/repos/kubernetes/minikube/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/minikube/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/minikube/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/minikube/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/minikube/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/minikube/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/minikube/merges","archive_url":"https://api.github.com/repos/kubernetes/minikube/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/minikube/downloads","issues_url":"https://api.github.com/repos/kubernetes/minikube/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/minikube/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/minikube/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/minikube/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/minikube/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/minikube/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/minikube/deployments","created_at":"2016-04-15T22:38:35Z","updated_at":"2016-05-09T14:13:09Z","pushed_at":"2016-05-10T16:55:07Z","git_url":"git://github.com/kubernetes/minikube.git","ssh_url":"git@github.com:kubernetes/minikube.git","clone_url":"https://github.com/kubernetes/minikube.git","svn_url":"https://github.com/kubernetes/minikube","homepage":null,"size":7067,"stargazers_count":27,"watchers_count":27,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":21,"forks":7,"open_issues":21,"watchers":27,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/minikube/pulls/54"},"html":{"href":"https://github.com/kubernetes/minikube/pull/54"},"issue":{"href":"https://api.github.com/repos/kubernetes/minikube/issues/54"},"comments":{"href":"https://api.github.com/repos/kubernetes/minikube/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/minikube/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/minikube/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/minikube/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/minikube/statuses/f94581f132fa72785495325ac526416e616a7f03"}}}}