Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for nodes in different regions #18

Open
Silvest89 opened this issue May 23, 2024 · 3 comments
Open

Support for nodes in different regions #18

Silvest89 opened this issue May 23, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@Silvest89
Copy link

This way you can have a control plane node in each location for europe. (FSN, NBG, HEL)

@mrclrchtr
Copy link
Member

Thanks for the feature request. I am currently carrying out some basic code refactorings. After that it should be easier to realize the feature.

@mrclrchtr mrclrchtr added the enhancement New feature or request label May 27, 2024
@TeeTeufel
Copy link
Contributor

As far as I tried to implement this feature, I think this will be a breaking change.
There could be something I missed, or did wrong.
https://github.com/TeeTeufel/terraform-hcloud-talos/tree/feature/nodesInDifferentRegions

Changing the datacenter of existing nodes will destroy an recreate them, this is something I expect.
While recreating them, it seems that inline primary IPv4/IPv6 addresses won't be recreated. This leads to an terraform error, because primary ip addresses are location bound and can't be transferred to a different datacenter.

I will check how this will behave if primary ips are created with their own resource.

Unrelated to the creation of primary ips, changing the datacenter will probably result in different primary ips for all recreated nodes.

This enhancement probably needs a bit more research in context with autoscaling, because currently I set the datacenter location for the nodes as a list of strings.

With terraform 1.9 there should be a feature introduced to validate a variable condition with external variables. Currently, the list of strings could be longer, or shorter.
hashicorp/terraform#25609 (comment)

@mrclrchtr
Copy link
Member

mrclrchtr commented Jun 7, 2024

This module is currently not able to carry out meaningful upgrades anyway. Changing the machine config would always lead to a recreate of the server. (I often create my cluster from scratch. Simple/automatic importing of backups helps a lot.)

If updates are made, then they should be made via patches. But this is not so easy, because patches are not idempotent. They build on the current state and change it. This means that a patch can have a different effect the second time you run it.

I think at the beginning it is sufficient to define several node groups in regions when creating the cluster, similar to kube-hetzner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants