siderolabs / cluster-api-control-plane-provider-talos

A control plane provider for CAPI + Talos
Mozilla Public License 2.0
60 stars 20 forks source link

Use externalIPs when bootstrapping cluster if no InternalIP found for the node #130

Closed Unix4ever closed 2 years ago

Unix4ever commented 2 years ago

Some infra providers (like Hetzner) do not set InternalIPs in the Machine resource. We may need to have a fallback in the provider which will pick ExternalIPs if no InternalIPs were found on any of the nodes.

This logic should be updated: https://github.com/siderolabs/cluster-api-control-plane-provider-talos/blob/master/controllers/taloscontrolplane_controller.go#L411

damdo commented 2 years ago

+1 for this.

@Unix4ever Would you prefer: A)

or B)

Unix4ever commented 2 years ago

Current logic is that it checks if any of machines do not have InternalIP set. It should remain the same, so the idea will be: