terraform-hcloud-kube-hetzner icon indicating copy to clipboard operation
terraform-hcloud-kube-hetzner copied to clipboard

feat: allow defining custom subnet ip ranges for static agent pools

Open pat-s opened this issue 3 months ago • 5 comments

Instead of relying on the default ones incrementing from 10.0.x.

This can be useful (and even needed) if certain subnets in this range are already occupied (e.g. by a vswitch connection).

The current approach uses a hardcoded logic to increment from 0, e.g. 10.0, 10.1, 10.2, etc. subnet_ip_range allows overriding a node pool subnet on an individual basis.

pat-s avatar Sep 11 '25 23:09 pat-s

@pat-s This is a breaking change. What I'm exploring now is for v3 to actually have one network per nodepool. That will allow us to have up to 100 nodes per nodepool, and not the current limited 100 nodes per cluster. It resonates a little bit with what you are trying to achieve here.

mysticaltech avatar Oct 09 '25 07:10 mysticaltech

Why is it breaking? It is optional and only used when specified and otherwise uses the old default incrementing from 10.x per node?

pat-s avatar Oct 09 '25 07:10 pat-s

@pat-s Man, subnet ranges are computed very carefully, it's a whole equilibrium. I will need to think about that one more.

mysticaltech avatar Oct 09 '25 08:10 mysticaltech

@codex review please, and let me know if backward compatible or not.

mysticaltech avatar Oct 23 '25 12:10 mysticaltech

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".