Skip to content

ci(metrics): deploy metrics-collector single-replica to staging/prod#1438

Closed
chong-techops wants to merge 1 commit into
stagingfrom
feature/TECH-6484-collector-deploy
Closed

ci(metrics): deploy metrics-collector single-replica to staging/prod#1438
chong-techops wants to merge 1 commit into
stagingfrom
feature/TECH-6484-collector-deploy

Conversation

@chong-techops
Copy link
Copy Markdown

What

Deploys keeperhub-metrics-collector single-replica to staging/prod (the deploy half of TECH-6484).

  • deploy/metrics-collector/{staging,prod}/values.yamlreplicaCount: 1, serves /metrics on :9090, a ServiceMonitor that scrapes the DB gauges from this one pod (deterministic, no hashmod). Minimal env: only DATABASE_URL.
  • .github/workflows/deploy-metrics-collector.yaml — standalone (events-style) trigger on staging/prod + dispatch; bakes the metrics-collector target and helm-deploys via the shared techops-services/common chart (release keeperhub-metrics-collector, namespace keeperhub).

Do not merge yet — ordered dependencies

  1. Depends on feat(metrics): add keeperhub-metrics-collector service + image #1437 (the service + image target).
  2. Depends on the keeperhub-metrics-collector-{staging,prod} ECR repo existing — terraform is drafted in techops_infrastructure; the TFC workspace must be created + applied first. Otherwise the post-merge deploy run fails on a missing repo (and re-fails on later staging pushes touching the broad trigger paths).

No cutover

The app's db-metrics ServiceMonitor and /api/metrics/db route stay in place. Cutover (remove the app monitor + env-gate the route to 404) is a later step, after the collector is verified scraping in staging.

…(TECH-6484 B)

deploy/metrics-collector/{staging,prod}/values.yaml (replicaCount 1, serves
/metrics on :9090, ServiceMonitor scrapes the DB gauges from this one pod --
deterministic, no hashmod; minimal env, only DATABASE_URL) and a standalone
deploy-metrics-collector workflow (bake target + helm-deploy via the shared
techops-services/common chart, release keeperhub-metrics-collector).

Depends on TECH-6484 A (the service + image target) and on the
keeperhub-metrics-collector ECR repo existing (terraform in
techops_infrastructure). Merge only after A lands and the ECR repo is applied,
else the post-merge deploy run fails on a missing repo. Does NOT cut over: the
app's db-metrics ServiceMonitor and /api/metrics/db route stay until the
collector is verified in staging.
@chong-techops
Copy link
Copy Markdown
Author

Consolidated into #1439 (service + image + deploy in one PR). Closing in favor of #1439.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

🧹 PR Environment Cleaned Up

The PR environment has been successfully deleted.

Deleted Resources:

  • Namespace: pr-1438
  • All Helm releases (Keeperhub, Scheduler, Event services)
  • PostgreSQL Database (including data)
  • LocalStack, Redis
  • All associated secrets and configs

All resources have been cleaned up and will no longer incur costs.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

ℹ️ No PR Environment to Clean Up

No PR environment was found for this PR. This is expected if:

  • The PR never had the deploy-pr-environment label
  • The environment was already cleaned up
  • The deployment never completed successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant