simpleplayer-svc: turn on METRICS_PORT and scrape it (#452) #272

Merged
sophie merged 1 commit from pixel/452-simpleplayer-svc-turn-on-metrics-port into main 2026-11-30 22:52:20 +11:00
Collaborator

Pixel task #452. Turns on the metrics listener that simpleplayer-svc got in sophie/simpleplayer-svc#16 and lets vmagent find it. Same change as pull request 247 made for assetstransporter-svc.

In argo/scout/simpleplayer-svc/deployment.yaml:

  • env METRICS_PORT = 9464
  • a containerPort 9464 named metrics. It is not in the Service and has no route: only vmagent, on the pod IP, reaches it.
  • pod annotations prometheus.io/scrape: "true", prometheus.io/port: "9464", prometheus.io/path: /metrics
  • the image digest: sha256:9b7a3ca9… → sha256:ca9da414…. The old digest is the registry's sha-0346fd6, from before the metrics code; the new one is what the registry gives for both main and sha-0e86050, the merge commit of that pull request. This is the same bump as Renovate's pull request 259, which this one makes unnecessary.

docs/monitoring.md, "Scraped services": the scout row now says 9464 and kubernetes-pods, and the row in "Apps' built-in metrics" says what is scraped (main, 0e86050, known metric simpleplayer_devices_registered).

Restart on merge

The Deployment is Recreate with one replica, so art.m.ac.nz is down for some seconds while the pod is replaced, and it starts a new image (three commits newer: the metrics listener and its documentation). The Macs reconnect by themselves.

Checked before the merge

  • Both digests read at the registry (main, sha-0e86050, sha-0346fd6).
  • The namespace's manifests have no NetworkPolicy, so vmagent can reach the pod on 9464.
  • Not checked: kubectl apply --dry-run=server on scout. The cluster's API did not answer from the machine this ran on (dial tcp 100.81.136.42:443: i/o timeout). The manifest parses, and the added fields are the same ones, in the same places, as in assetstransporter-svc's deployed manifest.

To check after the merge

  • The target is up under job="kubernetes-pods", namespace simpleplayer-svc.
  • simpleplayer_devices_registered has a value.
  • /metrics on the public hostname is a 404, not the SPA page and not metrics; the site answers.

🤖 Generated with Claude Code

Pixel task #452. Turns on the metrics listener that simpleplayer-svc got in https://code.m.ac.nz/sophie/simpleplayer-svc/pulls/16 and lets vmagent find it. Same change as pull request 247 made for assetstransporter-svc. In `argo/scout/simpleplayer-svc/deployment.yaml`: - env `METRICS_PORT` = `9464` - a `containerPort` 9464 named `metrics`. It is not in the Service and has no route: only vmagent, on the pod IP, reaches it. - pod annotations `prometheus.io/scrape: "true"`, `prometheus.io/port: "9464"`, `prometheus.io/path: /metrics` - the image digest: `sha256:9b7a3ca9…` → `sha256:ca9da414…`. The old digest is the registry's `sha-0346fd6`, from before the metrics code; the new one is what the registry gives for both `main` and `sha-0e86050`, the merge commit of that pull request. This is the same bump as Renovate's pull request 259, which this one makes unnecessary. `docs/monitoring.md`, "Scraped services": the scout row now says 9464 and `kubernetes-pods`, and the row in "Apps' built-in metrics" says what is scraped (`main, 0e86050`, known metric `simpleplayer_devices_registered`). ## Restart on merge The Deployment is `Recreate` with one replica, so `art.m.ac.nz` is down for some seconds while the pod is replaced, and it starts a new image (three commits newer: the metrics listener and its documentation). The Macs reconnect by themselves. ## Checked before the merge - Both digests read at the registry (`main`, `sha-0e86050`, `sha-0346fd6`). - The namespace's manifests have no NetworkPolicy, so vmagent can reach the pod on 9464. - **Not checked:** `kubectl apply --dry-run=server` on scout. The cluster's API did not answer from the machine this ran on (`dial tcp 100.81.136.42:443: i/o timeout`). The manifest parses, and the added fields are the same ones, in the same places, as in assetstransporter-svc's deployed manifest. ## To check after the merge - The target is up under `job="kubernetes-pods"`, namespace `simpleplayer-svc`. - `simpleplayer_devices_registered` has a value. - `/metrics` on the public hostname is a 404, not the SPA page and not metrics; the site answers. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The pinned image was sha-0346fd6, from before the metrics listener: set the
digest of main (sha-0e86050), or METRICS_PORT would be ignored and the target
down. Pod port 9464 is in no Service and not routed; vmagent finds it by the
pod annotations (job kubernetes-pods).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
pixel-board left a comment

Nothing must change. I checked:

  • Image: the registry gives sha256:ca9da414… for both main and sha-0e86050, and the old 9b7a3ca9… for sha-0346fd6. 0e86050 is the merge of simpleplayer-svc PR 16, the metrics code, and the latest commit on its main. So the pinned image reads METRICS_PORT.
  • Deployment: METRICS_PORT is 9464. It differs from PORT (8080) and is a valid port by the app's README at 0e86050. The metrics containerPort is on the pod only: service.yaml is unchanged and still exposes only http. The three prometheus.io/* annotations are on the pod template, not the Deployment's metadata. Probes still use http. The added fields match assetstransporter-svc's manifest line for line.
  • Docs: both rows in docs/monitoring.md (2216, 2459) match assetstransporter-svc's rows. No other place in the repository lists simpleplayer-svc as basic-only.

Not checked: the server-side dry run and the checks after the merge (the target is up, simpleplayer_devices_registered has a value, the public /metrics returns a 404). These stay with the author, as their PR says. Renovate's PR 259 makes the same digest bump and can be closed once this is merged.

Review by pixel: task #473, round 1 of 3, commit 9323681487.

Nothing must change. I checked: - **Image**: the registry gives `sha256:ca9da414…` for both `main` and `sha-0e86050`, and the old `9b7a3ca9…` for `sha-0346fd6`. `0e86050` is the merge of simpleplayer-svc PR 16, the metrics code, and the latest commit on its `main`. So the pinned image reads `METRICS_PORT`. - **Deployment**: `METRICS_PORT` is `9464`. It differs from `PORT` (8080) and is a valid port by the app's README at `0e86050`. The `metrics` containerPort is on the pod only: `service.yaml` is unchanged and still exposes only `http`. The three `prometheus.io/*` annotations are on the pod template, not the Deployment's metadata. Probes still use `http`. The added fields match assetstransporter-svc's manifest line for line. - **Docs**: both rows in `docs/monitoring.md` (2216, 2459) match assetstransporter-svc's rows. No other place in the repository lists simpleplayer-svc as basic-only. **Not checked**: the server-side dry run and the checks after the merge (the target is up, `simpleplayer_devices_registered` has a value, the public `/metrics` returns a 404). These stay with the author, as their PR says. Renovate's PR 259 makes the same digest bump and can be closed once this is merged. Review by pixel: task #473, round 1 of 3, commit 93236814872bab7507f6c54a0209d660510791fb.
sophie merged commit dc52af39a1 into main 2026-11-30 22:52:20 +11:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sophie/homelab!272
No description provided.