costela / hcloud-ip-floater

k8s controller for Hetzner Cloud floating IPs
GNU General Public License v3.0
53 stars 9 forks source link

Add support for other cloud providers #31

Open jawabuu opened 3 years ago

jawabuu commented 3 years ago

Hey @costela I would like to propose extending ip-floater to support other clouds. This could be done gradually based on provider support and ease of implementation. We could probably start with the following clouds;

  1. DigitalOcean
  2. Linode
  3. Vultr Maybe:
  4. OVH
  5. Scaleway

Digitalocean could provide the quickest POC as it's API is most similar to Hetzner's. Based on code structure, I think most changes will be made here https://github.com/costela/hcloud-ip-floater/tree/master/internal/fipcontroller with an additional provider flag (default: hcloud) DigitalCean, Linode & Vultr also use an api_token similar to OVH cloud.

costela commented 3 years ago

Hi @jawabuu

Thanks for the suggestion! This sounds reasonable. Unfortunately I don't have any time left to commit to this project right now, so I can't say if/when this would be done :disappointed:

I would gladly look over PRs though!

jawabuu commented 3 years ago

Hey @costela Thank you for getting back to me. I would like to take a stab at it but you should probably advise with an overview of how you would prefer it refactored. Just a general one.

jawabuu commented 3 years ago

Would also appreciate if you can share how you mock/test with a cloud provider outside a cluster if possible.

costela commented 3 years ago

Hi @jawabuu, sorry for the late reply.

I'd say we'd need some common interface that wraps the few opperations we use in the individual cloud SDKs. So hcloudClienter would probably become something like cloudClienter and we'd have different implementations of it for each cloud provider.

As for testing, hcloudClienter basically exists to allow better testing, but I never got around to actually writing useful tests :shrug:

ghorofamike commented 3 years ago

This would be nice, but for vultr is completely unneccessary, vultr already does BGP which metallb supports natively, or is there some reason you dont want to do BGP with vultr?