machine-controller-manager icon indicating copy to clipboard operation
machine-controller-manager copied to clipboard

Provide a way to initialize out-of-tree providers

Open zuzzas opened this issue 5 years ago • 1 comments

What would you like to be added:

I'd like to have a special gRPC method that is called exactly once on the start-up of MCM and subsequent initialization of out-of-tree providers.

Here's how the Cloud Provider Interface approaches this: https://github.com/kubernetes/cloud-provider/blob/master/cloud.go#L44-L47

Why is this needed:

For example, while using an in-house in-tree vSphere plugin, we've hit a limit on simultaneous login attempts. An Active Directory server was under a lot of duress before I've implemented persistent session storage.

Here's how I've hacked around this problem to enable persistent sessions:

  • Implementation: https://github.com/flant/machine-controller-manager-provider-yandex/blob/50b1fdd35f55a09d1259f3a88b08630acdc7a02b/pkg/spi/spi.go
  • Usage: https://github.com/flant/machine-controller-manager-provider-yandex/blob/50b1fdd35f55a09d1259f3a88b08630acdc7a02b/pkg/provider/core.go#L94

Basically, we add or get a session from a map. Ugly, but works.

zuzzas avatar Sep 22 '20 07:09 zuzzas

There is no gRPC comm between MCM and MC controller. We are not very clear on the requirement. Considering that driver implementations are now initialized in provider specific code in out-of-tree repos - this is now already in control of the provider. So it is not clear what we should do now inside the MCM. Request re-clarification from @zuzzas

elankath avatar Feb 22 '23 06:02 elankath