mirror of https://github.com/k3s-io/k3s
fix the bad code comment and make the format unify
parent
00c1ec5201
commit
d8aa0ca82a
|
@ -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
|
||||
|
||||
// Returns resources allocated to system cgroups in the machine.
|
||||
// SystemCgroupsLimit returns resources allocated to system cgroups in the machine.
|
||||
// These cgroups include the system and Kubernetes services.
|
||||
SystemCgroupsLimit() v1.ResourceList
|
||||
|
||||
// Returns a NodeConfig that is being used by the container manager.
|
||||
// GetNodeConfig returns a NodeConfig that is being used by the container manager.
|
||||
GetNodeConfig() NodeConfig
|
||||
|
||||
// Returns internal Status.
|
||||
// Status returns 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.
|
||||
// GetNodeAllocatableReservation 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
|
||||
|
||||
// Returns RunContainerOptions with devices, mounts, and env fields populated for
|
||||
// GetResources returns 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)
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ func (cm *containerManagerImpl) createNodeAllocatableCgroups() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Enforce Node Allocatable Cgroup settings.
|
||||
// enforceNodeAllocatableCgroups enforce 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
|
||||
}
|
||||
|
||||
// Returns a ResourceConfig object that can be used to create or update cgroups via CgroupManager interface.
|
||||
// getCgroupConfig returns 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.
|
||||
// GetNodeAllocatableReservation 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)
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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.
|
||||
// GetNodeAllocatableReservation returns the amount of compute resources that have to be reserved from scheduling.
|
||||
GetNodeAllocatableReservation() v1.ResourceList
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue