kubelet: remove NET_PLUGIN_CAPABILITY_SHAPING

This was effectively unused with v1.5 and later when kubelet stopped
doing internal shaping and delegated all shaping to plugins.
This commit is contained in:
Dan Williams
2017-06-06 11:34:11 -05:00
parent 5b8ad3f7c5
commit 36a54bd5a4
3 changed files with 1 additions and 26 deletions

View File

@@ -280,25 +280,6 @@ func (kl *Kubelet) updatePodCIDR(cidr string) {
kl.runtimeState.setPodCIDR(cidr)
}
// shapingEnabled returns whether traffic shaping is enabled.
func (kl *Kubelet) shapingEnabled() bool {
// Disable shaping if a network plugin is defined and supports shaping
if kl.networkPlugin != nil && kl.networkPlugin.Capabilities().Has(network.NET_PLUGIN_CAPABILITY_SHAPING) {
return false
}
// This is not strictly true but we need to figure out how to handle
// bandwidth shaping anyway. If the kubelet doesn't have a networkPlugin,
// it could mean:
// a. the kubelet is responsible for bandwidth shaping
// b. the kubelet is using cri, and the cri has a network plugin
// Today, the only plugin that understands bandwidth shaping is kubenet, and
// it doesn't support bandwidth shaping when invoked through cri, so it
// effectively boils down to letting the kubelet decide how to handle
// shaping annotations. The combination of (cri + network plugin that
// handles bandwidth shaping) may not work because of this.
return true
}
// syncNetworkUtil ensures the network utility are present on host.
// Network util includes:
// 1. In nat table, KUBE-MARK-DROP rule to mark connections for dropping