ionos-cloud / cluster-api-provider-proxmox

Cluster API Provider for Proxmox VE (CAPMOX)
Apache License 2.0
174 stars 23 forks source link

Support externally managed Kubernetes Control Planes #95

Open prometherion opened 7 months ago

prometherion commented 7 months ago

Describe the solution you'd like

Cluster API supports referencing a third-party Control Plane Provider, such as Kamaji.

The Control Plane provider will be responsible for provisioning a Control Plane backed by a Kubernetes API Server which will be used by the infrastructure cluster with the controlPlaneEndpoint contract.

The current version of CAPMOX doesn't consider this, requiring to know the Control Plane endpoint in advance.

https://github.com/ionos-cloud/cluster-api-provider-proxmox/blob/0033e2954e5fc70029fe64fae1daf641a24dcd2b/internal/webhook/proxmoxcluster_webhook.go#L99-L108

Kamaji has successfully integrated with other infrastructure providers by relying on externally managed Control Planes: this approach has been taken into consideration on other CAPI infrastructure providers we worked with.

Anything else you would like to add:

To avoid breaking the current UX, it could be useful to have a knob to skip the ControlPlane endpoint address for the given ProxmoxCluster.

Once the Control Plane provider has provisioned the Kubernetes API Server address, it can patch the infrastructure cluster to continue the required reconciliation, e.g.: https://github.com/clastix/cluster-api-control-plane-provider-kamaji/blob/75b0578114b236f1741d4b79b60eb39b23dfcbeb/controllers/kamajicontrolplane_controller_cluster_patch.go#L20-L52

I'm open to provide a PR to address this feature request.

Environment:

mcbenjemaa commented 7 months ago

Thanks for the issue,

you're right; we will take this into our next release.

prometherion commented 7 months ago

May I work on this? I'd like to contribute to the project.

mcbenjemaa commented 7 months ago

Oh yes, of course, that would be great.

Thank you 💯