Skip to content

feat: kustomize for local & prod k8s#106

Merged
SgtPooki merged 50 commits intomainfrom
feat/helm-charts
Jan 13, 2026
Merged

feat: kustomize for local & prod k8s#106
SgtPooki merged 50 commits intomainfrom
feat/helm-charts

Conversation

@SgtPooki
Copy link
Collaborator

@SgtPooki SgtPooki commented Dec 17, 2025

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:

  • Added DEVELOPMENT.md with detailed instructions for setting up and managing a local Kind cluster, handling secrets, deploying with kind and managing persistent storage for PostgreSQL.
  • Introduced a Makefile with targets for building images, loading them into Kind, deploying via Kustomize, managing secrets, and orchestrating combined workflows for backend and web services.
  • Added a sample .env.example for local secret management, clarifying which secrets are required and how they are consumed in local dev.
  • Added a minimal apps/postgres/Dockerfile based on postgres:16-alpine for local database development.

CI/CD and release automation:

  • Added .github/workflows/docker-build.yml to build and push backend and web Docker images to ECR, with change detection for efficient builds.
  • Added .github/workflows/release-please.yml to automate versioning and retagging of Docker images after successful builds, using Release Please and ECR manifests.
  • Added .github/workflows/hotfix-release.yml to support hotfix releases from hotfix/** branches, immediately building and pushing hotfi images upon release creation.
  • Added .release-please-manifest.json to track and version backend and web applications.

Production Deployment Note (Important):

  • Supabase Integration: For the production deployment in FilOzone/infra, the application config requires individual environment variables: DATABASE_HOST, DATABASE_USER, DATABASE_PASSWORD, DATABASE_NAME, and DATABASE_PORT. Ensure these are set in the production Secrets/ConfigMaps.

@vercel
Copy link

vercel bot commented Dec 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
dealbot-web Ready Ready Preview, Comment Jan 13, 2026 4:32pm

@FilOzzy FilOzzy added this to FOC Dec 17, 2025
@github-project-automation github-project-automation bot moved this to 📌 Triage in FOC Dec 17, 2025
@SgtPooki SgtPooki marked this pull request as ready for review December 17, 2025 13:30
Copilot AI review requested due to automatic review settings December 17, 2025 13:30
@SgtPooki
Copy link
Collaborator Author

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

@SgtPooki SgtPooki changed the title feat: helm charts and local k8s [WIP] feat: helm charts and local k8s Dec 17, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@SgtPooki SgtPooki marked this pull request as draft December 17, 2025 13:41
@rjan90 rjan90 moved this from 📌 Triage to ⌨️ In Progress in FOC Dec 17, 2025
@rjan90
Copy link
Contributor

rjan90 commented Dec 17, 2025

@BigLep and @rjan90 to review docs/infra.md

Co-authored-by: Steve Loeppky <biglep@protocol.ai>
@SgtPooki
Copy link
Collaborator Author

SgtPooki commented Jan 9, 2026

@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

@rjan90 rjan90 requested review from juliangruber and pyropy January 12, 2026 10:16
Copy link
Member

@juliangruber juliangruber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@SgtPooki
Copy link
Collaborator Author

@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.

@SgtPooki SgtPooki merged commit 36ef133 into main Jan 13, 2026
5 checks passed
@github-project-automation github-project-automation bot moved this from 🔎 Awaiting review to 🎉 Done in FOC Jan 13, 2026
@SgtPooki SgtPooki deleted the feat/helm-charts branch January 13, 2026 16:36
@SgtPooki
Copy link
Collaborator Author

we can see that the "push to prod" PR is created after merging this: #121

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

[Op Readiness: P0]: publish frontend and backend docker images to github container registry

6 participants