{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33438","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33438/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33438/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33438/events","html_url":"https://github.com/kubernetes/kubernetes/pull/33438","id":179049792,"number":33438,"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},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-24T20:20:28Z","updated_at":"2016-09-24T20:20:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/33438","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"},"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```\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/249385464","html_url":"https://github.com/kubernetes/kubernetes/pull/33438#issuecomment-249385464","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33438","id":249385464,"user":{"login":"k8s-ci-robot","id":20407524,"avatar_url":"https://avatars.githubusercontent.com/u/20407524?v=3","gravatar_id":"","url":"https://api.github.com/users/k8s-ci-robot","html_url":"https://github.com/k8s-ci-robot","followers_url":"https://api.github.com/users/k8s-ci-robot/followers","following_url":"https://api.github.com/users/k8s-ci-robot/following{/other_user}","gists_url":"https://api.github.com/users/k8s-ci-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/k8s-ci-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k8s-ci-robot/subscriptions","organizations_url":"https://api.github.com/users/k8s-ci-robot/orgs","repos_url":"https://api.github.com/users/k8s-ci-robot/repos","events_url":"https://api.github.com/users/k8s-ci-robot/events{/privacy}","received_events_url":"https://api.github.com/users/k8s-ci-robot/received_events","type":"User","site_admin":false},"created_at":"2016-09-24T20:20:28Z","updated_at":"2016-09-24T20:20:28Z","body":"\nCan a [kubernetes](https://github.com/orgs/kubernetes/people) member verify that this patch is reasonable to test? If so, please reply with \"@k8s-bot ok to test\" on its own line.\n\nRegular contributors should join the org to skip this step.\n\nWhile we transition away from the Jenkins GitHub PR Builder plugin, \"ok to test\" commenters will need to be on the admin list defined in [this file](https://github.com/kubernetes/test-infra/blob/master/jenkins/job-configs/kubernetes-jenkins-pull/kubernetes-pull.yaml).\n"}}
{"actor":{"display_login":"k8s-ci-robot"}}