define autoscaling behaviour with rolling update strategy#78
Open
define autoscaling behaviour with rolling update strategy#78
Conversation
There was a problem hiding this comment.
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" | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.