Closed LeoLiuYan closed 3 years ago
This pull request add NodeControllerReady
and PodControllerReady
function which expose in cli, is that ok?
@cpuguy83
Can we instead expose the underlying controllers directly?
e.g. cmd.NodeController()
and cmd.PodController()
, and the readiness can be checked from there.
Can we instead expose the underlying controllers directly?
e.g.
cmd.NodeController()
andcmd.PodController()
, and the readiness can be checked from there.
That's may be not appropriate since PodCtroller
in virtual-kubelet include a sync.Mutex field. So, should expose a interface when create PodController
or NodeController
?
The mutex is not exposed, it is private to the package.
The mutex is not exposed, it is private to the package.
As the lint says, "copylocks: assignment copies lock value" error, because of sync.Mutex
.
That's because you have it copying a value instead of passing a pointer.
That's because you have it copying a value instead of passing a pointer.
Already fix this issue. @cpuguy83
The root command is what creates the node and pod controller. There shouldn't be any need to pass that down.
The root command is what creates the node and pod controller. There shouldn't be any need to pass that down.
But the root command not return controllers, so pass a pointer when we create the command, and then assign the value to the pointer.
What I'm saying is, let's have the command provide accessors for those controllers.
Simplify the implements, remove point of controllers, just provide accessors. @cpuguy83
Close since there's no activity for more than 5 months. Feel free to open a new PR if you think the changes are still required.
cc @cpuguy83