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
d8aa0ca8
Commit
d8aa0ca8
authored
Sep 19, 2017
by
wackxu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the bad code comment and make the format unify
parent
00c1ec52
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
+10
-10
container_manager.go
pkg/kubelet/cm/container_manager.go
+5
-5
node_container_manager.go
pkg/kubelet/cm/node_container_manager.go
+3
-3
helpers.go
pkg/kubelet/eviction/helpers.go
+1
-1
types.go
pkg/kubelet/eviction/types.go
+1
-1
No files found.
pkg/kubelet/cm/container_manager.go
View file @
d8aa0ca8
...
...
@@ -42,14 +42,14 @@ type ContainerManager interface {
// - Creates the system container where all non-containerized processes run.
Start
(
*
v1
.
Node
,
ActivePodsFunc
,
status
.
PodStatusProvider
,
internalapi
.
RuntimeService
)
error
//
R
eturns resources allocated to system cgroups in the machine.
//
SystemCgroupsLimit r
eturns resources allocated to system cgroups in the machine.
// These cgroups include the system and Kubernetes services.
SystemCgroupsLimit
()
v1
.
ResourceList
//
R
eturns a NodeConfig that is being used by the container manager.
//
GetNodeConfig r
eturns a NodeConfig that is being used by the container manager.
GetNodeConfig
()
NodeConfig
//
R
eturns internal Status.
//
Status r
eturns internal Status.
Status
()
Status
// NewPodContainerManager is a factory method which returns a podContainerManager object
...
...
@@ -62,7 +62,7 @@ type ContainerManager interface {
// GetQOSContainersInfo returns the names of top level QoS containers
GetQOSContainersInfo
()
QOSContainersInfo
// GetNodeAllocatable returns the amount of compute resources that have to be reserved from scheduling.
// GetNodeAllocatable
Reservation
returns the amount of compute resources that have to be reserved from scheduling.
GetNodeAllocatableReservation
()
v1
.
ResourceList
// GetCapacity returns the amount of compute resources tracked by container manager available on the node.
...
...
@@ -72,7 +72,7 @@ type ContainerManager interface {
// level QoS containers have their desired state in a thread-safe way
UpdateQOSCgroups
()
error
//
R
eturns RunContainerOptions with devices, mounts, and env fields populated for
//
GetResources r
eturns RunContainerOptions with devices, mounts, and env fields populated for
// extended resources required by container.
GetResources
(
pod
*
v1
.
Pod
,
container
*
v1
.
Container
,
activePods
[]
*
v1
.
Pod
)
(
*
kubecontainer
.
RunContainerOptions
,
error
)
...
...
pkg/kubelet/cm/node_container_manager.go
View file @
d8aa0ca8
...
...
@@ -55,7 +55,7 @@ func (cm *containerManagerImpl) createNodeAllocatableCgroups() error {
return
nil
}
//
E
nforce Node Allocatable Cgroup settings.
//
enforceNodeAllocatableCgroups e
nforce Node Allocatable Cgroup settings.
func
(
cm
*
containerManagerImpl
)
enforceNodeAllocatableCgroups
()
error
{
nc
:=
cm
.
NodeConfig
.
NodeAllocatableConfig
...
...
@@ -139,7 +139,7 @@ func enforceExistingCgroup(cgroupManager CgroupManager, cName string, rl v1.Reso
return
nil
}
//
R
eturns a ResourceConfig object that can be used to create or update cgroups via CgroupManager interface.
//
getCgroupConfig r
eturns a ResourceConfig object that can be used to create or update cgroups via CgroupManager interface.
func
getCgroupConfig
(
rl
v1
.
ResourceList
)
*
ResourceConfig
{
// TODO(vishh): Set CPU Quota if necessary.
if
rl
==
nil
{
...
...
@@ -186,7 +186,7 @@ func (cm *containerManagerImpl) getNodeAllocatableAbsolute() v1.ResourceList {
}
// GetNodeAllocatable returns amount of compute or storage resource that have to be reserved on this node from scheduling.
// GetNodeAllocatable
Reservation
returns amount of compute or storage resource that have to be reserved on this node from scheduling.
func
(
cm
*
containerManagerImpl
)
GetNodeAllocatableReservation
()
v1
.
ResourceList
{
evictionReservation
:=
hardEvictionReservation
(
cm
.
HardEvictionThresholds
,
cm
.
capacity
)
result
:=
make
(
v1
.
ResourceList
)
...
...
pkg/kubelet/eviction/helpers.go
View file @
d8aa0ca8
...
...
@@ -483,7 +483,7 @@ func localEphemeralVolumeNames(pod *v1.Pod) []string {
return
result
}
// podLocalEphemeralStorageUsage
aggregates pod local ephemeral storage usage and inode consumption for the specified stats to measure.
// podLocalEphemeralStorageUsage aggregates pod local ephemeral storage usage and inode consumption for the specified stats to measure.
func
podLocalEphemeralStorageUsage
(
podStats
statsapi
.
PodStats
,
pod
*
v1
.
Pod
,
statsToMeasure
[]
fsStatsType
)
(
v1
.
ResourceList
,
error
)
{
disk
:=
resource
.
Quantity
{
Format
:
resource
.
BinarySI
}
inodes
:=
resource
.
Quantity
{
Format
:
resource
.
BinarySI
}
...
...
pkg/kubelet/eviction/types.go
View file @
d8aa0ca8
...
...
@@ -72,7 +72,7 @@ type DiskInfoProvider interface {
type
CapacityProvider
interface
{
// GetCapacity returns the amount of compute resources tracked by container manager available on the node.
GetCapacity
()
v1
.
ResourceList
// GetNodeAllocatable returns the amount of compute resources that have to be reserved from scheduling.
// GetNodeAllocatable
Reservation
returns the amount of compute resources that have to be reserved from scheduling.
GetNodeAllocatableReservation
()
v1
.
ResourceList
}
...
...
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