{"action":"closed","number":65,"pull_request":{"url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/pulls/65","id":216231035,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2MjMxMDM1","html_url":"https://github.com/kubermatic/cluster-api-provider-digitalocean/pull/65","diff_url":"https://github.com/kubermatic/cluster-api-provider-digitalocean/pull/65.diff","patch_url":"https://github.com/kubermatic/cluster-api-provider-digitalocean/pull/65.patch","issue_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/issues/65","number":65,"state":"closed","locked":false,"title":"cloud/digitalocean: use system ssh for getkubeconfig","user":{"login":"xmudrii","id":18719127,"node_id":"MDQ6VXNlcjE4NzE5MTI3","avatar_url":"https://avatars0.githubusercontent.com/u/18719127?v=4","gravatar_id":"","url":"https://api.github.com/users/xmudrii","html_url":"https://github.com/xmudrii","followers_url":"https://api.github.com/users/xmudrii/followers","following_url":"https://api.github.com/users/xmudrii/following{/other_user}","gists_url":"https://api.github.com/users/xmudrii/gists{/gist_id}","starred_url":"https://api.github.com/users/xmudrii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xmudrii/subscriptions","organizations_url":"https://api.github.com/users/xmudrii/orgs","repos_url":"https://api.github.com/users/xmudrii/repos","events_url":"https://api.github.com/users/xmudrii/events{/privacy}","received_events_url":"https://api.github.com/users/xmudrii/received_events","type":"User","site_admin":false},"body":"**What this PR does / why we need it**:\r\n\r\nCurrently, we're using Go SSH implementation in `GetKubeConfig` function to download `kubeconfig` file from master to the local machine (who executed `clusterctl`).\r\n\r\nThat approach was based on the fact that SSH key is mounted to the pod. But, `GetKubeConfig` is executed locally, by `clusterctl`, and therefore, we can't rely on that.\r\n\r\nInstead, we're using system SSH (by invoking it as a command) to download `kubeconfig`. The reason for that, instead of modifying our Go SSH implementation is that it's hard to handle SSH keys in that case.\r\n\r\nUser would have to provide path to the key, or use predefined path. Passing path from `clusterctl` to `machine-controller`/`GetKubeConfig` may be hard (or even impossible), so that's not an option. Even if we do provide key, the key must be unlocked, and that involves several additional and potentially user-unfriendly steps (e.g. user may have to enter passphrase several times).\r\n\r\nUsing system SSH agent with Go SSH implementation is not reliable at all.\r\n\r\nTherefore, we're just invoking system SSH as a command, which handles authentication and all needed for us.\r\n\r\nThis PR also fixes potential panics when Droplet IP address is not assigned but `GetIP` is invoked.\r\n\r\n**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:\r\n\r\nFixes #39.\r\n\r\n**Release note**:\r\n```release-note\r\nNONE\r\n```","created_at":"2018-09-18T08:56:21Z","updated_at":"2018-09-18T09:36:46Z","closed_at":"2018-09-18T09:36:46Z","merged_at":"2018-09-18T09:36:46Z","merge_commit_sha":"d068b5251e09ed72d4f0cde0284bda3516251948","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/pulls/65/commits","review_comments_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/pulls/65/comments","review_comment_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/issues/65/comments","statuses_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/statuses/24647260b22295e8eac0cc952034ca877b399482","head":{"label":"kubermatic:getkubeconfig-ssh","ref":"getkubeconfig-ssh","sha":"24647260b22295e8eac0cc952034ca877b399482","user":{"login":"kubermatic","id":17001193,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MDAxMTkz","avatar_url":"https://avatars2.githubusercontent.com/u/17001193?v=4","gravatar_id":"","url":"https://api.github.com/users/kubermatic","html_url":"https://github.com/kubermatic","followers_url":"https://api.github.com/users/kubermatic/followers","following_url":"https://api.github.com/users/kubermatic/following{/other_user}","gists_url":"https://api.github.com/users/kubermatic/gists{/gist_id}","starred_url":"https://api.github.com/users/kubermatic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubermatic/subscriptions","organizations_url":"https://api.github.com/users/kubermatic/orgs","repos_url":"https://api.github.com/users/kubermatic/repos","events_url":"https://api.github.com/users/kubermatic/events{/privacy}","received_events_url":"https://api.github.com/users/kubermatic/received_events","type":"Organization","site_admin":false},"repo":{"id":145108192,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUxMDgxOTI=","name":"cluster-api-provider-digitalocean","full_name":"kubermatic/cluster-api-provider-digitalocean","private":false,"owner":{"login":"kubermatic","id":17001193,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MDAxMTkz","avatar_url":"https://avatars2.githubusercontent.com/u/17001193?v=4","gravatar_id":"","url":"https://api.github.com/users/kubermatic","html_url":"https://github.com/kubermatic","followers_url":"https://api.github.com/users/kubermatic/followers","following_url":"https://api.github.com/users/kubermatic/following{/other_user}","gists_url":"https://api.github.com/users/kubermatic/gists{/gist_id}","starred_url":"https://api.github.com/users/kubermatic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubermatic/subscriptions","organizations_url":"https://api.github.com/users/kubermatic/orgs","repos_url":"https://api.github.com/users/kubermatic/repos","events_url":"https://api.github.com/users/kubermatic/events{/privacy}","received_events_url":"https://api.github.com/users/kubermatic/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/kubermatic/cluster-api-provider-digitalocean","description":"The DigitalOcean provider implementation of the Cluster Management API","fork":false,"url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean","forks_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/forks","keys_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/teams","hooks_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/hooks","issue_events_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/issues/events{/number}","events_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/events","assignees_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/assignees{/user}","branches_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/branches{/branch}","tags_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/tags","blobs_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/statuses/{sha}","languages_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/languages","stargazers_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/stargazers","contributors_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/contributors","subscribers_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/subscribers","subscription_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/subscription","commits_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/contents/{+path}","compare_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/merges","archive_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/downloads","issues_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/issues{/number}","pulls_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/pulls{/number}","milestones_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/milestones{/number}","notifications_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/labels{/name}","releases_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/releases{/id}","deployments_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/deployments","created_at":"2018-08-17T10:39:25Z","updated_at":"2018-09-18T08:47:46Z","pushed_at":"2018-09-18T09:36:46Z","git_url":"git://github.com/kubermatic/cluster-api-provider-digitalocean.git","ssh_url":"git@github.com:kubermatic/cluster-api-provider-digitalocean.git","clone_url":"https://github.com/kubermatic/cluster-api-provider-digitalocean.git","svn_url":"https://github.com/kubermatic/cluster-api-provider-digitalocean","homepage":null,"size":7487,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":8,"watchers":3,"default_branch":"master"}},"base":{"label":"kubermatic:master","ref":"master","sha":"1bf4e0cc85e55db0c32997ceefc21dfae77524a5","user":{"login":"kubermatic","id":17001193,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MDAxMTkz","avatar_url":"https://avatars2.githubusercontent.com/u/17001193?v=4","gravatar_id":"","url":"https://api.github.com/users/kubermatic","html_url":"https://github.com/kubermatic","followers_url":"https://api.github.com/users/kubermatic/followers","following_url":"https://api.github.com/users/kubermatic/following{/other_user}","gists_url":"https://api.github.com/users/kubermatic/gists{/gist_id}","starred_url":"https://api.github.com/users/kubermatic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubermatic/subscriptions","organizations_url":"https://api.github.com/users/kubermatic/orgs","repos_url":"https://api.github.com/users/kubermatic/repos","events_url":"https://api.github.com/users/kubermatic/events{/privacy}","received_events_url":"https://api.github.com/users/kubermatic/received_events","type":"Organization","site_admin":false},"repo":{"id":145108192,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUxMDgxOTI=","name":"cluster-api-provider-digitalocean","full_name":"kubermatic/cluster-api-provider-digitalocean","private":false,"owner":{"login":"kubermatic","id":17001193,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MDAxMTkz","avatar_url":"https://avatars2.githubusercontent.com/u/17001193?v=4","gravatar_id":"","url":"https://api.github.com/users/kubermatic","html_url":"https://github.com/kubermatic","followers_url":"https://api.github.com/users/kubermatic/followers","following_url":"https://api.github.com/users/kubermatic/following{/other_user}","gists_url":"https://api.github.com/users/kubermatic/gists{/gist_id}","starred_url":"https://api.github.com/users/kubermatic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubermatic/subscriptions","organizations_url":"https://api.github.com/users/kubermatic/orgs","repos_url":"https://api.github.com/users/kubermatic/repos","events_url":"https://api.github.com/users/kubermatic/events{/privacy}","received_events_url":"https://api.github.com/users/kubermatic/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/kubermatic/cluster-api-provider-digitalocean","description":"The DigitalOcean provider implementation of the Cluster Management API","fork":false,"url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean","forks_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/forks","keys_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/teams","hooks_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/hooks","issue_events_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/issues/events{/number}","events_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/events","assignees_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/assignees{/user}","branches_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/branches{/branch}","tags_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/tags","blobs_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/statuses/{sha}","languages_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/languages","stargazers_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/stargazers","contributors_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/contributors","subscribers_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/subscribers","subscription_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/subscription","commits_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/contents/{+path}","compare_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/merges","archive_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/downloads","issues_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/issues{/number}","pulls_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/pulls{/number}","milestones_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/milestones{/number}","notifications_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/labels{/name}","releases_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/releases{/id}","deployments_url":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/deployments","created_at":"2018-08-17T10:39:25Z","updated_at":"2018-09-18T08:47:46Z","pushed_at":"2018-09-18T09:36:46Z","git_url":"git://github.com/kubermatic/cluster-api-provider-digitalocean.git","ssh_url":"git@github.com:kubermatic/cluster-api-provider-digitalocean.git","clone_url":"https://github.com/kubermatic/cluster-api-provider-digitalocean.git","svn_url":"https://github.com/kubermatic/cluster-api-provider-digitalocean","homepage":null,"size":7487,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":8,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/pulls/65"},"html":{"href":"https://github.com/kubermatic/cluster-api-provider-digitalocean/pull/65"},"issue":{"href":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/issues/65"},"comments":{"href":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/issues/65/comments"},"review_comments":{"href":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/pulls/65/comments"},"review_comment":{"href":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/pulls/65/commits"},"statuses":{"href":"https://api.github.com/repos/kubermatic/cluster-api-provider-digitalocean/statuses/24647260b22295e8eac0cc952034ca877b399482"}},"author_association":"MEMBER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"xmudrii","id":18719127,"node_id":"MDQ6VXNlcjE4NzE5MTI3","avatar_url":"https://avatars0.githubusercontent.com/u/18719127?v=4","gravatar_id":"","url":"https://api.github.com/users/xmudrii","html_url":"https://github.com/xmudrii","followers_url":"https://api.github.com/users/xmudrii/followers","following_url":"https://api.github.com/users/xmudrii/following{/other_user}","gists_url":"https://api.github.com/users/xmudrii/gists{/gist_id}","starred_url":"https://api.github.com/users/xmudrii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xmudrii/subscriptions","organizations_url":"https://api.github.com/users/xmudrii/orgs","repos_url":"https://api.github.com/users/xmudrii/repos","events_url":"https://api.github.com/users/xmudrii/events{/privacy}","received_events_url":"https://api.github.com/users/xmudrii/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":21,"deletions":20,"changed_files":1}}
{"actor":{"display_login":"xmudrii"}}