Merge pull request #71306 from ping035627/k8s-181121

fix some typos
This commit is contained in:
Kubernetes Prow Robot 2019-01-09 09:06:31 -08:00 committed by GitHub
commit d88994cf9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -49,7 +49,7 @@ type Data struct {
Checksum checksum.Checksum Checksum checksum.Checksum
} }
// NewDeviceManagerCheckpoint returns an instance of Checkpoint // New returns an instance of Checkpoint
func New(devEntries []PodDevicesEntry, func New(devEntries []PodDevicesEntry,
devices map[string][]string) DeviceManagerCheckpoint { devices map[string][]string) DeviceManagerCheckpoint {
return &Data{ return &Data{

View File

@ -54,7 +54,7 @@ type endpointImpl struct {
cb monitorCallback 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. // This is to be used during normal device plugin registration.
func newEndpointImpl(socketPath, resourceName string, callback monitorCallback) (*endpointImpl, error) { func newEndpointImpl(socketPath, resourceName string, callback monitorCallback) (*endpointImpl, error) {
client, c, err := dial(socketPath) client, c, err := dial(socketPath)

View File

@ -125,7 +125,7 @@ func newManagerImpl(socketPath string) (*ManagerImpl, error) {
} }
manager.callback = manager.genericDeviceUpdateCallback 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. // Before that, initializes them to perform no-op operations.
manager.activePods = func() []*v1.Pod { return []*v1.Pod{} } manager.activePods = func() []*v1.Pod { return []*v1.Pod{} }
manager.sourcesReady = &sourcesReadyStub{} manager.sourcesReady = &sourcesReadyStub{}
@ -189,8 +189,8 @@ func (m *ManagerImpl) checkpointFile() string {
return filepath.Join(m.socketdir, kubeletDeviceManagerCheckpoint) return filepath.Join(m.socketdir, kubeletDeviceManagerCheckpoint)
} }
// Start starts the Device Plugin Manager amd start initialization of // Start starts the Device Plugin Manager and start initialization of
// podDevices and allocatedDevices information from checkpoint-ed state and // podDevices and allocatedDevices information from checkpointed state and
// starts device plugin registration service. // starts device plugin registration service.
func (m *ManagerImpl) Start(activePods ActivePodsFunc, sourcesReady config.SourcesReady) error { func (m *ManagerImpl) Start(activePods ActivePodsFunc, sourcesReady config.SourcesReady) error {
klog.V(2).Infof("Starting Device Plugin manager") 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 // and container2 both require X resource A and Y resource B. Both allocation
// requests may fail if we serve them in mixed order. // requests may fail if we serve them in mixed order.
// TODO: may revisit this part later if we see inefficient resource allocation // 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 // plugin Allocate grpc calls if it becomes common that a container may require
// resources from multiple device plugins. // resources from multiple device plugins.
m.mutex.Lock() m.mutex.Lock()