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
3b43ef5a
Commit
3b43ef5a
authored
Apr 06, 2019
by
Darren Shepherd
Committed by
root
Jun 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove SupportNodePidsLimit
parent
f69b1fcc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
11 deletions
+4
-11
server.go
cmd/kubelet/app/server.go
+1
-1
kube_features.go
pkg/features/kube_features.go
+0
-7
cgroup_manager_linux.go
pkg/kubelet/cm/cgroup_manager_linux.go
+3
-3
No files found.
cmd/kubelet/app/server.go
View file @
3b43ef5a
...
@@ -1159,7 +1159,7 @@ func parseResourceList(m map[string]string) (v1.ResourceList, error) {
...
@@ -1159,7 +1159,7 @@ func parseResourceList(m map[string]string) (v1.ResourceList, error) {
switch
v1
.
ResourceName
(
k
)
{
switch
v1
.
ResourceName
(
k
)
{
// CPU, memory, local storage, and PID resources are supported.
// CPU, memory, local storage, and PID resources are supported.
case
v1
.
ResourceCPU
,
v1
.
ResourceMemory
,
v1
.
ResourceEphemeralStorage
,
pidlimit
.
PIDs
:
case
v1
.
ResourceCPU
,
v1
.
ResourceMemory
,
v1
.
ResourceEphemeralStorage
,
pidlimit
.
PIDs
:
if
v1
.
ResourceName
(
k
)
!=
pidlimit
.
PIDs
||
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
SupportNodePidsLimit
)
{
if
v1
.
ResourceName
(
k
)
!=
pidlimit
.
PIDs
{
q
,
err
:=
resource
.
ParseQuantity
(
v
)
q
,
err
:=
resource
.
ParseQuantity
(
v
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
...
pkg/features/kube_features.go
View file @
3b43ef5a
...
@@ -306,12 +306,6 @@ const (
...
@@ -306,12 +306,6 @@ const (
// Enables the AWS EBS in-tree driver to AWS EBS CSI Driver migration feature.
// Enables the AWS EBS in-tree driver to AWS EBS CSI Driver migration feature.
CSIMigrationAWS
utilfeature
.
Feature
=
"CSIMigrationAWS"
CSIMigrationAWS
utilfeature
.
Feature
=
"CSIMigrationAWS"
// owner: @RobertKrawitz
// alpha: v1.14
//
// Implement support for limiting pids in nodes
SupportNodePidsLimit
utilfeature
.
Feature
=
"SupportNodePidsLimit"
// owner: @wk8
// owner: @wk8
// alpha: v1.14
// alpha: v1.14
//
//
...
@@ -360,7 +354,6 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
...
@@ -360,7 +354,6 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
StorageObjectInUseProtection
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
GA
},
StorageObjectInUseProtection
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
GA
},
SupportIPVSProxyMode
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
GA
},
SupportIPVSProxyMode
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
GA
},
SupportPodPidsLimit
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
SupportPodPidsLimit
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
SupportNodePidsLimit
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
ScheduleDaemonSetPods
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
ScheduleDaemonSetPods
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
TokenRequest
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
TokenRequest
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
TokenRequestProjection
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
TokenRequestProjection
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
...
...
pkg/kubelet/cm/cgroup_manager_linux.go
View file @
3b43ef5a
...
@@ -259,7 +259,7 @@ func (m *cgroupManagerImpl) Exists(name CgroupName) bool {
...
@@ -259,7 +259,7 @@ func (m *cgroupManagerImpl) Exists(name CgroupName) bool {
// in https://github.com/opencontainers/runc/issues/1440
// in https://github.com/opencontainers/runc/issues/1440
// once resolved, we can remove this code.
// once resolved, we can remove this code.
whitelistControllers
:=
sets
.
NewString
(
"cpu"
,
"cpuacct"
,
"cpuset"
,
"memory"
,
"systemd"
)
whitelistControllers
:=
sets
.
NewString
(
"cpu"
,
"cpuacct"
,
"cpuset"
,
"memory"
,
"systemd"
)
if
utilfeature
.
DefaultFeatureGate
.
Enabled
(
kubefeatures
.
SupportPodPidsLimit
)
||
utilfeature
.
DefaultFeatureGate
.
Enabled
(
kubefeatures
.
SupportNodePidsLimit
)
{
if
utilfeature
.
DefaultFeatureGate
.
Enabled
(
kubefeatures
.
SupportPodPidsLimit
)
{
whitelistControllers
.
Insert
(
"pids"
)
whitelistControllers
.
Insert
(
"pids"
)
}
}
var
missingPaths
[]
string
var
missingPaths
[]
string
...
@@ -332,7 +332,7 @@ func getSupportedSubsystems() map[subsystem]bool {
...
@@ -332,7 +332,7 @@ func getSupportedSubsystems() map[subsystem]bool {
}
}
// not all hosts support hugetlb cgroup, and in the absent of hugetlb, we will fail silently by reporting no capacity.
// not all hosts support hugetlb cgroup, and in the absent of hugetlb, we will fail silently by reporting no capacity.
supportedSubsystems
[
&
cgroupfs
.
HugetlbGroup
{}]
=
false
supportedSubsystems
[
&
cgroupfs
.
HugetlbGroup
{}]
=
false
if
utilfeature
.
DefaultFeatureGate
.
Enabled
(
kubefeatures
.
SupportPodPidsLimit
)
||
utilfeature
.
DefaultFeatureGate
.
Enabled
(
kubefeatures
.
SupportNodePidsLimit
)
{
if
utilfeature
.
DefaultFeatureGate
.
Enabled
(
kubefeatures
.
SupportPodPidsLimit
)
{
supportedSubsystems
[
&
cgroupfs
.
PidsGroup
{}]
=
true
supportedSubsystems
[
&
cgroupfs
.
PidsGroup
{}]
=
true
}
}
return
supportedSubsystems
return
supportedSubsystems
...
@@ -381,7 +381,7 @@ func (m *cgroupManagerImpl) toResources(resourceConfig *ResourceConfig) *libcont
...
@@ -381,7 +381,7 @@ func (m *cgroupManagerImpl) toResources(resourceConfig *ResourceConfig) *libcont
if
resourceConfig
.
CpuPeriod
!=
nil
{
if
resourceConfig
.
CpuPeriod
!=
nil
{
resources
.
CpuPeriod
=
*
resourceConfig
.
CpuPeriod
resources
.
CpuPeriod
=
*
resourceConfig
.
CpuPeriod
}
}
if
utilfeature
.
DefaultFeatureGate
.
Enabled
(
kubefeatures
.
SupportPodPidsLimit
)
||
utilfeature
.
DefaultFeatureGate
.
Enabled
(
kubefeatures
.
SupportNodePidsLimit
)
{
if
utilfeature
.
DefaultFeatureGate
.
Enabled
(
kubefeatures
.
SupportPodPidsLimit
)
{
if
resourceConfig
.
PidsLimit
!=
nil
{
if
resourceConfig
.
PidsLimit
!=
nil
{
resources
.
PidsLimit
=
*
resourceConfig
.
PidsLimit
resources
.
PidsLimit
=
*
resourceConfig
.
PidsLimit
}
}
...
...
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