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
5ad741e6
Commit
5ad741e6
authored
Oct 05, 2018
by
Darren Shepherd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove SupportPodPidsLimit
parent
2ce646f8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
23 deletions
+0
-23
kube_features.go
pkg/features/kube_features.go
+0
-7
cgroup_manager_linux.go
pkg/kubelet/cm/cgroup_manager_linux.go
+0
-11
pod_container_manager_linux.go
pkg/kubelet/cm/pod_container_manager_linux.go
+0
-5
No files found.
pkg/features/kube_features.go
View file @
5ad741e6
...
...
@@ -173,12 +173,6 @@ const (
// Implement IPVS-based in-cluster service load balancing
SupportIPVSProxyMode
utilfeature
.
Feature
=
"SupportIPVSProxyMode"
// owner: @dims
// alpha: v1.10
//
// Implement support for limiting pids in pods
SupportPodPidsLimit
utilfeature
.
Feature
=
"SupportPodPidsLimit"
// owner: @feiskyer
// alpha: v1.10
//
...
...
@@ -353,7 +347,6 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
BlockVolume
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
StorageObjectInUseProtection
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
GA
},
SupportIPVSProxyMode
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
GA
},
SupportPodPidsLimit
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
HyperVContainer
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
ScheduleDaemonSetPods
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
TokenRequest
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
...
...
pkg/kubelet/cm/cgroup_manager_linux.go
View file @
5ad741e6
...
...
@@ -328,9 +328,6 @@ func getSupportedSubsystems() map[subsystem]bool {
if
utilfeature
.
DefaultFeatureGate
.
Enabled
(
kubefeatures
.
HugePages
)
{
supportedSubsystems
[
&
cgroupfs
.
HugetlbGroup
{}]
=
false
}
if
utilfeature
.
DefaultFeatureGate
.
Enabled
(
kubefeatures
.
SupportPodPidsLimit
)
{
supportedSubsystems
[
&
cgroupfs
.
PidsGroup
{}]
=
true
}
return
supportedSubsystems
}
...
...
@@ -429,10 +426,6 @@ func (m *cgroupManagerImpl) Update(cgroupConfig *CgroupConfig) error {
libcontainerCgroupConfig
.
Path
=
cgroupConfig
.
Name
.
ToCgroupfs
()
}
if
utilfeature
.
DefaultFeatureGate
.
Enabled
(
kubefeatures
.
SupportPodPidsLimit
)
&&
cgroupConfig
.
ResourceParameters
.
PodPidsLimit
!=
nil
{
libcontainerCgroupConfig
.
PidsLimit
=
*
cgroupConfig
.
ResourceParameters
.
PodPidsLimit
}
if
err
:=
setSupportedSubsystems
(
libcontainerCgroupConfig
);
err
!=
nil
{
return
fmt
.
Errorf
(
"failed to set supported cgroup subsystems for cgroup %v: %v"
,
cgroupConfig
.
Name
,
err
)
}
...
...
@@ -459,10 +452,6 @@ func (m *cgroupManagerImpl) Create(cgroupConfig *CgroupConfig) error {
libcontainerCgroupConfig
.
Path
=
cgroupConfig
.
Name
.
ToCgroupfs
()
}
if
utilfeature
.
DefaultFeatureGate
.
Enabled
(
kubefeatures
.
SupportPodPidsLimit
)
&&
cgroupConfig
.
ResourceParameters
.
PodPidsLimit
!=
nil
{
libcontainerCgroupConfig
.
PidsLimit
=
*
cgroupConfig
.
ResourceParameters
.
PodPidsLimit
}
// get the manager with the specified cgroup configuration
manager
,
err
:=
m
.
adapter
.
newManager
(
libcontainerCgroupConfig
,
nil
)
if
err
!=
nil
{
...
...
pkg/kubelet/cm/pod_container_manager_linux.go
View file @
5ad741e6
...
...
@@ -26,10 +26,8 @@ import (
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
utilerrors
"k8s.io/apimachinery/pkg/util/errors"
utilfeature
"k8s.io/apiserver/pkg/util/feature"
"k8s.io/klog"
v1qos
"k8s.io/kubernetes/pkg/apis/core/v1/helper/qos"
kubefeatures
"k8s.io/kubernetes/pkg/features"
)
const
(
...
...
@@ -86,9 +84,6 @@ func (m *podContainerManagerImpl) EnsureExists(pod *v1.Pod) error {
Name
:
podContainerName
,
ResourceParameters
:
ResourceConfigForPod
(
pod
,
m
.
enforceCPULimits
,
m
.
cpuCFSQuotaPeriod
),
}
if
utilfeature
.
DefaultFeatureGate
.
Enabled
(
kubefeatures
.
SupportPodPidsLimit
)
&&
m
.
podPidsLimit
>
0
{
containerConfig
.
ResourceParameters
.
PodPidsLimit
=
&
m
.
podPidsLimit
}
if
err
:=
m
.
cgroupManager
.
Create
(
containerConfig
);
err
!=
nil
{
return
fmt
.
Errorf
(
"failed to create container for %v : %v"
,
podContainerName
,
err
)
}
...
...
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