Skip to content

define autoscaling behaviour with rolling update strategy#78

Open
henzigo wants to merge 7 commits intojg/gcloudfrom
jg/autoscaling
Open

define autoscaling behaviour with rolling update strategy#78
henzigo wants to merge 7 commits intojg/gcloudfrom
jg/autoscaling

Conversation

@henzigo
Copy link
Copy Markdown
Member

@henzigo henzigo commented Apr 15, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Kubernetes autoscaling and rollout behavior so deployments can roll safely under higher replica counts, and adjusts the manifest-generation tests/docs to match.

Changes:

  • Add HPA behavior (scaleUp/scaleDown policies + stabilization windows) to both HPAs and include HPAs in the webserver kustomize output.
  • Define/adjust Deployment rolling update strategy (storefront: new strategy; webserver-php-fpm: maxSurge percentage; further patched based on min replicas).
  • Update test scenarios/expected outputs and documentation to reflect autoscaling now being default-on and bundled into webserver.yaml.

Reviewed changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/scenarios/production-with-cloudflare/expected/webserver.yaml Expects rolling update strategy + both HPAs to be present in the webserver kustomize output.
tests/scenarios/production-with-cloudflare/expected/horizontalStorefrontAutoscaler.yaml Removes standalone expected HPA file (now emitted via webserver kustomize output).
tests/scenarios/production-with-cloudflare/expected/horizontalPodAutoscaler.yaml Removes standalone expected HPA file (now emitted via webserver kustomize output).
tests/scenarios/production-with-cloudflare/deploy-project.sh Switches to replica-count variables (min/max) instead of explicit ENABLE_AUTOSCALING flag.
tests/scenarios/escaping-env/expected/webserver.yaml Expects rolling update strategy + both HPAs to be present in the webserver kustomize output.
tests/scenarios/escaping-env/expected/horizontalStorefrontAutoscaler.yaml Removes standalone expected HPA file.
tests/scenarios/escaping-env/expected/horizontalPodAutoscaler.yaml Removes standalone expected HPA file.
tests/scenarios/escaping-env/deploy-project.sh Removes explicit ENABLE_AUTOSCALING enablement (relies on new default behavior).
tests/scenarios/development-single-domain/expected/webserver.yaml Expects rolling update strategy + both HPAs to be present; expects dev downscaling behavior (min=max=2).
tests/scenarios/development-single-domain/expected/horizontalStorefrontAutoscaler.yaml Removes standalone expected HPA file.
tests/scenarios/development-single-domain/expected/horizontalPodAutoscaler.yaml Removes standalone expected HPA file.
tests/scenarios/development-single-domain/deploy-project.sh Removes explicit ENABLE_AUTOSCALING enablement (relies on new default behavior).
tests/scenarios/basic-production/expected/webserver.yaml Expects rolling update strategy + both HPAs to be present in the webserver kustomize output.
tests/scenarios/basic-production/expected/horizontalStorefrontAutoscaler.yaml Removes standalone expected HPA file.
tests/scenarios/basic-production/expected/horizontalPodAutoscaler.yaml Removes standalone expected HPA file.
tests/scenarios/basic-production/deploy-project.sh Removes explicit ENABLE_AUTOSCALING enablement (relies on new default behavior).
tests/run-tests.sh Stops copying standalone HPA YAMLs into outputs (since they’re now built via kustomize).
kubernetes/horizontalStorefrontAutoscaler.yaml Adds behavior configuration to storefront HPA template.
kubernetes/horizontalPodAutoscaler.yaml Adds behavior configuration to php-fpm HPA template.
kubernetes/deployments/webserver-php-fpm.yaml Changes rolling update maxSurge to percentage.
kubernetes/deployments/storefront.yaml Adds explicit rolling update strategy (maxSurge/maxUnavailable/type).
deploy/parts/deploy.sh Removes ENABLE_AUTOSCALING assertions and the old imperative HPA apply/delete logic.
deploy/parts/autoscaling.sh Adds behavior for replica defaults/downscaling and patches rollout strategy; adds HPAs into webserver kustomization resources.
UPGRADE.md Notes this autoscaling/rolling-update behavior change in the upgrade log.
README.md Updates autoscaling section to reflect default-on behavior and how to disable it.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 43 to 51
fi

yq e -i '
.resources += [
"../../horizontalPodAutoscaler.yaml",
"../../horizontalStorefrontAutoscaler.yaml"
]
' "${CONFIGURATION_TARGET_PATH}/kustomize/webserver/kustomization.yaml"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants