infra: remove control-plane SPOFs — HA replicas + PodDisruptionBudgets#124
Merged
Merged
Conversation
The controller and both oauth2-proxies ran replicas:1 with no PDBs, so a single pod crash or node drain locked users out and left the admin control plane with no redundancy. - controller, controller oauth2-proxy, and per-user oauth2-proxy now run replicas:2 (all stateless) with a PodDisruptionBudget (minAvailable:1) - topologySpreadConstraints (ScheduleAnyway) keep the replicas off one node while still scheduling on single-node clusters - workspace pod stays replicas:1 (RWO PVC), as called out in the issue - helm-unittest coverage for the new replicas/PDB/spread resources Closes imran31415#106
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.
Summary
Removes the avoidable single points of failure called out in #106: the controller and both oauth2-proxies ran
replicas: 1with noPodDisruptionBudget, so a single pod crash or node drain locked users out and left the admin control plane with no redundancy.Changes
charts/workspace-controller/templates/deployment.yaml):replicas: 2+topologySpreadConstraints; newtemplates/pdb.yaml(minAvailable: 1). PDB lives in its own file to match this chart's one-resource-per-file layout (keepsdeployment.yamlsingle-doc).charts/workspace-controller/templates/oauth2-proxy.yaml):replicas: 2+ spread + appended PDB.charts/workspace/templates/oauth2-proxy.yaml):replicas: 2+ spread + PDB, all inside the existingingress.auth.type=oauth2guard.topologySpreadConstraintsusewhenUnsatisfiable: ScheduleAnyway(soft) so single-node clusters still schedule both replicas.replicas: 1(RWO PVC), as the issue specifies.Tests
pdb_test.yaml, controlleroauth2-proxy_test.yaml, per-user proxy cases iningress_public_test.yaml); the controller's old "single replica" assertion is updated to HA.helm unittest charts/workspace/ charts/workspace-controller/→ 69 passed (was 63). Both chartshelm lintclean. Manifests render correctly viahelm template.server.pyunits inmake test-all-unitsare unaffected.Acceptance criteria
Closes #106