Feat: add support for deployment strategy#82
Feat: add support for deployment strategy#82alekc wants to merge 2 commits intosourcebot-dev:mainfrom
Conversation
… configuration Signed-off-by: Alexander Chernov <alexander@chernov.it>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughHelm chart version bumped to 0.1.67 and a new configurable Deployment strategy was added: Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@charts/sourcebot/values.schema.json`:
- Around line 39-50: The schema currently allows a "strategy" object with "type"
and "rollingUpdate" together even when "type" is "Recreate"; update the
"strategy" definition to validate that "rollingUpdate" is only permitted when
"type" is "RollingUpdate" (e.g., replace the loose properties with a
conditional/oneOf rule using "if": {"properties": {"type": {"const":
"Recreate"}}}, "then": {"not": {"required": ["rollingUpdate"]}} or equivalent,
or use oneOf branches for the two strategy shapes) so that the "strategy" object
rejects any object that has type "Recreate" and a "rollingUpdate" property while
still allowing "rollingUpdate" when type is "RollingUpdate".
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 80eb5c3e-3cae-4a2c-957b-c2cd0649cd2d
📒 Files selected for processing (4)
charts/sourcebot/Chart.yamlcharts/sourcebot/templates/deployment.yamlcharts/sourcebot/values.schema.jsoncharts/sourcebot/values.yaml
|
@alekc thanks for the PR! will take a look today |
Sourcebot mounts a PersistentVolumeClaim for its /data directory. The most common PVC storage class access mode is ReadWriteOnce (RWO), which allows the volume to be mounted by only one node at a time.
With the default RollingUpdate strategy, Kubernetes starts the new pod before terminating the old one. When both pods attempt to bind the same RWO volume simultaneously, the new pod gets stuck in Pending or ContainerCreating.
This makes rolling updates effectively broken for single-node PVC setups — which is the majority of self-hosted deployments.
What this PR does
Impact: no breaking change, default behaviour is maintained with type: RollingUpdate
Summary by CodeRabbit
New Features
Chores