Strictly speaking, device plugins must start their gRPC servers and be
ready to accept connections / serve requests before they register
themselves with the Kubelet to avoid race conditions and device
allocation issues.
This commit fixes the startup order implemented by
the generic device plugin. It starts the gRPC server and waits for it
to be running and accepting connections before registering
itself. The new server initialization function is interruptible and
compatible with the run.Group abstraction used in this project.
Strictly speaking, device plugins must start their gRPC servers and be ready to accept connections / serve requests before they register themselves with the Kubelet to avoid race conditions and device allocation issues.
This commit fixes the startup order implemented by the generic device plugin. It starts the gRPC server and waits for it to be running and accepting connections before registering itself. The new server initialization function is interruptible and compatible with the run.Group abstraction used in this project.
Signed-off-by: Lucas Servén Marín lserven@gmail.com