# Non-secret runtime configuration consumed by the app and backup containers.
# Committed to git; safe to reconcile via Flux.
#
# The vibecarbon-app-secrets and vibecarbon-infra-secrets Secrets are
# created at deploy time — either by the vibecarbon CLI (imperative
# deploy) or by the GitHub Actions deploy workflow
# (.github/workflows/deploy.yml, GitOps deploy). Those Secrets are NOT
# reconciled by Flux — it's owned by field-manager=github-actions-deploy
# (workflow) or field-manager=kubectl-client-side-apply (CLI), and Flux
# leaves it alone. This lets us rotate secrets via `gh secret set --env
# prod KEY=value` without a git commit.
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: vibecarbon-config
data:
  # Site Configuration — SITE_URL is patched in by deploy code once the
  # real domain is known (before-domain-known default is the placeholder
  # below; deploy patches to https://<domain> via kubectlPatch).
  SITE_URL: "https://app.example.com"
  PROJECT_NAME: "vibecarbon"

  # Database: the `db` Service in front of the db StatefulSet
  # (k8s/base/db/service.yaml), the same host name compose uses. Consumed by
  # app/deployment.yaml.
  DB_HOST: "db"
  DB_PORT: "5432"
  DB_NAME: "postgres"
