diff --git a/pkg/kubelet/cm/cgroup_manager_linux.go b/pkg/kubelet/cm/cgroup_manager_linux.go index d4b9d60a929..7657dcca15e 100644 --- a/pkg/kubelet/cm/cgroup_manager_linux.go +++ b/pkg/kubelet/cm/cgroup_manager_linux.go @@ -154,7 +154,7 @@ func (l *libcontainerAdapter) revertName(name string) CgroupName { return CgroupName(driverName) } -// adaptName converts a CgroupName identifer to a driver specific conversion value. +// adaptName converts a CgroupName identifier to a driver specific conversion value. // if outputToCgroupFs is true, the result is returned in the cgroupfs format rather than the driver specific form. func (l *libcontainerAdapter) adaptName(cgroupName CgroupName, outputToCgroupFs bool) string { if l.cgroupManagerType != libcontainerSystemd { @@ -229,7 +229,7 @@ func (m *cgroupManagerImpl) Exists(name CgroupName) bool { // the presence of alternative control groups not known to runc confuses // the kubelet existence checks. - // ideally, we would have a mechaninsm in runc to support Exists() logic + // ideally, we would have a mechanism in runc to support Exists() logic // scoped to the set control groups it understands. this is being discussed // in https://github.com/opencontainers/runc/issues/1440 // once resolved, we can remove this code. @@ -237,7 +237,7 @@ func (m *cgroupManagerImpl) Exists(name CgroupName) bool { // If even one cgroup path doesn't exist, then the cgroup doesn't exist. for controller, path := range cgroupPaths { - // ignore mounts we dont care about + // ignore mounts we don't care about if !whitelistControllers.Has(controller) { continue } diff --git a/pkg/kubelet/cm/pod_container_manager_linux.go b/pkg/kubelet/cm/pod_container_manager_linux.go index fbd19a5842f..7180a73c49c 100644 --- a/pkg/kubelet/cm/pod_container_manager_linux.go +++ b/pkg/kubelet/cm/pod_container_manager_linux.go @@ -66,7 +66,7 @@ func (m *podContainerManagerImpl) Exists(pod *v1.Pod) bool { // EnsureExists takes a pod as argument and makes sure that // pod cgroup exists if qos cgroup hierarchy flag is enabled. -// If the pod level container doesen't already exist it is created. +// If the pod level container doesn't already exist it is created. func (m *podContainerManagerImpl) EnsureExists(pod *v1.Pod) error { podContainerName, _ := m.GetPodContainerName(pod) // check if container already exist @@ -91,7 +91,7 @@ func (m *podContainerManagerImpl) EnsureExists(pod *v1.Pod) error { return nil } -// GetPodContainerName returns the CgroupName identifer, and its literal cgroupfs form on the host. +// GetPodContainerName returns the CgroupName identifier, and its literal cgroupfs form on the host. func (m *podContainerManagerImpl) GetPodContainerName(pod *v1.Pod) (CgroupName, string) { podQOS := v1qos.GetPodQOS(pod) // Get the parent QOS container name diff --git a/pkg/kubelet/cm/qos_container_manager_linux.go b/pkg/kubelet/cm/qos_container_manager_linux.go index aeb92f5a0ed..1e5ae939334 100644 --- a/pkg/kubelet/cm/qos_container_manager_linux.go +++ b/pkg/kubelet/cm/qos_container_manager_linux.go @@ -127,7 +127,7 @@ func (m *qosContainerManagerImpl) Start(getNodeAllocatable func() v1.ResourceLis m.activePods = activePods // update qos cgroup tiers on startup and in periodic intervals - // to ensure desired state is in synch with actual state. + // to ensure desired state is in sync with actual state. go wait.Until(func() { err := m.UpdateCgroups() if err != nil { diff --git a/pkg/kubelet/cm/types.go b/pkg/kubelet/cm/types.go index 064d68b3f1c..a2e8594262b 100644 --- a/pkg/kubelet/cm/types.go +++ b/pkg/kubelet/cm/types.go @@ -47,13 +47,13 @@ type CgroupConfig struct { ResourceParameters *ResourceConfig } -// MemoryStats holds the on-demand stastistics from the memory cgroup +// MemoryStats holds the on-demand statistics from the memory cgroup type MemoryStats struct { // Memory usage (in bytes). Usage int64 } -// ResourceStats holds on-demand stastistics from various cgroup subsystems +// ResourceStats holds on-demand statistics from various cgroup subsystems type ResourceStats struct { // Memory statistics. MemoryStats *MemoryStats @@ -99,12 +99,12 @@ type QOSContainersInfo struct { // The Pod workers interact with the PodContainerManager to create and destroy // containers for the pod. type PodContainerManager interface { - // GetPodContainerName returns the CgroupName identifer, and its literal cgroupfs form on the host. + // GetPodContainerName returns the CgroupName identifier, and its literal cgroupfs form on the host. GetPodContainerName(*v1.Pod) (CgroupName, string) // EnsureExists takes a pod as argument and makes sure that // pod cgroup exists if qos cgroup hierarchy flag is enabled. - // If the pod cgroup doesen't already exist this method creates it. + // If the pod cgroup doesn't already exist this method creates it. EnsureExists(*v1.Pod) error // Exists returns true if the pod cgroup exists. diff --git a/pkg/kubelet/cm/util/cgroups_linux.go b/pkg/kubelet/cm/util/cgroups_linux.go index ab90e441427..ffeac7891e1 100644 --- a/pkg/kubelet/cm/util/cgroups_linux.go +++ b/pkg/kubelet/cm/util/cgroups_linux.go @@ -45,7 +45,7 @@ func getCgroupPath(cgroupPath string) (string, error) { // If the cgroup name/path is absolute do not look relative to the cgroup of the init process. if filepath.IsAbs(cgroupPath) { - // Sometimes subsystems can be mounted togethger as 'cpu,cpuacct'. + // Sometimes subsystems can be mounted together as 'cpu,cpuacct'. return filepath.Join(root, mnt, cgroupPath), nil }