Repository navigation
feat(deploy): Kubernetes on kind with migrate/reindex jobs and CI smoke test (PR 4) - #13
Merged
Merged
Conversation
…r the api, postgres and migrate/reindex jobs
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.
What
PR 4 of
docs/plan-assistant-genai.md: it deploys the same image to a localkindcluster.k8s/(kustomization):namespaceandConfigMap;StatefulSetwith a 1 Gi PVC;Deployment(without--reload; startup, liveness and readiness probes on/healthz) and itsService;k8s/jobs/with amigrateJob (alembic upgrade head) and areindexJob;secrets.example.yaml, a template only, never applied.make:k8s-up=build+k8s-deploy;k8s-deployruns DB ready → migrate → reindex → api rollout, and is safe to re-run;k8s-smokecalls/healthzandGET /productsthrough the Service;k8s-downdeletes the cluster.alembic.iniandalembic/. Before, only Compose mounted them, so the migrate Job couldn't run from the image.k8sworkflow, filtered by path and also runnable by hand. It creates a kind cluster (helm/kind-action@v1.15.1), runsmake k8s-deployandmake k8s-smoke, and dumps logs on failure.Why
To prove the image runs unchanged outside Compose:
Secrets;The optional AWS step is out of scope: there's no AWS account. Decisions are in
docs/step-19-k8s-deploy.md(Spanish).Proof (local, kind v0.33.0)
make k8s-deployexits 0.migrateJob runs revisions 1 → 4.reindexJob completes.make k8s-smokereturns{"status":"ok"}and[].make k8s-deployexits 0 andreindexgivesindexed=1.StatefulSetstays at generation 1 anddb-0has 0 restarts: the data survives.kubectl diff -k k8sis empty.ANTHROPIC_API_KEYis piped from.envthrough stdin and appears nowhere in the deploy output (0 matches).make lintis clean;make testgives 272 passed, 4 deselected.k8sworkflow runs on this PR (see the checks).🤖 Generated with Claude Code