Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handbook: PDBs for all pods, require spread #309

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Changes

This PR improves the high availability and deployment strategy of the handbook and staticjscms-hugo-standalone deployments by:

  1. Making pod anti-affinity required instead of preferred:

    • Changes preferredDuringSchedulingIgnoredDuringExecution to requiredDuringSchedulingIgnoredDuringExecution
    • Forces pods to be scheduled on different nodes for true HA
    • Pods will stay in Pending if spreading is not possible
  2. Adding PodDisruptionBudgets (PDBs) for all deployments:

    • Sets minAvailable: 1 to ensure at least one replica is always available
    • Protects against voluntary disruptions like node drains
    • Maintains unhealthyPodEvictionPolicy: AlwaysAllow for both PDBs
  3. Adding explicit RollingUpdate strategy:

    • Configures maxSurge: 1 and maxUnavailable: 1
    • Ensures controlled rolling updates of deployments
    • Maintains service availability during updates

Link to Devin run: https://app.devin.ai/sessions/9e6ed5a722aa40b1b3ca0844542981ca

Replace preferredDuringSchedulingIgnoredDuringExecution with requiredDuringSchedulingIgnoredDuringExecution for podAntiAffinity to force spreading out app replicas on different nodes (HA) or not schedule them (stay in Pending).

Add PDBs for all deployments to allow deleting and re-scheduling all but one replica (HA).

Add RollingUpdate strategy.

Co-Authored-By: [email protected] <[email protected]>
@devin-ai-integration devin-ai-integration bot requested a review from a team as a code owner December 17, 2024 12:36
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Add "(aside)" to your comment to have me ignore it.

@lyind lyind self-requested a review December 17, 2024 13:38
Copy link
Contributor

@lyind lyind left a comment

Choose a reason for hiding this comment

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

LGTM

@lyind lyind merged commit 48cbfaf into main Dec 17, 2024
6 checks passed
@lyind lyind deleted the devin/1734438669-add-pdbs-and-required-affinity branch December 17, 2024 13:39
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.

1 participant