rancher-sandbox / cluster-api-addon-provider-fleet

Cluster API Add-on Provider for Fleet will auto register child clusters with https://fleet.rancher.io/.
Apache License 2.0
2 stars 3 forks source link

Implement agent initiated downstream registration #30

Open Danil-Grigorev opened 5 months ago

Danil-Grigorev commented 5 months ago

Fleet provides 2 alternative approaches to cluster registration:

  1. Manager initiated: Currently supported, CAPI creates cluster secret, CAPAF generates the cluster resource. Requires API server accessibility from the management cluster.
  2. Agent initiated: Supported on the manual basis #39. Does not require to have direct connection from management to the downstream (child) cluster.

Addon provider is in the position to simplify and automate the flow for ClusterClass based Clusters. Using the Topology Mutation Hook, may allow to extend post<BootstrapProvider>Commands API data field with the necessary commands to deploy the fleet agent in the newly created CAPI Cluster during bootstrap procedure.

Thanks to @richardcase for bringing this to the table.

Danil-Grigorev commented 5 months ago

I drafted the thoughts on how it can be implemented here: https://hackmd.io/@bldpkRSnSNqZj73Y_EV0dQ/By6M6fz7R

Danil-Grigorev commented 5 months ago

I’ve brainstormed the ideas some more and left a proposal for the CAAPF: https://hackmd.io/@UJaEY_gMRYSWN1nvVVscxQ/Sk5gKsSE0