Single entrypoint for the full stack:
- two clusters (
vaultandplatform) - Envoy Gateway + CloudNativePG + ZITADEL
- Argo CD (in-cluster, app GitOps)
- Terraform-provisioned ZITADEL project/OIDC app
- Next.js app deployed in Kubernetes
Environment model:
- use a single
ENVvalue (local,dev,staging,prod, ...) - each environment is configured in
environments/<env>/ localis the fast-iteration profile and deploysreference-webdirectly from this repo (no GitOps repo dependency)- non-local environments deploy app workloads through Argo CD from a Git repository
kindkubectlhelmfileterraformdockerjqopenssl
cd /Users/martin.zokov/playground/mass-claw/platform-boilerplate
make ROOT="/Users/martin.zokov/playground/mass-claw/platform-boilerplate" ENV=local upOther examples:
make ENV=dev gitops-up
make ENV=staging gitops-up
make ENV=prod gitops-upThis runs two stages:
make clusters-up(cluster lifecycle)make apps-up(runtime/apps lifecycle)
If you still have a legacy single-cluster setup running, delete it first to free ports 80/443:
kind delete cluster --name kindAccess:
- App:
http://app.localhost - Dev App: Argo app deploys to
devnamespace (not routed on host by default) - ZITADEL:
http://auth.localhost - Mock API (JWT protected):
http://api.localhost - Headlamp (cluster UI):
http://headlamp.localhost
make up
make statusOpen http://app.localhost and log in via ZITADEL.
The stack ships a mock backend protected by Envoy Gateway JWT validation:
# no token -> 401
curl -i -H 'Host: api.localhost' http://127.0.0.1/
# valid token -> 200
curl -i -H 'Host: api.localhost' -H "Authorization: Bearer <access-token>" http://127.0.0.1/"account 'admin' does not have apiKey capability" – Argo CD needs accounts.admin: apiKey, login in argocd-cm. If Helm values don't apply, patch directly:
kubectl --context kind-platform -n argocd patch cm argocd-cm --type merge -p '{"data":{"accounts.admin":"apiKey, login"}}'
kubectl --context kind-platform -n argocd rollout restart deployment argocd-server"connection refused" on login – Ensure port-forward is running, or use argocd login --port-forward. With server.insecure: true, add --plaintext to the login command.
make status
make ENV=dev doctor
make ENV=dev deploy
make ENV=dev destroy
make ENV=dev validate-env
make ENV=dev DOMAIN=example.com LE_EMAIL=you@example.com VAULT_KUBE_CONTEXT=<ctx> PLATFORM_KUBE_CONTEXT=<ctx> deploy
make clusters-up
make apps-up
make apps-up-local
make apps-down
make gitops-up
make gitops-up-local
make gitops-down
make clusters-down
make downArgo CD runs in the platform cluster (argocd namespace) and manages app deployments from this repository.
Before first make apps-up, set your repo URL in environments/<env>/argocd-bootstrap.values.yaml:
git:
repoURL: https://github.com/<org>/<repo>.gitCurrent bootstrap manages one reference-web environment per cluster for non-local environments. The selected environment is set by ENV and loaded from environments/<env>/argocd-bootstrap.values.yaml.
For local bootstrap overrides, edit environments/local/argocd-bootstrap.values.yaml and run make gitops-up-local.
For a full local dual-run flow (Argo in-cluster app + host pnpm dev), see docs/local-dual-run.md.
Available overlay presets:
runtime-gitops/apps/reference-web/dev/values.yamlruntime-gitops/apps/reference-web/prod/values.yaml
If you later run separate dev/prod clusters, use the same repo and set each cluster ENV plus matching environments/<env>/argocd-bootstrap.values.yaml. Promotion then becomes a PR from dev image tag to prod image tag.
For CI/CD deployment into non-local clusters, see docs/cicd-live-environments.md.
For the selected GitOps architecture (per-cluster Argo + bootstrap then pull-based reconcile), see docs/gitops-option1-3-monorepo.md.
For Oracle Kubernetes Engine setup steps, see docs/oke-live-setup.md.
For internet-facing OKE dev deployment with TLS and DNS, see docs/oke-dev-internet-deploy.md.
For the customer-operated MVP deployment flow, see docs/customer-deploy.md.
To run against non-kind clusters, set contexts and a platform secrets override file:
CLUSTER_MODE=external \
VAULT_KUBE_CONTEXT=<vault-context> \
PLATFORM_KUBE_CONTEXT=<platform-context> \
PLATFORM_SECRETS_VALUES_FILE=/path/to/platform-secrets-values.yaml \
make apps-up# no token -> 401
curl -i -H 'Host: api.localhost' http://127.0.0.1/
# valid token -> 200
curl -i -H 'Host: api.localhost' -H "Authorization: Bearer <access-token>" http://127.0.0.1/To add a new backend behind Envoy Gateway:
- Deploy your
Deployment+Service. - Add an
HTTPRoutethat attaches toGateway/platform-gateway. - Add a
SecurityPolicythat targets theHTTPRouteand enables JWT validation (same pattern as the mock API). - Create an Argo CD
Applicationfor the folder that contains those manifests.
runtime-vault/Vault runtime and external NodePort exposure chartruntime-platform/platform runtime (External Secrets, CNPG, ZITADEL, Envoy, app)runtime-gitops/Argo CD values/bootstrap and environment overlaysruntime-core/kind/kind cluster configs forvaultandplatformruntime-core/platform-secrets/External Secrets bindings for Vault-backed Kubernetes secretsreference-web/reference web client template (Next.js app + Terraform OIDC provisioning)model-b/isolated roadmap/spec scaffolding for future Auth-BFF profile
Planned Auth-BFF (broker) profile spec and layout:
model-b/docs/spec.mdmodel-b/docs/when-to-use.mdmodel-b/docs/repo-layout.md