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
d808606d
Commit
d808606d
authored
Oct 05, 2018
by
Darren Shepherd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove QOSReserved
parent
d8557e6f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
43 deletions
+2
-43
kube_features.go
pkg/features/kube_features.go
+0
-8
qos_container_manager_linux.go
pkg/kubelet/cm/qos_container_manager_linux.go
+2
-35
No files found.
pkg/features/kube_features.go
View file @
d808606d
...
@@ -126,13 +126,6 @@ const (
...
@@ -126,13 +126,6 @@ const (
// 'MemoryPressure', 'PIDPressure' and 'DiskPressure'.
// 'MemoryPressure', 'PIDPressure' and 'DiskPressure'.
TaintNodesByCondition
utilfeature
.
Feature
=
"TaintNodesByCondition"
TaintNodesByCondition
utilfeature
.
Feature
=
"TaintNodesByCondition"
// owner: @sjenning
// alpha: v1.11
//
// Allows resource reservations at the QoS level preventing pods at lower QoS levels from
// bursting into resources requested at higher QoS levels (memory only for now)
QOSReserved
utilfeature
.
Feature
=
"QOSReserved"
// owner: @ConnorDoyle
// owner: @ConnorDoyle
// alpha: v1.8
// alpha: v1.8
// beta: v1.10
// beta: v1.10
...
@@ -442,7 +435,6 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
...
@@ -442,7 +435,6 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
PodShareProcessNamespace
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
PodShareProcessNamespace
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
PodPriority
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
GA
},
PodPriority
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
GA
},
TaintNodesByCondition
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
TaintNodesByCondition
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
QOSReserved
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
ExpandPersistentVolumes
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
ExpandPersistentVolumes
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
ExpandInUsePersistentVolumes
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
ExpandInUsePersistentVolumes
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
ExpandCSIVolumes
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
ExpandCSIVolumes
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
...
...
pkg/kubelet/cm/qos_container_manager_linux.go
View file @
d808606d
...
@@ -26,14 +26,12 @@ import (
...
@@ -26,14 +26,12 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/apimachinery/pkg/util/wait"
units
"github.com/docker/go-units"
"github.com/docker/go-units"
cgroupfs
"github.com/opencontainers/runc/libcontainer/cgroups/fs"
cgroupfs
"github.com/opencontainers/runc/libcontainer/cgroups/fs"
rsystem
"github.com/opencontainers/runc/libcontainer/system"
rsystem
"github.com/opencontainers/runc/libcontainer/system"
"k8s.io/api/core/v1"
v1
"k8s.io/api/core/v1"
utilfeature
"k8s.io/apiserver/pkg/util/feature"
"k8s.io/kubernetes/pkg/api/v1/resource"
"k8s.io/kubernetes/pkg/api/v1/resource"
v1qos
"k8s.io/kubernetes/pkg/apis/core/v1/helper/qos"
v1qos
"k8s.io/kubernetes/pkg/apis/core/v1/helper/qos"
kubefeatures
"k8s.io/kubernetes/pkg/features"
)
)
const
(
const
(
...
@@ -295,37 +293,6 @@ func (m *qosContainerManagerImpl) UpdateCgroups() error {
...
@@ -295,37 +293,6 @@ func (m *qosContainerManagerImpl) UpdateCgroups() error {
return
err
return
err
}
}
if
utilfeature
.
DefaultFeatureGate
.
Enabled
(
kubefeatures
.
QOSReserved
)
{
for
resource
,
percentReserve
:=
range
m
.
qosReserved
{
switch
resource
{
case
v1
.
ResourceMemory
:
m
.
setMemoryReserve
(
qosConfigs
,
percentReserve
)
}
}
updateSuccess
:=
true
for
_
,
config
:=
range
qosConfigs
{
err
:=
m
.
cgroupManager
.
Update
(
config
)
if
err
!=
nil
{
updateSuccess
=
false
}
}
if
updateSuccess
{
klog
.
V
(
4
)
.
Infof
(
"[ContainerManager]: Updated QoS cgroup configuration"
)
return
nil
}
// If the resource can adjust the ResourceConfig to increase likelihood of
// success, call the adjustment function here. Otherwise, the Update() will
// be called again with the same values.
for
resource
,
percentReserve
:=
range
m
.
qosReserved
{
switch
resource
{
case
v1
.
ResourceMemory
:
m
.
retrySetMemoryReserve
(
qosConfigs
,
percentReserve
)
}
}
}
updateSuccess
:=
true
updateSuccess
:=
true
for
_
,
config
:=
range
qosConfigs
{
for
_
,
config
:=
range
qosConfigs
{
err
:=
m
.
cgroupManager
.
Update
(
config
)
err
:=
m
.
cgroupManager
.
Update
(
config
)
...
...
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