Repository navigation
feat(k8s): add PodDisruptionBudgets and HorizontalPodAutoscalers for web and server - #611
Open
SceptredHead wants to merge 1 commit into
Open
SceptredHead wants to merge 1 commit into
SceptredHead wants to merge 1 commit into
Conversation
…web and server Node drains and rolling updates could take down the service when replicas are running at the minimum count. Traffic spikes had no scale-out path. PodDisruptionBudgets (deploy/k8s/base/pdb.yaml): - prism-server-pdb: minAvailable 1 — ensures at least one server pod survives voluntary disruptions (node drain, rolling restart). - prism-web-pdb: minAvailable 1 — same guarantee for the web frontend. HorizontalPodAutoscalers (deploy/k8s/base/hpa.yaml, autoscaling/v2): - prism-server-hpa: scales between 2 and 6 replicas on CPU ≥ 70 % or memory ≥ 80 %. - prism-web-hpa: same thresholds and range. Production overlay (deploy/k8s/overlays/production/patches/hpa.yaml): - Raises server minReplicas to 3 / maxReplicas to 12. - Raises web minReplicas to 3 / maxReplicas to 10, matching the existing production replica patch. Both new manifests are registered in the base kustomization.yaml. Closes DevNiola#410
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.
Description
The web and server Deployments had fixed replica counts with no protection against voluntary disruptions and no mechanism to scale under traffic load. This PR adds PodDisruptionBudgets and HorizontalPodAutoscalers for both services.
What was implemented
PodDisruptionBudgets (
deploy/k8s/base/pdb.yaml)prism-server-pdb—minAvailable: 1ensures at least one server pod survives a node drain or rolling restart.prism-web-pdb— same guarantee for the web frontend.HorizontalPodAutoscalers (
deploy/k8s/base/hpa.yaml,autoscaling/v2)prism-server-hpa— scales between 2 and 6 replicas when CPU exceeds 70 % average utilization or memory exceeds 80 %.prism-web-hpa— same thresholds and range.Production overlay (
deploy/k8s/overlays/production/patches/hpa.yaml)prism-server-hpato minReplicas: 3 / maxReplicas: 12.prism-web-hpato minReplicas: 3 / maxReplicas: 10.These values align with the existing
replicas.yamlpatch that sets base replicas to 3 in production.Both new manifests are registered in
deploy/k8s/base/kustomization.yaml.Closes #410