feat: new-service and delete-service scaffolder

One command from nothing to a running service: generate repo from template,
Actions secrets, namespace + unleash token, gitops render, kick CI, register
with ArgoCD once the first image exists, optional --wait health check.
delete-service reverses all of it. Idempotent, --dry-run supported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nholtware 2026-11-05 12:03:55 -06:00
commit 253b6033c3
7 changed files with 809 additions and 0 deletions

16
platform.env.example Normal file
View file

@ -0,0 +1,16 @@
# Copy to platform.env (gitignored) and adjust. Sourced by bin/* as bash.
# Every file below must exist or the scripts refuse to run.
HOMELAB_SECRETS=$HOME/Code/github.com/nholtware/homelab/.secrets
FORGEJO_URL=http://192.168.1.230:3000
FORGEJO_OWNER=nholtware
FORGEJO_ADMIN_TOKEN_FILE=$HOMELAB_SECRETS/forgejo-admin-token # repo create/delete, Actions secrets, git push
REGISTRY_PUSH_TOKEN_FILE=$HOMELAB_SECRETS/registry-push-token # becomes REGISTRY_TOKEN; also lists/deletes packages
GITOPS_TOKEN_FILE=$HOMELAB_SECRETS/ci-bot-gitops-token # becomes GITOPS_TOKEN (ci-bot)
GITOPS_DIR=$HOME/Code/forgejo.local/nholtware/gitops # clean clone of nholtware/gitops on main
CODE_DIR=$HOME/Code/forgejo.local/nholtware # new service repos are cloned here
KUBECONFIG=$HOME/.kube/homelab.yaml
INGRESS_DOMAIN=192.168.1.83.nip.io # services at <name>.$INGRESS_DOMAIN
INGRESS_IP=192.168.1.83 # health checks use curl --resolve, no DNS needed