fix(workspace): Recreate strategy on RWO deployments (stop rollout deadlock) - #1145
Merged
Conversation
…ut deadlock workspace-minio/mail/caldav are single-replica with ReadWriteOnce PVCs but used RollingUpdate, so any pod-spec change spawns a new pod that can't Multi-Attach the volume the old pod holds on another node -> ContainerCreating forever. This wedged workspace-minio (Degraded) and would wedge mail on the coming ssl=required flip. Recreate (as gitea already does) releases the volume before starting the replacement. Serves the 'recover gracefully' goal: stateful rollouts complete instead of hanging.
mdheller
enabled auto-merge (squash)
July 31, 2026 01:50
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
This PR updates single-replica Deployments that use ReadWriteOnce PVCs to use a Recreate rollout strategy, preventing deadlocked rollouts caused by Multi-Attach conflicts during RollingUpdate.
Changes:
- Set
spec.strategy.type: Recreateforworkspace-minio,workspace-mail, andworkspace-caldavbase Deployments - Document the rationale in-line to prevent regressions back to
RollingUpdate
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| infra/k8s/workspace-minio/base/deployment.yaml | Forces Recreate to avoid RWO PVC Multi-Attach rollout deadlocks |
| infra/k8s/workspace-mail/base/deployment.yaml | Forces Recreate to avoid RWO PVC Multi-Attach rollout deadlocks |
| infra/k8s/workspace-caldav/base/deployment.yaml | Forces Recreate to avoid RWO PVC Multi-Attach rollout deadlocks |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Live fix —
ws-workspace-miniois Degraded right now from this exact bug (a rollout wedged mid-flight; the old pod still serves, so no outage).Root cause
workspace-minio,workspace-mail, andworkspace-caldavare single-replica with ReadWriteOnce PVCs but use the default RollingUpdate strategy. Any pod-spec change starts a new pod that lands on a different node and can't Multi-Attach the RWO volume the old pod holds → stuckContainerCreatingindefinitely.Fix
strategy: { type: Recreate }on all three (the pattern gitea already uses for its RWO volume). Recreate terminates the old pod first, releasing the volume, so the replacement attaches cleanly.Impact
workspace-miniorollout (digest-pin from fix(workspace-minio): sovereign digest pin + clear the permanent OutOfSync #1135 finally lands).workspace-mailfrom deadlocking on the imminentssl=required/ TLS-mount change.Verified
kubectl kustomizerendersstrategy: Recreateon all three overlays.🤖 Generated with Claude Code