diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index e8918472ee8..c7a4ad94842 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -204,7 +204,7 @@ const ( ) var ( - // ContainerLogsDir can be overwrited for testing usage + // ContainerLogsDir can be overwritten for testing usage ContainerLogsDir = DefaultContainerLogsDir etcHostsPath = getContainerEtcHostsPath() ) @@ -2235,7 +2235,7 @@ func (kl *Kubelet) deletePod(pod *v1.Pod) error { } // rejectPod records an event about the pod with the given reason and message, -// and updates the pod to the failed phase in the status manage. +// and updates the pod to the failed phase in the status manager. func (kl *Kubelet) rejectPod(pod *v1.Pod, reason, message string) { kl.recorder.Eventf(pod, v1.EventTypeWarning, reason, message) kl.statusManager.SetPodStatus(pod, v1.PodStatus{ diff --git a/pkg/kubelet/kubelet_pods.go b/pkg/kubelet/kubelet_pods.go index 03d8dc987b2..d92454fd785 100644 --- a/pkg/kubelet/kubelet_pods.go +++ b/pkg/kubelet/kubelet_pods.go @@ -477,7 +477,7 @@ func (kl *Kubelet) GenerateRunContainerOptions(ctx context.Context, pod *v1.Pod, if err != nil { return nil, nil, err } - // nodename will be equals to hostname if SetHostnameAsFQDN is nil or false. If SetHostnameFQDN + // nodename will be equal to hostname if SetHostnameAsFQDN is nil or false. If SetHostnameFQDN // is true and hostDomainName is defined, nodename will be the FQDN (hostname.hostDomainName) nodename, err := util.GetNodenameForKernel(hostname, hostDomainName, pod.Spec.SetHostnameAsFQDN) if err != nil { @@ -981,7 +981,7 @@ func (kl *Kubelet) isAdmittedPodTerminal(pod *v1.Pod) bool { return true } // a pod that has been marked terminal within the Kubelet is considered - // inactive (may have been rejected by Kubelet admision) + // inactive (may have been rejected by Kubelet admission) if status, ok := kl.statusManager.GetPodStatus(pod.UID); ok { if status.Phase == v1.PodSucceeded || status.Phase == v1.PodFailed { return true diff --git a/pkg/kubelet/nodeshutdown/systemd/inhibit_linux.go b/pkg/kubelet/nodeshutdown/systemd/inhibit_linux.go index 2ef961660ab..270177bc2b7 100644 --- a/pkg/kubelet/nodeshutdown/systemd/inhibit_linux.go +++ b/pkg/kubelet/nodeshutdown/systemd/inhibit_linux.go @@ -133,7 +133,7 @@ func (bus *DBusCon) ReloadLogindConf() error { return nil } -// MonitorShutdown detects the a node shutdown by watching for "PrepareForShutdown" logind events. +// MonitorShutdown detects the node shutdown by watching for "PrepareForShutdown" logind events. // see https://www.freedesktop.org/wiki/Software/systemd/inhibit/ for more details. func (bus *DBusCon) MonitorShutdown() (<-chan bool, error) { err := bus.SystemBus.AddMatchSignal(dbus.WithMatchInterface(logindInterface), dbus.WithMatchMember("PrepareForShutdown"), dbus.WithMatchObjectPath("/org/freedesktop/login1")) diff --git a/pkg/kubelet/pluginmanager/operationexecutor/operation_executor.go b/pkg/kubelet/pluginmanager/operationexecutor/operation_executor.go index b6e6019a46f..37c993ded57 100644 --- a/pkg/kubelet/pluginmanager/operationexecutor/operation_executor.go +++ b/pkg/kubelet/pluginmanager/operationexecutor/operation_executor.go @@ -43,7 +43,7 @@ import ( // errors are simply logged and the goroutine is terminated without updating // actualStateOfWorld. type OperationExecutor interface { - // RegisterPlugin registers the given plugin using the a handler in the plugin handler map. + // RegisterPlugin registers the given plugin using a handler in the plugin handler map. // It then updates the actual state of the world to reflect that. RegisterPlugin(socketPath string, timestamp time.Time, pluginHandlers map[string]cache.PluginHandler, actualStateOfWorld ActualStateOfWorldUpdater) error diff --git a/pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher_test.go b/pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher_test.go index b9e2c764f61..d610d37a9ce 100644 --- a/pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher_test.go +++ b/pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher_test.go @@ -184,7 +184,7 @@ func TestPluginReRegistration(t *testing.T) { // The updated plugin should be in the desired state of world cache for i := 0; i < 10; i++ { // Stop the plugin; the plugin should be removed from the desired state of world cache - // The plugin removel doesn't work when running the unit tests locally: event.Op of plugin watcher won't pick up the delete event + // The plugin removal doesn't work when running the unit tests locally: event.Op of plugin watcher won't pick up the delete event require.NoError(t, p.Stop()) waitForUnregistration(t, pluginInfo.SocketPath, dsw) diff --git a/pkg/kubelet/runonce.go b/pkg/kubelet/runonce.go index b11442ae902..448df444869 100644 --- a/pkg/kubelet/runonce.go +++ b/pkg/kubelet/runonce.go @@ -111,7 +111,7 @@ func (kl *Kubelet) runOnce(ctx context.Context, pods []*v1.Pod, retryDelay time. return results, err } -// runPod runs a single pod and wait until all containers are running. +// runPod runs a single pod and waits until all containers are running. func (kl *Kubelet) runPod(ctx context.Context, pod *v1.Pod, retryDelay time.Duration) error { var isTerminal bool delay := retryDelay diff --git a/pkg/kubelet/status/status_manager.go b/pkg/kubelet/status/status_manager.go index e43c5874481..0c359f2b3fd 100644 --- a/pkg/kubelet/status/status_manager.go +++ b/pkg/kubelet/status/status_manager.go @@ -533,7 +533,7 @@ func hasPodInitialized(pod *v1.Pod) bool { // initializedContainers returns all status except for suffix of containers that are in Waiting // state, which is the set of containers that have attempted to start at least once. If all containers -// are Watiing, the first container is always returned. +// are Waiting, the first container is always returned. func initializedContainers(containers []v1.ContainerStatus) []v1.ContainerStatus { for i := len(containers) - 1; i >= 0; i-- { if containers[i].State.Waiting == nil || containers[i].LastTerminationState.Terminated != nil {