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
d36facd0
Commit
d36facd0
authored
Apr 06, 2019
by
Darren Shepherd
Committed by
Erik Wilson
Aug 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove SupportNodePidsLimit
parent
22fff319
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 @
d36facd0
...
...
@@ -1160,7 +1160,7 @@ func parseResourceList(m map[string]string) (v1.ResourceList, error) {
switch
v1
.
ResourceName
(
k
)
{
// CPU, memory, local storage, and PID resources are supported.
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
)
if
err
!=
nil
{
return
nil
,
err
...
...
pkg/features/kube_features.go
View file @
d36facd0
...
...
@@ -306,12 +306,6 @@ const (
// Enables the AWS EBS in-tree driver to AWS EBS CSI Driver migration feature.
CSIMigrationAWS
utilfeature
.
Feature
=
"CSIMigrationAWS"
// owner: @RobertKrawitz
// alpha: v1.14
//
// Implement support for limiting pids in nodes
SupportNodePidsLimit
utilfeature
.
Feature
=
"SupportNodePidsLimit"
// owner: @wk8
// alpha: v1.14
//
...
...
@@ -360,7 +354,6 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
StorageObjectInUseProtection
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
GA
},
SupportIPVSProxyMode
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
GA
},
SupportPodPidsLimit
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
SupportNodePidsLimit
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
ScheduleDaemonSetPods
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
TokenRequest
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
TokenRequestProjection
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
...
...
pkg/kubelet/cm/cgroup_manager_linux.go
View file @
d36facd0
...
...
@@ -259,7 +259,7 @@ func (m *cgroupManagerImpl) Exists(name CgroupName) bool {
// in https://github.com/opencontainers/runc/issues/1440
// once resolved, we can remove this code.
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"
)
}
var
missingPaths
[]
string
...
...
@@ -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.
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
}
return
supportedSubsystems
...
...
@@ -381,7 +381,7 @@ func (m *cgroupManagerImpl) toResources(resourceConfig *ResourceConfig) *libcont
if
resourceConfig
.
CpuPeriod
!=
nil
{
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
{
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