{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/102607784","pull_request_review_id":23367950,"id":102607784,"diff_hunk":"@@ -80,13 +91,114 @@ func ValidateTokenDiscovery(c *kubeadm.TokenDiscovery, fldPath *field.Path) fiel\n \treturn allErrs\n }\n \n+func ValidateDiscovery(c *kubeadm.NodeConfiguration, fldPath *field.Path) field.ErrorList {\n+\tallErrs := field.ErrorList{}\n+\tallErrs = append(allErrs, ValidateTLSBootstrapToken(c, fldPath)...)\n+\tvar count int\n+\tif len(c.DiscoveryToken) != 0 {\n+\t\tallErrs = append(allErrs, ValidateDiscoveryToken(c, fldPath)...)\n+\t\tcount++\n+\t}\n+\tif len(c.DiscoveryFile) != 0 {\n+\t\tallErrs = append(allErrs, ValidateDiscoveryFile(c, fldPath)...)\n+\t\tcount++\n+\t}\n+\tif len(c.DiscoveryURL) != 0 {\n+\t\tallErrs = append(allErrs, ValidateDiscoveryURL(c, fldPath)...)\n+\t\tcount++\n+\t}\n+\tif count != 1 {\n+\t\tallErrs = append(allErrs, field.Invalid(fldPath, nil, \"exactly one discovery strategy can be provided\"))\n+\t}\n+\treturn allErrs\n+}\n+\n+func ValidateTLSBootstrapToken(cfg *kubeadm.NodeConfiguration, fldPath *field.Path) field.ErrorList {\n+\tallErrs := field.ErrorList{}\n+\tif len(cfg.Token) != 0 && (len(cfg.TLSBootstrapToken) != 0 || len(cfg.DiscoveryToken) != 0) {\n+\t\tallErrs = append(allErrs, field.Invalid(fldPath, nil, \"--token are mutually exclusive with --bootstrap-token and --discovery-token\"))","path":"cmd/kubeadm/app/apis/kubeadm/validation/validation.go","position":90,"original_position":90,"commit_id":"a0bf04dd3d41bd114388e58add93410d78983d15","original_commit_id":"a0bf04dd3d41bd114388e58add93410d78983d15","user":{"login":"jbeda","id":37310,"avatar_url":"https://avatars.githubusercontent.com/u/37310?v=3","gravatar_id":"","url":"https://api.github.com/users/jbeda","html_url":"https://github.com/jbeda","followers_url":"https://api.github.com/users/jbeda/followers","following_url":"https://api.github.com/users/jbeda/following{/other_user}","gists_url":"https://api.github.com/users/jbeda/gists{/gist_id}","starred_url":"https://api.github.com/users/jbeda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbeda/subscriptions","organizations_url":"https://api.github.com/users/jbeda/orgs","repos_url":"https://api.github.com/users/jbeda/repos","events_url":"https://api.github.com/users/jbeda/events{/privacy}","received_events_url":"https://api.github.com/users/jbeda/received_events","type":"User","site_admin":false},"body":"\"--token is mutually\"","created_at":"2017-02-23T00:05:58Z","updated_at":"2017-02-23T00:38:04Z","html_url":"https://github.com/kubernetes/kubernetes/pull/41921#discussion_r102607784","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/41921","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/102607784"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/41921#discussion_r102607784"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/41921"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/41921","id":107496061,"html_url":"https://github.com/kubernetes/kubernetes/pull/41921","diff_url":"https://github.com/kubernetes/kubernetes/pull/41921.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/41921.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/41921","number":41921,"state":"open","locked":false,"title":"kubeadm: join ux changes","user":{"login":"dmmcquay","id":1700422,"avatar_url":"https://avatars.githubusercontent.com/u/1700422?v=3","gravatar_id":"","url":"https://api.github.com/users/dmmcquay","html_url":"https://github.com/dmmcquay","followers_url":"https://api.github.com/users/dmmcquay/followers","following_url":"https://api.github.com/users/dmmcquay/following{/other_user}","gists_url":"https://api.github.com/users/dmmcquay/gists{/gist_id}","starred_url":"https://api.github.com/users/dmmcquay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmmcquay/subscriptions","organizations_url":"https://api.github.com/users/dmmcquay/orgs","repos_url":"https://api.github.com/users/dmmcquay/repos","events_url":"https://api.github.com/users/dmmcquay/events{/privacy}","received_events_url":"https://api.github.com/users/dmmcquay/received_events","type":"User","site_admin":false},"body":"**What this PR does / why we need it**: Update `kubeadm join` UX according to https://github.com/kubernetes/community/pull/381\r\n\r\n**Which issue this PR fixes**: fixes # https://github.com/kubernetes/kubeadm/issues/176\r\n\r\n**Special notes for your reviewer**: /cc @luxas @jbeda \r\n\r\n**Release note**:\r\n```release-note\r\nNONE\r\n```\r\n","created_at":"2017-02-22T20:55:11Z","updated_at":"2017-02-23T00:38:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"285e35cace6873cb1a8d5dfe84de416b5571a798","assignee":{"login":"jbeda","id":37310,"avatar_url":"https://avatars.githubusercontent.com/u/37310?v=3","gravatar_id":"","url":"https://api.github.com/users/jbeda","html_url":"https://github.com/jbeda","followers_url":"https://api.github.com/users/jbeda/followers","following_url":"https://api.github.com/users/jbeda/following{/other_user}","gists_url":"https://api.github.com/users/jbeda/gists{/gist_id}","starred_url":"https://api.github.com/users/jbeda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbeda/subscriptions","organizations_url":"https://api.github.com/users/jbeda/orgs","repos_url":"https://api.github.com/users/jbeda/repos","events_url":"https://api.github.com/users/jbeda/events{/privacy}","received_events_url":"https://api.github.com/users/jbeda/received_events","type":"User","site_admin":false},"assignees":[{"login":"jbeda","id":37310,"avatar_url":"https://avatars.githubusercontent.com/u/37310?v=3","gravatar_id":"","url":"https://api.github.com/users/jbeda","html_url":"https://github.com/jbeda","followers_url":"https://api.github.com/users/jbeda/followers","following_url":"https://api.github.com/users/jbeda/following{/other_user}","gists_url":"https://api.github.com/users/jbeda/gists{/gist_id}","starred_url":"https://api.github.com/users/jbeda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbeda/subscriptions","organizations_url":"https://api.github.com/users/jbeda/orgs","repos_url":"https://api.github.com/users/jbeda/repos","events_url":"https://api.github.com/users/jbeda/events{/privacy}","received_events_url":"https://api.github.com/users/jbeda/received_events","type":"User","site_admin":false},{"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}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/41921/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/41921/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/41921/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/a0bf04dd3d41bd114388e58add93410d78983d15","head":{"label":"apprenda:kubeadm_join_ux_update_2","ref":"kubeadm_join_ux_update_2","sha":"a0bf04dd3d41bd114388e58add93410d78983d15","user":{"login":"apprenda","id":6901411,"avatar_url":"https://avatars.githubusercontent.com/u/6901411?v=3","gravatar_id":"","url":"https://api.github.com/users/apprenda","html_url":"https://github.com/apprenda","followers_url":"https://api.github.com/users/apprenda/followers","following_url":"https://api.github.com/users/apprenda/following{/other_user}","gists_url":"https://api.github.com/users/apprenda/gists{/gist_id}","starred_url":"https://api.github.com/users/apprenda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apprenda/subscriptions","organizations_url":"https://api.github.com/users/apprenda/orgs","repos_url":"https://api.github.com/users/apprenda/repos","events_url":"https://api.github.com/users/apprenda/events{/privacy}","received_events_url":"https://api.github.com/users/apprenda/received_events","type":"Organization","site_admin":false},"repo":{"id":57914139,"name":"kubernetes","full_name":"apprenda/kubernetes","owner":{"login":"apprenda","id":6901411,"avatar_url":"https://avatars.githubusercontent.com/u/6901411?v=3","gravatar_id":"","url":"https://api.github.com/users/apprenda","html_url":"https://github.com/apprenda","followers_url":"https://api.github.com/users/apprenda/followers","following_url":"https://api.github.com/users/apprenda/following{/other_user}","gists_url":"https://api.github.com/users/apprenda/gists{/gist_id}","starred_url":"https://api.github.com/users/apprenda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apprenda/subscriptions","organizations_url":"https://api.github.com/users/apprenda/orgs","repos_url":"https://api.github.com/users/apprenda/repos","events_url":"https://api.github.com/users/apprenda/events{/privacy}","received_events_url":"https://api.github.com/users/apprenda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apprenda/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/apprenda/kubernetes","forks_url":"https://api.github.com/repos/apprenda/kubernetes/forks","keys_url":"https://api.github.com/repos/apprenda/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apprenda/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apprenda/kubernetes/teams","hooks_url":"https://api.github.com/repos/apprenda/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/apprenda/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/apprenda/kubernetes/events","assignees_url":"https://api.github.com/repos/apprenda/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/apprenda/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/apprenda/kubernetes/tags","blobs_url":"https://api.github.com/repos/apprenda/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apprenda/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apprenda/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/apprenda/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apprenda/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/apprenda/kubernetes/languages","stargazers_url":"https://api.github.com/repos/apprenda/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/apprenda/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/apprenda/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/apprenda/kubernetes/subscription","commits_url":"https://api.github.com/repos/apprenda/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/apprenda/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/apprenda/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/apprenda/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/apprenda/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/apprenda/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apprenda/kubernetes/merges","archive_url":"https://api.github.com/repos/apprenda/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apprenda/kubernetes/downloads","issues_url":"https://api.github.com/repos/apprenda/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/apprenda/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/apprenda/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/apprenda/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apprenda/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/apprenda/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/apprenda/kubernetes/deployments","created_at":"2016-05-02T19:07:17Z","updated_at":"2017-01-27T16:45:18Z","pushed_at":"2017-02-22T22:50:17Z","git_url":"git://github.com/apprenda/kubernetes.git","ssh_url":"git@github.com:apprenda/kubernetes.git","clone_url":"https://github.com/apprenda/kubernetes.git","svn_url":"https://github.com/apprenda/kubernetes","homepage":"http://kubernetes.io","size":403867,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":7,"forks":1,"open_issues":7,"watchers":3,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"2e1271116023d6b98bc8187a642665884387e3b3","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":"Production-Grade Container Scheduling and Management","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":"2017-02-23T00:33:43Z","pushed_at":"2017-02-23T00:30:01Z","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":559379,"stargazers_count":20869,"watchers_count":20869,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7123,"mirror_url":null,"open_issues_count":5732,"forks":7123,"open_issues":5732,"watchers":20869,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/41921"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/41921"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/41921"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/41921/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/41921/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/41921/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/a0bf04dd3d41bd114388e58add93410d78983d15"}}}}
{"actor":{"display_login":"jbeda"}}