User request
Reduce Kubernetes node count in bootstrap to a single node to see if it reduces provisioning time and overall resource consumption.
Specification (from research)
Bootstrap provisions a local k3d/k3s cluster via Terraform stack stacks/k8s (provider agynio/k3d). Current defaults are:
Target single-node Kubernetes cluster:
Required changes
-
Default node counts
- In
stacks/k8s/variables.tf, change agents default from 2 to 0.
- Add validations:
-
Make node count explicit in bootstrap apply flow
- In
apply.sh, for the k8s stack, pass -var servers=... and -var agents=... using environment variables:
K3D_SERVERS (default 1)
K3D_AGENTS (default 0)
- Add basic integer validation for these env vars (similar to existing
PORT validation).
-
Expose node count as action inputs (CI)
- In
.github/actions/provision/action.yml, add inputs:
servers default "1"
agents default "0"
- Wire them to the
apply.sh step via env vars (K3D_SERVERS, K3D_AGENTS).
-
Verification
- Add a post-provision assertion (in existing health verification step or a small new script step):
kubectl get nodes --no-headers | wc -l must equal 1.
- Also log node taints for debugging if scheduling fails.
-
Metrics for comparison (time/resources)
- Ensure CI logs include (best-effort):
apply.sh timing summary (already present)
docker system df and df -h before/after provisioning
kubectl get nodes -o wide and kubectl get pods -A -o wide
- These metrics should enable baseline comparison between
agents=2 and agents=0 runs.
Acceptance criteria
- Default bootstrap provisions exactly 1 Kubernetes node.
- Existing platform verification (e.g., health checks) still passes.
- CI remains green.
- Logs (or artifacts, if already used) include enough timing/resource data to compare against the prior 3-node topology.
Notes / constraints
- k3d load balancer container will still exist; success is 1 Kubernetes node, not 1 Docker container.
- This is intended for bootstrap/CI/local usage (not HA).
User request
Reduce Kubernetes node count in bootstrap to a single node to see if it reduces provisioning time and overall resource consumption.
Specification (from research)
Bootstrap provisions a local k3d/k3s cluster via Terraform stack
stacks/k8s(provideragynio/k3d). Current defaults are:servers = 1agents = 2Target single-node Kubernetes cluster:
servers = 1agents = 0Required changes
Default node counts
stacks/k8s/variables.tf, changeagentsdefault from2to0.servers >= 1agents >= 0Make node count explicit in bootstrap apply flow
apply.sh, for thek8sstack, pass-var servers=...and-var agents=...using environment variables:K3D_SERVERS(default1)K3D_AGENTS(default0)PORTvalidation).Expose node count as action inputs (CI)
.github/actions/provision/action.yml, add inputs:serversdefault"1"agentsdefault"0"apply.shstep via env vars (K3D_SERVERS,K3D_AGENTS).Verification
kubectl get nodes --no-headers | wc -lmust equal1.Metrics for comparison (time/resources)
apply.shtiming summary (already present)docker system dfanddf -hbefore/after provisioningkubectl get nodes -o wideandkubectl get pods -A -o wideagents=2andagents=0runs.Acceptance criteria
Notes / constraints