Repository navigation
fix: set deployment strategy to Recreate for SQLite [backport #1012] - #1015
Conversation
The Helm chart now uses the Recreate deployment strategy when mode is set to deployment and SQLite is being used as the database. Without this strategy, Kubernetes defaults to RollingUpdate, which can cause rollouts to hang when a new pod is scheduled on a different node than the old one but cannot mount the PersistentVolume (PV) because it is ReadWriteOnce (RWO) and still attached to the old pod. This is particularly relevant for SQLite which relies on a single PVC for storage. The change handles this by conditionally setting strategy.type based on the database type in deployment.yaml. Unit tests have been added to verify the correct rendering for both SQLite (Recreate) and other databases (RollingUpdate). fixes #1010 (cherry picked from commit 81dac8a)
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical issue where Kubernetes deployments utilizing SQLite with ReadWriteOnce Persistent Volumes could experience hung rollouts due to the default Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly implements the Recreate deployment strategy for SQLite to prevent rollout issues with ReadWriteOnce persistent volumes. The changes are well-implemented across the Helm chart, including updates to values.yaml, the schema, and documentation. The new logic is also covered by an expanded test suite. I have identified a minor flaw in one of the new test cases and provided a suggestion for a fix to ensure it accurately validates the intended behavior.
| set: | ||
| mode: deployment | ||
| strategy: | ||
| type: Recreate |
There was a problem hiding this comment.
This test case is flawed as it relies on the default database type (sqlite), which means it doesn't correctly test that a user-provided strategy is applied for non-sqlite databases. To properly test the {{- else if .Values.strategy }} logic, please explicitly set a different database type, such as postgresql.
set:
mode: deployment
config:
database:
type: postgresql
postgresql:
host: localhost
strategy:
type: Recreate
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-0.9 #1015 +/- ##
===========================================
Coverage 5.04% 5.04%
===========================================
Files 6 6
Lines 436 436
===========================================
Hits 22 22
Misses 410 410
Partials 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Bot-based backport to
release-0.9, triggered by a label in #1012.The Helm chart now uses the Recreate deployment strategy when mode is
set to deployment and SQLite is being used as the database.
Without this strategy, Kubernetes defaults to RollingUpdate, which can
cause rollouts to hang when a new pod is scheduled on a different node
than the old one but cannot mount the PersistentVolume (PV) because it
is ReadWriteOnce (RWO) and still attached to the old pod. This is
particularly relevant for SQLite which relies on a single PVC for
storage.
The change handles this by conditionally setting strategy.type based on
the database type in deployment.yaml. Unit tests have been added to
verify the correct rendering for both SQLite (Recreate) and other
databases (RollingUpdate).
fixes #1010