Enhance deployment sidekiq - #3
Merged
Merged
Conversation
- Move db:migrate from initContainer to a dedicated kubectl run pod in CI/CD - Wire sidekiq deployment image update and annotation into deploy workflow - Update sidekiq image registry from rakamin-staging to rakamin-poc - Remove secretRef from sidekiq deployment (using configMap only) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Problem
Database migrations were running as an init container inside the main API deployment, which coupled migration execution to every pod replica startup. This caused issues when multiple replicas tried to run migrations simultaneously and blocked the main deployment rollout. Additionally, the Sidekiq deployment had incorrect health check paths (relative instead of absolute), was referencing the wrong image registry, and lacked proper startup/shutdown status signaling — causing readiness and liveness probes to fail.
Solution
kubectl runpod in the CI/CD pipeline. Migrations now run once before the deployment update, with proper success/failure handling and log output.ai-interview-sidekiqdeployment image and annotate it with the change cause, keeping Sidekiq rollouts in sync with the API.tmp/sidekiq_status) to absolute (/ai-interview/tmp/sidekiq_status) so probes can locate the status file correctly.config/initializers/sidekiq.rbto write/delete the status file, enabling the liveness and readiness probes to work reliably.rakamin-pocinstead ofrakamin-staging).appuserfrom the Dockerfile to avoid permission issues when writing to the status file at runtime.ai-interview-secretsecret reference from the Sidekiq deployment (now sourced via configmap only).