feat: add support for replica ranges and HorizontalPodAutoscaler integration

This commit is contained in:
2026-09-03 12:02:22 +07:00 Unverified
parent 4ce8ed3e40
commit 8e9d207915
10 changed files with 700 additions and 39 deletions
+2
View File
@@ -118,6 +118,8 @@ The active example uses TCP readiness and liveness probes, so it does not assume
`deploy.replicas` controls the Deployment replica count. The example starts with one replica and includes conservative CPU and memory requests and limits through `x-container`.
A `"min-max"` range enables autoscaling: kuber renders a `HorizontalPodAutoscaler` (CPU 80% target) so the Deployment scales between the min and max, and injects a `100m` CPU request if none is set. For example `deploy.replicas: "1-6"`.
`x-container` is merged directly into the generated Kubernetes container. The example uses it for probes, resources, and a non-root security context matching UID/GID `1001` from the Dockerfile.
Tune resource values from observed production usage. Memory limits that are too low cause Kubernetes to terminate the process, while requests that are too high make scheduling unnecessarily difficult.