{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/40599787","id":40599787,"diff_hunk":"@@ -70,13 +72,39 @@ func makeTempDirOrDie(prefix string, baseDir string) string {\n \treturn tempDir\n }\n \n+func createClientFromFile(path string) (*client.Client, error) {\n+\tc, err := clientcmd.LoadFromFile(path)\n+\tif err != nil {\n+\t\treturn nil, fmt.Errorf(\"Error while loading kubeconfig from file %v: %v\", path, err)\n+\t}\n+\tconfig, err := clientcmd.NewDefaultClientConfig(*c, &clientcmd.ConfigOverrides{}).ClientConfig()\n+\tif err != nil {\n+\t\treturn nil, fmt.Errorf(\"Error while creating kubeconfig: %v\", err)\n+\t}\n+\tclient, err := client.New(config)\n+\tif err != nil {\n+\t\treturn nil, fmt.Errorf(\"Error while creating client: %v\", err)\n+\t}\n+\tif client.Timeout == 0 {\n+\t\tclient.Timeout = 30 * time.Second\n+\t}\n+\treturn client, nil\n+}\n+\n func main() {\n \truntime.GOMAXPROCS(runtime.NumCPU())\n \taddFlags(pflag.CommandLine)\n \tutil.InitFlags()\n \n+\t// If kubeconfigPath is not set, try default\n+\tif kubeconfigPath == \"\" {","path":"cmd/kubemark/hollow-node.go","position":55,"original_position":55,"commit_id":"01df7c2702f9e0f0a1341160ec4d5ffe75a8dc9c","original_commit_id":"01df7c2702f9e0f0a1341160ec4d5ffe75a8dc9c","user":{"login":"roberthbailey","id":7751204,"avatar_url":"https://avatars.githubusercontent.com/u/7751204?v=3","gravatar_id":"","url":"https://api.github.com/users/roberthbailey","html_url":"https://github.com/roberthbailey","followers_url":"https://api.github.com/users/roberthbailey/followers","following_url":"https://api.github.com/users/roberthbailey/following{/other_user}","gists_url":"https://api.github.com/users/roberthbailey/gists{/gist_id}","starred_url":"https://api.github.com/users/roberthbailey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roberthbailey/subscriptions","organizations_url":"https://api.github.com/users/roberthbailey/orgs","repos_url":"https://api.github.com/users/roberthbailey/repos","events_url":"https://api.github.com/users/roberthbailey/events{/privacy}","received_events_url":"https://api.github.com/users/roberthbailey/received_events","type":"User","site_admin":false},"body":"Why not just use /kubeconfig/kubeconfig as the default value for the flag? It seems like you are reimplementing flag defaults doing it this way. ","created_at":"2015-09-28T20:16:56Z","updated_at":"2015-09-28T20:16:56Z","html_url":"https://github.com/kubernetes/kubernetes/pull/14515#discussion_r40599787","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14515","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/40599787"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/14515#discussion_r40599787"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14515"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14515","id":45942120,"html_url":"https://github.com/kubernetes/kubernetes/pull/14515","diff_url":"https://github.com/kubernetes/kubernetes/pull/14515.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/14515.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/14515","number":14515,"state":"open","locked":false,"title":"Add SSL to communication in Kubemark","user":{"login":"gmarek","id":1703842,"avatar_url":"https://avatars.githubusercontent.com/u/1703842?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarek","html_url":"https://github.com/gmarek","followers_url":"https://api.github.com/users/gmarek/followers","following_url":"https://api.github.com/users/gmarek/following{/other_user}","gists_url":"https://api.github.com/users/gmarek/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarek/subscriptions","organizations_url":"https://api.github.com/users/gmarek/orgs","repos_url":"https://api.github.com/users/gmarek/repos","events_url":"https://api.github.com/users/gmarek/events{/privacy}","received_events_url":"https://api.github.com/users/gmarek/received_events","type":"User","site_admin":false},"body":"cc @wojtek-t @davidopp @fgrzadkowski @brendandburns \r\n\r\nIt includes all previous unmerged PRs.","created_at":"2015-09-24T19:56:45Z","updated_at":"2015-09-28T20:16:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e55df82cd098adf36f65669ecb8d78b0c917b140","assignee":{"login":"wojtek-t","id":10743879,"avatar_url":"https://avatars.githubusercontent.com/u/10743879?v=3","gravatar_id":"","url":"https://api.github.com/users/wojtek-t","html_url":"https://github.com/wojtek-t","followers_url":"https://api.github.com/users/wojtek-t/followers","following_url":"https://api.github.com/users/wojtek-t/following{/other_user}","gists_url":"https://api.github.com/users/wojtek-t/gists{/gist_id}","starred_url":"https://api.github.com/users/wojtek-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wojtek-t/subscriptions","organizations_url":"https://api.github.com/users/wojtek-t/orgs","repos_url":"https://api.github.com/users/wojtek-t/repos","events_url":"https://api.github.com/users/wojtek-t/events{/privacy}","received_events_url":"https://api.github.com/users/wojtek-t/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14515/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14515/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/14515/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/01df7c2702f9e0f0a1341160ec4d5ffe75a8dc9c","head":{"label":"gmarek:ssl","ref":"ssl","sha":"01df7c2702f9e0f0a1341160ec4d5ffe75a8dc9c","user":{"login":"gmarek","id":1703842,"avatar_url":"https://avatars.githubusercontent.com/u/1703842?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarek","html_url":"https://github.com/gmarek","followers_url":"https://api.github.com/users/gmarek/followers","following_url":"https://api.github.com/users/gmarek/following{/other_user}","gists_url":"https://api.github.com/users/gmarek/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarek/subscriptions","organizations_url":"https://api.github.com/users/gmarek/orgs","repos_url":"https://api.github.com/users/gmarek/repos","events_url":"https://api.github.com/users/gmarek/events{/privacy}","received_events_url":"https://api.github.com/users/gmarek/received_events","type":"User","site_admin":false},"repo":{"id":30216777,"name":"kubernetes","full_name":"gmarek/kubernetes","owner":{"login":"gmarek","id":1703842,"avatar_url":"https://avatars.githubusercontent.com/u/1703842?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarek","html_url":"https://github.com/gmarek","followers_url":"https://api.github.com/users/gmarek/followers","following_url":"https://api.github.com/users/gmarek/following{/other_user}","gists_url":"https://api.github.com/users/gmarek/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarek/subscriptions","organizations_url":"https://api.github.com/users/gmarek/orgs","repos_url":"https://api.github.com/users/gmarek/repos","events_url":"https://api.github.com/users/gmarek/events{/privacy}","received_events_url":"https://api.github.com/users/gmarek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gmarek/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/gmarek/kubernetes","forks_url":"https://api.github.com/repos/gmarek/kubernetes/forks","keys_url":"https://api.github.com/repos/gmarek/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gmarek/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gmarek/kubernetes/teams","hooks_url":"https://api.github.com/repos/gmarek/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/gmarek/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/gmarek/kubernetes/events","assignees_url":"https://api.github.com/repos/gmarek/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/gmarek/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/gmarek/kubernetes/tags","blobs_url":"https://api.github.com/repos/gmarek/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gmarek/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gmarek/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/gmarek/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gmarek/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/gmarek/kubernetes/languages","stargazers_url":"https://api.github.com/repos/gmarek/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/gmarek/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/gmarek/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/gmarek/kubernetes/subscription","commits_url":"https://api.github.com/repos/gmarek/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/gmarek/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/gmarek/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/gmarek/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/gmarek/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/gmarek/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gmarek/kubernetes/merges","archive_url":"https://api.github.com/repos/gmarek/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gmarek/kubernetes/downloads","issues_url":"https://api.github.com/repos/gmarek/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/gmarek/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/gmarek/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/gmarek/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gmarek/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/gmarek/kubernetes/releases{/id}","created_at":"2015-02-03T00:37:49Z","updated_at":"2015-03-10T14:50:28Z","pushed_at":"2015-09-28T15:51:50Z","git_url":"git://github.com/gmarek/kubernetes.git","ssh_url":"git@github.com:gmarek/kubernetes.git","clone_url":"https://github.com/gmarek/kubernetes.git","svn_url":"https://github.com/gmarek/kubernetes","homepage":"http://kubernetes.io","size":110941,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"f8a9943d9073d688620b2bdd7c4eca3a953ab075","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}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-09-28T19:50:18Z","pushed_at":"2015-09-28T19:57:08Z","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":438865,"stargazers_count":10476,"watchers_count":10476,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2609,"mirror_url":null,"open_issues_count":1939,"forks":2609,"open_issues":1939,"watchers":10476,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14515"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/14515"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/14515"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/14515/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14515/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14515/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/01df7c2702f9e0f0a1341160ec4d5ffe75a8dc9c"}}}}