{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/33825170","id":33825170,"diff_hunk":"@@ -16,73 +16,83 @@\n \n # A library of helper functions that each provider hosting Kubernetes must implement to use cluster/kube-*.sh scripts.\n \n+KUBE_ROOT=$(dirname \"${BASH_SOURCE}\")/..\n+\n # Must ensure that the following ENV vars are set\n function detect-master {\n-\techo \"KUBE_MASTER_IP: $KUBE_MASTER_IP\"\n-\techo \"KUBE_MASTER: $KUBE_MASTER\"\n+\techo \"KUBE_MASTER_IP: $KUBE_MASTER_IP\" 1>&2\n+\techo \"KUBE_MASTER: $KUBE_MASTER\" 1>&2\n }\n \n # Get minion names if they are not static.\n function detect-minion-names {\n-        echo \"MINION_NAMES: ${MINION_NAMES[*]}\"\n+\techo \"MINION_NAMES: [${MINION_NAMES[*]}]\" 1>&2\n }\n \n # Get minion IP addresses and store in KUBE_MINION_IP_ADDRESSES[]\n function detect-minions {\n-\techo \"KUBE_MINION_IP_ADDRESSES=[]\"\n+\techo \"KUBE_MINION_IP_ADDRESSES: [${KUBE_MINION_IP_ADDRESSES[*]}]\" 1>&2\n }\n \n # Verify prereqs on host machine\n function verify-prereqs {\n-\techo \"TODO\"\n+\techo \"TODO: verify-prereqs\" 1>&2\n }\n \n # Instantiate a kubernetes cluster\n function kube-up {\n-\techo \"TODO\"\n+\techo \"TODO: kube-up\" 1>&2\n }\n \n # Delete a kubernetes cluster\n function kube-down {\n-\techo \"TODO\"\n+\techo \"TODO: kube-down\" 1>&2\n }\n \n # Update a kubernetes cluster\n function kube-push {\n-\techo \"TODO\"\n+\techo \"TODO: kube-push\" 1>&2\n }\n \n # Prepare update a kubernetes component\n function prepare-push {\n-\techo \"TODO\"\n+\techo \"TODO: prepare-push\" 1>&2\n }\n \n # Update a kubernetes master\n function push-master {\n-\techo \"TODO\"\n+\techo \"TODO: push-master\" 1>&2\n }\n \n # Update a kubernetes node\n function push-node {\n-\techo \"TODO\"\n+\techo \"TODO: push-node\" 1>&2\n }\n \n # Execute prior to running tests to build a release if required for env\n function test-build-release {\n-\techo \"TODO\"\n+\techo \"TODO: test-build-release\" 1>&2\n }\n \n # Execute prior to running tests to initialize required structure\n function test-setup {\n-\techo \"TODO\"\n+\techo \"TODO: test-setup\" 1>&2\n }\n \n # Execute after running tests to perform any required clean-up\n function test-teardown {\n-\techo \"TODO\"\n+\techo \"TODO: test-teardown\" 1>&2\n }\n \n # Set the {KUBE_USER} and {KUBE_PASSWORD} environment values required to interact with provider\n function get-password {\n-\techo \"TODO\"\n+\techo \"TODO: get-password\" 1>&2\n }\n+\n+# Providers util.sh scripts should define functions that override the above default functions impls\n+if [ -n \"${KUBERNETES_PROVIDER}\" ]; then","path":"cluster/kube-util.sh","position":93,"original_position":93,"commit_id":"0229cb01fcf187d6115465d2968ac371e8b58932","original_commit_id":"0229cb01fcf187d6115465d2968ac371e8b58932","user":{"login":"zmerlynn","id":4942464,"avatar_url":"https://avatars.githubusercontent.com/u/4942464?v=3","gravatar_id":"","url":"https://api.github.com/users/zmerlynn","html_url":"https://github.com/zmerlynn","followers_url":"https://api.github.com/users/zmerlynn/followers","following_url":"https://api.github.com/users/zmerlynn/following{/other_user}","gists_url":"https://api.github.com/users/zmerlynn/gists{/gist_id}","starred_url":"https://api.github.com/users/zmerlynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zmerlynn/subscriptions","organizations_url":"https://api.github.com/users/zmerlynn/orgs","repos_url":"https://api.github.com/users/zmerlynn/repos","events_url":"https://api.github.com/users/zmerlynn/events{/privacy}","received_events_url":"https://api.github.com/users/zmerlynn/received_events","type":"User","site_admin":false},"body":"This looks like, in the even that KUBERNETES_PROVIDER isn't set, it would just echo \"TODO\" in the case of a `kube-up.sh`. Am I misreading it?\r\n\r\nI think I would more expect a friendly error message instead of trying to continue with the fully abstract class here. This is the first encounter many people have with k8s, so something along the lines of `KUBERNETES_PROVIDER not set. Expecting one of <blah>.`\r\n\r\nI also might not be reading this right?","created_at":"2015-07-02T21:33:44Z","updated_at":"2015-07-02T21:33:44Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10686#discussion_r33825170","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10686","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/33825170"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10686#discussion_r33825170"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10686"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10686","id":39118962,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10686","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10686.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10686.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10686","number":10686,"state":"open","locked":false,"title":"Move sourcing of provider-specific util.sh into kube-util.sh","user":{"login":"karlkfi","id":3980984,"avatar_url":"https://avatars.githubusercontent.com/u/3980984?v=3","gravatar_id":"","url":"https://api.github.com/users/karlkfi","html_url":"https://github.com/karlkfi","followers_url":"https://api.github.com/users/karlkfi/followers","following_url":"https://api.github.com/users/karlkfi/following{/other_user}","gists_url":"https://api.github.com/users/karlkfi/gists{/gist_id}","starred_url":"https://api.github.com/users/karlkfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlkfi/subscriptions","organizations_url":"https://api.github.com/users/karlkfi/orgs","repos_url":"https://api.github.com/users/karlkfi/repos","events_url":"https://api.github.com/users/karlkfi/events{/privacy}","received_events_url":"https://api.github.com/users/karlkfi/received_events","type":"User","site_admin":false},"body":"- kube-util.sh defines default implementations\r\n- provider util.sh overrides the default implementations as desired\r\n- default kube-util functions now print to stderr to avoid affecting captured output","created_at":"2015-07-02T19:44:44Z","updated_at":"2015-07-02T21:33:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bbdc6dc65cf809c0515dc75472b98bdd95ecea7c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10686/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10686/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10686/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/0229cb01fcf187d6115465d2968ac371e8b58932","head":{"label":"mesosphere:kube-util","ref":"kube-util","sha":"0229cb01fcf187d6115465d2968ac371e8b58932","user":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":22277046,"name":"kubernetes","full_name":"mesosphere/kubernetes","owner":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesosphere/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/mesosphere/kubernetes","forks_url":"https://api.github.com/repos/mesosphere/kubernetes/forks","keys_url":"https://api.github.com/repos/mesosphere/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesosphere/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesosphere/kubernetes/teams","hooks_url":"https://api.github.com/repos/mesosphere/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/mesosphere/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/mesosphere/kubernetes/events","assignees_url":"https://api.github.com/repos/mesosphere/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/mesosphere/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/mesosphere/kubernetes/tags","blobs_url":"https://api.github.com/repos/mesosphere/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesosphere/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesosphere/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesosphere/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesosphere/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/mesosphere/kubernetes/languages","stargazers_url":"https://api.github.com/repos/mesosphere/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/mesosphere/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/mesosphere/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/mesosphere/kubernetes/subscription","commits_url":"https://api.github.com/repos/mesosphere/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesosphere/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesosphere/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesosphere/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesosphere/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/mesosphere/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesosphere/kubernetes/merges","archive_url":"https://api.github.com/repos/mesosphere/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesosphere/kubernetes/downloads","issues_url":"https://api.github.com/repos/mesosphere/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/mesosphere/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/mesosphere/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/mesosphere/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesosphere/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/mesosphere/kubernetes/releases{/id}","created_at":"2014-07-26T02:50:13Z","updated_at":"2015-07-01T21:30:18Z","pushed_at":"2015-07-02T19:51:56Z","git_url":"git://github.com/mesosphere/kubernetes.git","ssh_url":"git@github.com:mesosphere/kubernetes.git","clone_url":"https://github.com/mesosphere/kubernetes.git","svn_url":"https://github.com/mesosphere/kubernetes","homepage":null,"size":83944,"stargazers_count":5,"watchers_count":5,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":5,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"05ce0472e92c10618344ecf3b4cd2ac44f5e1053","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"GoogleCloudPlatform/kubernetes","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-07-02T20:03:39Z","pushed_at":"2015-07-02T21:25:01Z","git_url":"git://github.com/GoogleCloudPlatform/kubernetes.git","ssh_url":"git@github.com:GoogleCloudPlatform/kubernetes.git","clone_url":"https://github.com/GoogleCloudPlatform/kubernetes.git","svn_url":"https://github.com/GoogleCloudPlatform/kubernetes","homepage":"http://kubernetes.io","size":309115,"stargazers_count":8713,"watchers_count":8713,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1927,"mirror_url":null,"open_issues_count":1521,"forks":1927,"open_issues":1521,"watchers":8713,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10686"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10686"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10686"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10686/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10686/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10686/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/0229cb01fcf187d6115465d2968ac371e8b58932"}}}}