Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
36a54bd5
Commit
36a54bd5
authored
Jun 06, 2017
by
Dan Williams
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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.
parent
5b8ad3f7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
26 deletions
+1
-26
kubelet_network.go
pkg/kubelet/kubelet_network.go
+0
-19
kubenet_linux.go
pkg/kubelet/network/kubenet/kubenet_linux.go
+1
-1
plugins.go
pkg/kubelet/network/plugins.go
+0
-6
No files found.
pkg/kubelet/kubelet_network.go
View file @
36a54bd5
...
@@ -280,25 +280,6 @@ func (kl *Kubelet) updatePodCIDR(cidr string) {
...
@@ -280,25 +280,6 @@ func (kl *Kubelet) updatePodCIDR(cidr string) {
kl
.
runtimeState
.
setPodCIDR
(
cidr
)
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.
// syncNetworkUtil ensures the network utility are present on host.
// Network util includes:
// Network util includes:
// 1. In nat table, KUBE-MARK-DROP rule to mark connections for dropping
// 1. In nat table, KUBE-MARK-DROP rule to mark connections for dropping
...
...
pkg/kubelet/network/kubenet/kubenet_linux.go
View file @
36a54bd5
...
@@ -304,7 +304,7 @@ func (plugin *kubenetNetworkPlugin) Name() string {
...
@@ -304,7 +304,7 @@ func (plugin *kubenetNetworkPlugin) Name() string {
}
}
func
(
plugin
*
kubenetNetworkPlugin
)
Capabilities
()
utilsets
.
Int
{
func
(
plugin
*
kubenetNetworkPlugin
)
Capabilities
()
utilsets
.
Int
{
return
utilsets
.
NewInt
(
network
.
NET_PLUGIN_CAPABILITY_SHAPING
)
return
utilsets
.
NewInt
()
}
}
// setup sets up networking through CNI using the given ns/name and sandbox ID.
// setup sets up networking through CNI using the given ns/name and sandbox ID.
...
...
pkg/kubelet/network/plugins.go
View file @
36a54bd5
...
@@ -43,12 +43,6 @@ const DefaultPluginName = "kubernetes.io/no-op"
...
@@ -43,12 +43,6 @@ const DefaultPluginName = "kubernetes.io/no-op"
const
NET_PLUGIN_EVENT_POD_CIDR_CHANGE
=
"pod-cidr-change"
const
NET_PLUGIN_EVENT_POD_CIDR_CHANGE
=
"pod-cidr-change"
const
NET_PLUGIN_EVENT_POD_CIDR_CHANGE_DETAIL_CIDR
=
"pod-cidr"
const
NET_PLUGIN_EVENT_POD_CIDR_CHANGE_DETAIL_CIDR
=
"pod-cidr"
// Plugin capabilities
const
(
// Indicates the plugin handles Kubernetes bandwidth shaping annotations internally
NET_PLUGIN_CAPABILITY_SHAPING
int
=
1
)
// Plugin is an interface to network plugins for the kubelet
// Plugin is an interface to network plugins for the kubelet
type
NetworkPlugin
interface
{
type
NetworkPlugin
interface
{
// Init initializes the plugin. This will be called exactly once
// Init initializes the plugin. This will be called exactly once
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment