mirror of https://github.com/k3s-io/k3s
Remove SupportNodePidsLimit
parent
22fff3197b
commit
d36facd048
|
@ -1160,7 +1160,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
|
||||||
|
|
|
@ -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
|
||||||
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},
|
||||||
|
|
|
@ -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 {
|
||||||
}
|
}
|
||||||
// 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
|
||||||
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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue