Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note: also this PR is [draft] and needs alignment and some cleanup to remove filoz-infra mentions (and cleanup of /docs) prior to merge. I wanted to get this out and get a pr review from copilot and will move this back to draft |
There was a problem hiding this comment.
Pull request overview
This comprehensive pull request establishes a complete local-to-production Kubernetes deployment workflow for the dealbot application. The PR introduces Helm charts for local Kind cluster development, implements GitOps-based CI/CD pipelines with automated Docker image building and semantic versioning via release-please, and provides extensive documentation for both standard releases and emergency hotfixes.
Key changes:
- Replaces docker-compose with Helm charts and Kind for local development, providing production-parity K8s environments
- Implements automated CI/CD with path-based change detection, dual image tagging (SHA for staging, semver for production), and ECR manifest-based image promotion
- Adds comprehensive hotfix workflow supporting emergency releases directly from hotfix branches
Reviewed changes
Copilot reviewed 40 out of 41 changed files in this pull request and generated 20 comments.
Show a summary per file
| File | Description |
|---|---|
| release-please-config.json | Configures release-please for independent versioning of backend and web apps with conventional commits |
| .release-please-manifest.json | Tracks current semantic versions for both applications starting at 0.0.1 |
| kind-config.yaml | Defines local Kind cluster with port mappings for backend (8080) and web (3000) services |
| Makefile | Provides comprehensive targets for building images, loading to Kind, deploying Helm charts, and managing secrets |
| .env.example | Template for local development secrets (wallet keys, optional DB password) |
| DEVELOPMENT.md | Complete guide for local Kubernetes development with Kind, Helm, and secret management |
| docs/release-process.md | Documents the automated staging-to-production release flow with Flux CD integration |
| docs/release-please-flow.md | Explains conventional commit-based versioning and release-please PR workflow |
| docs/infra.md | Describes integration between local Helm charts and production Kustomize manifests in filoz-infra |
| docs/hotfix-and-edge-cases.md | Comprehensive guide for emergency hotfixes and edge case handling |
| charts/dealbot/Chart.yaml | Helm chart metadata for backend service |
| charts/dealbot/values.yaml | Production-ready values for backend with security and scaling options |
| charts/dealbot/values.local.yaml | Local development overrides including bundled PostgreSQL |
| charts/dealbot/values.local.override.example.yaml | Template for gitignored local customizations |
| charts/dealbot/templates/*.yaml | Kubernetes manifests for deployment, service, ingress, HPA, PostgreSQL, ConfigMap, and ServiceAccount |
| charts/dealbot-web/Chart.yaml | Helm chart metadata for web frontend |
| charts/dealbot-web/values.yaml | Production-ready values for web service |
| charts/dealbot-web/values.local.yaml | Local development overrides with NodePort service |
| charts/dealbot-web/values.local.override.example.yaml | Template for gitignored web customizations |
| charts/dealbot-web/templates/*.yaml | Kubernetes manifests for web deployment, service, ingress, and HPA |
| apps/web/Dockerfile | Multi-stage build with Caddy server, runtime config generation, and reverse proxy |
| apps/web/docker-entrypoint.sh | Generates /config.json from environment variables at container startup |
| apps/web/src/api/client.ts | Implements runtime config loading with fallback to build-time values for API base URL |
| apps/postgres/Dockerfile | Minimal PostgreSQL image for local development based on postgres:16-alpine |
| .github/workflows/docker-build.yml | Builds and pushes Docker images with SHA-based tags on main branch merges |
| .github/workflows/release-please.yml | Creates release PRs and retags images with semver after PR merge |
| .github/workflows/hotfix-release.yml | Handles emergency hotfix releases from hotfix/** branches |
| .gitignore | Adds entries for local Helm override files |
| docker-compose.dev.yml | Removed in favor of Kubernetes-based local development |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Steve Loeppky <biglep@protocol.ai>
|
@BigLep I have significantly updated the docs and tried to get everything up to date.. removed inline code and linked to code where appropriate.. lmk if you have further feedback |
juliangruber
left a comment
There was a problem hiding this comment.
I have 0 experience with k8s so removing my review request. The only thought I have is that this is quite a lot of new code, but again, I don't know how to judge complexity wrt kubernetes
|
@Kubuxu Hey can you give the kustomize scripts here a once-over just to make sure i'm not doing anything out of band? I have these current changes working in the filozone/infra repo now (but still need to move off testcluster onto actual staging/prod clusters). Still, the changes here will likely remain unless you see any big reason we shouldn't do that. I'm gonna plan to merge EOD Tuesday unless you have any significant feedback on how to change the structure of these files. You can see how they're being used (currently) at https://github.com/FilOzone/infra/tree/main/testcluster/apps/dealbot and that is all deployed currently to http://dealbot.filoz.org. |
|
we can see that the "push to prod" PR is created after merging this: #121 |
Note: there are a lot of changes here, but there is a lot of documentation in /docs as well. check those out first to get a firm grasp of what's going on here.
This pull request introduces a comprehensive local Kubernetes development workflow using Kind and Helm, adds robust CI/CD pipelines for Docker image builds and releases (including hotfixes), and establishes best practices for secret management and environment configuration. The changes streamline both local development and production release processes, ensuring consistency and security across environments.
Local development and Kubernetes workflow:
DEVELOPMENT.mdwith detailed instructions for setting up and managing a local Kind cluster, handling secrets, deploying with kind and managing persistent storage for PostgreSQL.Makefilewith targets for building images, loading them into Kind, deploying via Kustomize, managing secrets, and orchestrating combined workflows for backend and web services..env.examplefor local secret management, clarifying which secrets are required and how they are consumed in local dev.apps/postgres/Dockerfilebased onpostgres:16-alpinefor local database development.CI/CD and release automation:
.github/workflows/docker-build.ymlto build and push backend and web Docker images to ECR, with change detection for efficient builds..github/workflows/release-please.ymlto automate versioning and retagging of Docker images after successful builds, using Release Please and ECR manifests..github/workflows/hotfix-release.ymlto support hotfix releases fromhotfix/**branches, immediately building and pushing hotfi images upon release creation..release-please-manifest.jsonto track and version backend and web applications.Production Deployment Note (Important):
FilOzone/infra, the application config requires individual environment variables:DATABASE_HOST,DATABASE_USER,DATABASE_PASSWORD,DATABASE_NAME, andDATABASE_PORT. Ensure these are set in the production Secrets/ConfigMaps.