From 9d541911bb972b02f5131a86352b5c665ded7d12 Mon Sep 17 00:00:00 2001 From: PingWang Date: Wed, 21 Nov 2018 14:45:04 +0800 Subject: [PATCH] fix some typos Signed-off-by: PingWang fix typo Signed-off-by: PingWang --- pkg/kubelet/cm/devicemanager/checkpoint/checkpoint.go | 2 +- pkg/kubelet/cm/devicemanager/endpoint.go | 2 +- pkg/kubelet/cm/devicemanager/manager.go | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/kubelet/cm/devicemanager/checkpoint/checkpoint.go b/pkg/kubelet/cm/devicemanager/checkpoint/checkpoint.go index 9f8cac139cd..272a3bbe2ef 100644 --- a/pkg/kubelet/cm/devicemanager/checkpoint/checkpoint.go +++ b/pkg/kubelet/cm/devicemanager/checkpoint/checkpoint.go @@ -49,7 +49,7 @@ type Data struct { Checksum checksum.Checksum } -// NewDeviceManagerCheckpoint returns an instance of Checkpoint +// New returns an instance of Checkpoint func New(devEntries []PodDevicesEntry, devices map[string][]string) DeviceManagerCheckpoint { return &Data{ diff --git a/pkg/kubelet/cm/devicemanager/endpoint.go b/pkg/kubelet/cm/devicemanager/endpoint.go index 624643e5efb..ff8ba061d5d 100644 --- a/pkg/kubelet/cm/devicemanager/endpoint.go +++ b/pkg/kubelet/cm/devicemanager/endpoint.go @@ -54,7 +54,7 @@ type endpointImpl struct { cb monitorCallback } -// newEndpoint creates a new endpoint for the given resourceName. +// newEndpointImpl creates a new endpoint for the given resourceName. // This is to be used during normal device plugin registration. func newEndpointImpl(socketPath, resourceName string, callback monitorCallback) (*endpointImpl, error) { client, c, err := dial(socketPath) diff --git a/pkg/kubelet/cm/devicemanager/manager.go b/pkg/kubelet/cm/devicemanager/manager.go index 5434aa29f8e..d67daae66ce 100644 --- a/pkg/kubelet/cm/devicemanager/manager.go +++ b/pkg/kubelet/cm/devicemanager/manager.go @@ -125,7 +125,7 @@ func newManagerImpl(socketPath string) (*ManagerImpl, error) { } manager.callback = manager.genericDeviceUpdateCallback - // The following structs are populated with real implementations in manager.Start() + // The following structures are populated with real implementations in manager.Start() // Before that, initializes them to perform no-op operations. manager.activePods = func() []*v1.Pod { return []*v1.Pod{} } manager.sourcesReady = &sourcesReadyStub{} @@ -189,8 +189,8 @@ func (m *ManagerImpl) checkpointFile() string { return filepath.Join(m.socketdir, kubeletDeviceManagerCheckpoint) } -// Start starts the Device Plugin Manager amd start initialization of -// podDevices and allocatedDevices information from checkpoint-ed state and +// Start starts the Device Plugin Manager and start initialization of +// podDevices and allocatedDevices information from checkpointed state and // starts device plugin registration service. func (m *ManagerImpl) Start(activePods ActivePodsFunc, sourcesReady config.SourcesReady) error { klog.V(2).Infof("Starting Device Plugin manager") @@ -669,7 +669,7 @@ func (m *ManagerImpl) allocateContainerResources(pod *v1.Pod, container *v1.Cont // and container2 both require X resource A and Y resource B. Both allocation // requests may fail if we serve them in mixed order. // TODO: may revisit this part later if we see inefficient resource allocation - // in real use as the result of this. Should also consider to parallize device + // in real use as the result of this. Should also consider to parallelize device // plugin Allocate grpc calls if it becomes common that a container may require // resources from multiple device plugins. m.mutex.Lock()