env-manager: dynamically generate cidr for new env (#85)
* env-manager: allocate env cidrs dynamically
* fix: net.IP to netip.Addr conversion
* bootstrapper: generate empty env-cidrs.yaml
* fix: net.IP to netip.Addr conversion for IP pool
* infra: expose provided startIP subnet via tailscale proxy
* headscale: pass private network ip subnet to expose to api service
* dns: make ingress IP configurable
---------
Co-authored-by: Giorgi Lekveishvili <lekva@gl-mbp-m1-max.local>
diff --git a/core/installer/tasks/env.go b/core/installer/tasks/env.go
index 04b3c9a..eb537da 100644
--- a/core/installer/tasks/env.go
+++ b/core/installer/tasks/env.go
@@ -41,6 +41,7 @@
func NewCreateEnvTask(
env Env,
publicIPs []net.IP,
+ startIP net.IP,
nsCreator installer.NamespaceCreator,
repo installer.RepoIO,
) (Task, DNSZoneRef) {
@@ -55,9 +56,9 @@
[]Task{
SetupConfigRepoTask(env, &st),
NewActivateEnvTask(env, &st),
- SetupZoneTask(env, &st),
+ SetupZoneTask(env, startIP, &st),
},
- SetupInfra(env, &st)...,
+ SetupInfra(env, startIP, &st)...,
)...,
)
rctx, done := context.WithCancel(context.Background())