{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/82213246","pull_request_review_id":3136289,"id":82213246,"diff_hunk":"@@ -36,7 +36,9 @@ source \"${KUBE_ROOT}/cluster/aws/${KUBE_CONFIG_FILE-\"config-default.sh\"}\"\n source \"${KUBE_ROOT}/cluster/common.sh\"\n source \"${KUBE_ROOT}/cluster/lib/util.sh\"\n \n-ALLOCATE_NODE_CIDRS=true\n+if [[ \"${NETWORK_PROVIDER:-}\" != \"cni\" ]]; then","path":"cluster/aws/util.sh","position":5,"original_position":5,"commit_id":"5fad38e536b42ff283293df13dbf3b10bb3921dd","original_commit_id":"5fad38e536b42ff283293df13dbf3b10bb3921dd","user":{"login":"bboreham","id":8125524,"avatar_url":"https://avatars.githubusercontent.com/u/8125524?v=3","gravatar_id":"","url":"https://api.github.com/users/bboreham","html_url":"https://github.com/bboreham","followers_url":"https://api.github.com/users/bboreham/followers","following_url":"https://api.github.com/users/bboreham/following{/other_user}","gists_url":"https://api.github.com/users/bboreham/gists{/gist_id}","starred_url":"https://api.github.com/users/bboreham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bboreham/subscriptions","organizations_url":"https://api.github.com/users/bboreham/orgs","repos_url":"https://api.github.com/users/bboreham/repos","events_url":"https://api.github.com/users/bboreham/events{/privacy}","received_events_url":"https://api.github.com/users/bboreham/received_events","type":"User","site_admin":false},"body":"There is no mention of such a dependency at https://github.com/containernetworking/cni/blob/master/Documentation/flannel.md\r\n\r\nCNI is used by more than just Kubernetes; I guess it's possible that someone has built a Kubernetes-specific CNI plugin, but I'm prepared to worry about that when I see it.","created_at":"2016-10-06T15:18:48Z","updated_at":"2016-10-06T15:18:48Z","html_url":"https://github.com/kubernetes/kubernetes/pull/33438#discussion_r82213246","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/33438","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/82213246"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/33438#discussion_r82213246"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/33438"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/33438","id":86629286,"html_url":"https://github.com/kubernetes/kubernetes/pull/33438","diff_url":"https://github.com/kubernetes/kubernetes/pull/33438.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/33438.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33438","number":33438,"state":"open","locked":false,"title":"Don't allocate node cidrs when using CNI","user":{"login":"bboreham","id":8125524,"avatar_url":"https://avatars.githubusercontent.com/u/8125524?v=3","gravatar_id":"","url":"https://api.github.com/users/bboreham","html_url":"https://github.com/bboreham","followers_url":"https://api.github.com/users/bboreham/followers","following_url":"https://api.github.com/users/bboreham/following{/other_user}","gists_url":"https://api.github.com/users/bboreham/gists{/gist_id}","starred_url":"https://api.github.com/users/bboreham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bboreham/subscriptions","organizations_url":"https://api.github.com/users/bboreham/orgs","repos_url":"https://api.github.com/users/bboreham/repos","events_url":"https://api.github.com/users/bboreham/events{/privacy}","received_events_url":"https://api.github.com/users/bboreham/received_events","type":"User","site_admin":false},"body":"**What this PR does / why we need it**:\r\n\r\nAbsent this PR, the `kube-up.sh` configuration on GCE and AWS is set to always allocate a CIDR to each node and set up routes for those CIDRs.  This is unnecessary when using a CNI plugin, as it should be \r\ncontrolling all required network configuration.  Also, the routes can interfere with the operation of the CNI network, should it happen to use the same address range.\r\n\r\nOnce we stop the cloud provider setting up routes, on GCE nothing gets scheduled because kubelet sets the state to `NetworkUnavailable` and expects this to be cleared when the route is added.  This behaviour is noted at #27347, #26983 and #27828.  To avoid that problem, we add a plugin capability `NET_PLUGIN_CAPABILITY_CLOUD_BASED` which only `kubenet` implements; thereby if kubelet is using a CNI plugin (or an `exec` plugin), it will not set `NetworkUnavailable`.\r\n\r\nI might go one step further and remove the gce-only test in `pkg/kubelet/kubelet.go`; it seems it was added in a hurry as a result of #27347.  If we can be confident that all third-party networks are working via a plugin then this PR will cover the requirement and allow #27828 to be marked fixed. cc @freehan\r\n\r\n**Release note**:\r\n```release-note\r\nWhen using a CNI network plugin, don't allocate node cidrs, create cloud routes or set the node state to NetworkUnavailable until a route is added.\r\n```\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.kubernetes.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/33438)\n<!-- Reviewable:end -->\n","created_at":"2016-09-24T20:20:27Z","updated_at":"2016-10-06T15:18:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"454c9a5382d098f8945afe059b6eef59f8e36db5","assignee":{"login":"eparis","id":8093535,"avatar_url":"https://avatars.githubusercontent.com/u/8093535?v=3","gravatar_id":"","url":"https://api.github.com/users/eparis","html_url":"https://github.com/eparis","followers_url":"https://api.github.com/users/eparis/followers","following_url":"https://api.github.com/users/eparis/following{/other_user}","gists_url":"https://api.github.com/users/eparis/gists{/gist_id}","starred_url":"https://api.github.com/users/eparis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eparis/subscriptions","organizations_url":"https://api.github.com/users/eparis/orgs","repos_url":"https://api.github.com/users/eparis/repos","events_url":"https://api.github.com/users/eparis/events{/privacy}","received_events_url":"https://api.github.com/users/eparis/received_events","type":"User","site_admin":false},"assignees":[{"login":"eparis","id":8093535,"avatar_url":"https://avatars.githubusercontent.com/u/8093535?v=3","gravatar_id":"","url":"https://api.github.com/users/eparis","html_url":"https://github.com/eparis","followers_url":"https://api.github.com/users/eparis/followers","following_url":"https://api.github.com/users/eparis/following{/other_user}","gists_url":"https://api.github.com/users/eparis/gists{/gist_id}","starred_url":"https://api.github.com/users/eparis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eparis/subscriptions","organizations_url":"https://api.github.com/users/eparis/orgs","repos_url":"https://api.github.com/users/eparis/repos","events_url":"https://api.github.com/users/eparis/events{/privacy}","received_events_url":"https://api.github.com/users/eparis/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/33438/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/33438/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33438/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/5fad38e536b42ff283293df13dbf3b10bb3921dd","head":{"label":"bboreham:cni-no-node-cidrs","ref":"cni-no-node-cidrs","sha":"5fad38e536b42ff283293df13dbf3b10bb3921dd","user":{"login":"bboreham","id":8125524,"avatar_url":"https://avatars.githubusercontent.com/u/8125524?v=3","gravatar_id":"","url":"https://api.github.com/users/bboreham","html_url":"https://github.com/bboreham","followers_url":"https://api.github.com/users/bboreham/followers","following_url":"https://api.github.com/users/bboreham/following{/other_user}","gists_url":"https://api.github.com/users/bboreham/gists{/gist_id}","starred_url":"https://api.github.com/users/bboreham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bboreham/subscriptions","organizations_url":"https://api.github.com/users/bboreham/orgs","repos_url":"https://api.github.com/users/bboreham/repos","events_url":"https://api.github.com/users/bboreham/events{/privacy}","received_events_url":"https://api.github.com/users/bboreham/received_events","type":"User","site_admin":false},"repo":{"id":48495779,"name":"kubernetes","full_name":"bboreham/kubernetes","owner":{"login":"bboreham","id":8125524,"avatar_url":"https://avatars.githubusercontent.com/u/8125524?v=3","gravatar_id":"","url":"https://api.github.com/users/bboreham","html_url":"https://github.com/bboreham","followers_url":"https://api.github.com/users/bboreham/followers","following_url":"https://api.github.com/users/bboreham/following{/other_user}","gists_url":"https://api.github.com/users/bboreham/gists{/gist_id}","starred_url":"https://api.github.com/users/bboreham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bboreham/subscriptions","organizations_url":"https://api.github.com/users/bboreham/orgs","repos_url":"https://api.github.com/users/bboreham/repos","events_url":"https://api.github.com/users/bboreham/events{/privacy}","received_events_url":"https://api.github.com/users/bboreham/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bboreham/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/bboreham/kubernetes","forks_url":"https://api.github.com/repos/bboreham/kubernetes/forks","keys_url":"https://api.github.com/repos/bboreham/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bboreham/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bboreham/kubernetes/teams","hooks_url":"https://api.github.com/repos/bboreham/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/bboreham/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/bboreham/kubernetes/events","assignees_url":"https://api.github.com/repos/bboreham/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/bboreham/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/bboreham/kubernetes/tags","blobs_url":"https://api.github.com/repos/bboreham/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bboreham/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bboreham/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/bboreham/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bboreham/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/bboreham/kubernetes/languages","stargazers_url":"https://api.github.com/repos/bboreham/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/bboreham/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/bboreham/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/bboreham/kubernetes/subscription","commits_url":"https://api.github.com/repos/bboreham/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/bboreham/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/bboreham/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/bboreham/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/bboreham/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/bboreham/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bboreham/kubernetes/merges","archive_url":"https://api.github.com/repos/bboreham/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bboreham/kubernetes/downloads","issues_url":"https://api.github.com/repos/bboreham/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/bboreham/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/bboreham/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/bboreham/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bboreham/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/bboreham/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/bboreham/kubernetes/deployments","created_at":"2015-12-23T14:54:28Z","updated_at":"2015-12-23T14:54:38Z","pushed_at":"2016-09-25T11:34:05Z","git_url":"git://github.com/bboreham/kubernetes.git","ssh_url":"git@github.com:bboreham/kubernetes.git","clone_url":"https://github.com/bboreham/kubernetes.git","svn_url":"https://github.com/bboreham/kubernetes","homepage":"http://kubernetes.io","size":323539,"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":"1654fd40416be9286b93b8dfbdadc184fb37a8af","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":"2016-10-06T14:54:49Z","pushed_at":"2016-10-06T15:10: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":578199,"stargazers_count":17341,"watchers_count":17341,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5620,"mirror_url":null,"open_issues_count":4842,"forks":5620,"open_issues":4842,"watchers":17341,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/33438"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/33438"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/33438"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/33438/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/33438/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/33438/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/5fad38e536b42ff283293df13dbf3b10bb3921dd"}}}}
{"actor":{"display_login":"bboreham"}}