vps cluster docs

Runbook: rotate a secret

Every Secret manifest under k8s/ is SOPS-encrypted. The vcap-v1 workloads were retired on 2026-10-27. The v2 workloads were retired on 2026-10-23. Their namespaces, Secrets, PVCs, and PVs remain for data recovery.

Encryption does not remove old values from git history. Rotation is what makes a leaked value dead. See ../secrets.md.

Golden rule

Deploy and verify the new credential before you revoke the old one. Most API tokens allow two valid values. Use that window. A database password does not allow two values for one role. Accept a short, planned cutover for that case.

Rotate one credential at a time. Do not add an unrelated change. A failure must have one cause.

Procedure

# 1. Edit the encrypted file in place.
sops k8s/apps/mochi/secrets.sops.yaml

# 2. Render the Secret before you commit.
kustomize build --enable-alpha-plugins --enable-exec k8s/apps/mochi

# 3. Commit and push. ArgoCD reconciles in about three minutes.
git commit -am "rotate <credential> for <app>" && git push origin main

# 4. Restart workloads that read the value at start.
kubectl -n <namespace> rollout restart deploy/<name>

# 5. Verify the new value. Then revoke the old value at the source.

Hetzner API token

Cloudflare Origin CA certificate

GitHub credentials

Secret In git Used by
git-creds k8s/platform/argocd/secret/secrets.sops.yaml ArgoCD access to this repository
creds-github-upayanmazumder same file GitHub account credential for github.com/upayanmazumder/
repo-vcap-backend same file ArgoCD access to vitscopesoftwareteam/VCAP-STAGING-BACKEND
repo-vcap-frontend same file ArgoCD access to vitscopesoftwareteam/VCAP-STAGING-FRONTEND
git-creds-updater k8s/platform/argocd-image-updater/secrets.sops.yaml image-updater git write-back over SSH
ghcr-creds same file image-updater registry access to GHCR
vcap-v1/pull-secret retained, no workload none (retired 2026-10-27)
repo-creds-devlabs k8s/platform/argocd/secret/repo-devlabs-secrets.sops.yaml ArgoCD URL-prefix credential for upayanmazumder-DevLabs
git-creds-noodle live only retained
git-creds-rankstack live only retained

argocd-repo-vps does not exist. Do not add it.

The two repo-vcap-* credentials target the unused v2 staging repositories. The vcap-v1 Applications and AppProject were removed on 2026-10-27. repo-creds-devlabs is the ArgoCD URL-prefix credential for the private upayanmazumder-DevLabs repositories.

Do not compare token fingerprints to gh auth token. That command returns a different string on each call. Test the credential against the service.

Database passwords

No database workload runs. The retained datasets have Secrets but no workload. Keep these Secrets for recovery:

Do not rotate a retained Secret unless you restore the dataset. Do not start a workload to rotate it.

The vcap-v1 Postgres edge on TCP 15434 is removed. No v1 password procedure exists. See restore-postgres.md to read the retained v1 data.

Discord credentials

upayan-v5 was retired. It no longer holds a Discord credential.

Grafana credentials

After rotation

Confirm the old value fails and the new value works. Then remove the old value at the provider. Do not leave two valid values unless the provider needs a grace period.

History rewrite

The git history still contains old plaintext values. A history rewrite does not make them safe. It only makes them harder to find. Rotate first.

Only with owner confirmation:

  1. Run git filter-repo to remove plaintext secret paths and values from history.
  2. Scan the full history:
    gitleaks git . --redact --report-format json --report-path /tmp/history.json
    

    The 2026-09-28 baseline was 177 findings across 35 commits. Treat that number as historical. The rewrite is done only when the count is zero or every remainder is a documented false positive.

  3. Push with git push --force only after the owner confirms.