GCP cost cuts (Oter + Negodex)
Runbook for waste cuts applied May 2026. Stay on GCP; no platform migration.
Billing narrative (baseline, savings, forecast): gcp-billing.md.
Baseline (Apr 7–30, ~23 days)
| SKU | COP | ~USD/mo |
|---|---|---|
| Cloud SQL | 144,875 | ~$46 |
| Cloud Logging | 131,398 | ~$42 |
| Cloud Run | 32,044 | ~$10 |
| Total | ~$100 |
Applied (2026-05-25)
Logging (target ~$0/mo — stay under 50 GiB free tier)
App (Oter):
logback.xml: defaultWARN;com.esteban.ruanoatWARN; Flyway/Postgres/Ktor atWARN..github/workflows/publish-server-release.yml:LOG_LEVEL=WARNin deploy env.- Live
oter:LOG_LEVEL=WARN(revision after 2026-05-25).
GCP (oter-490318 and negodex):
_Defaultbucket retention 1 day (was 30, then 7).- Sink exclusions on
_Default:- health/readiness URLs
severity=DEBUGseverity=INFOorNOTICE(global)resource.type="cloud_run_revision" AND severity<ERROR(only ERROR+ stored for Cloud Run)
Redeploy server after merging logback so the image matches. Temporary debug:
gcloud run services update oter --region=us-east1 --update-env-vars=LOG_LEVEL=INFO (raises volume/cost; revert to WARN after).
Negodex Nest still emits INFO to stdout unless you lower Nest log level in that repo; GCP exclusions above drop most of it before billing.
Oter API (~$2–4/mo)
- Workflow + live service:
--cpu=1 --memory=512Mi(was 2/1Gi). Keep--cpu-boost.
Negodex SQL consolidation (~$50–60/mo)
myecommercedb+ usernegodex_apionoter-db(oter-490318:us-east1:oter-db).- Data migrated from
negodex-pg(PG16) →oter-db(PG18); Nest API started cleanly. - Secrets
api-db-host,api-db-passwordupdated in projectnegodex. apiCloud Run:--set-cloudsql-instances=oter-490318:us-east1:oter-db.api-runtime@negodex.iam.gserviceaccount.com:roles/cloudsql.clientonoter-490318.- Deleted
negodex-pgin projectnegodex.
Artifact Registry
- Cleanup policy:
infra/gcp/artifact-registry-cleanup-policy.jsonon reposoterandweb(us-east1).
Windmill
- Never deployed on GCP; repo cleanup in commit
2971c094. See automation-options.md.
Deferred (48h after Negodex on shared SQL)
oter-dbtier: stilldb-custom-1-3840. Do not downsize until Oter + Negodex are stable on one instance for 48h.- Legacy DB
oter: still exists; drop only after confirming unused (backup first). - Backups on
oter-dbalready: 7 retained, transaction logs 7 days.
Verify billing (7–30 days)
- Billing → Reports → SKU, last 30 days, compare to April baseline.
- Expect:
- Cloud Logging down >90% (goal: within 50 GiB/mo free → ~$0).
- Cloud SQL down ~50% (one instance instead of two).
- Cloud Run modest drop from Oter resize.
- Smoke tests:
- Oter:
curl -fsS "$(gcloud run services describe oter --region=us-east1 --project=oter-490318 --format='value(status.url)')/health" - Negodex API: check Nest startup logs; no DB connection errors in project
negodex.
- Oter:
Rollback (Negodex SQL)
If needed before negodex-pg was deleted: restore from gcloud sql backups list --instance=negodex-pg (instance gone). Use oter-db backup pre-negodex-consolidation-20260525 and re-point secrets to a new instance if you must recreate.