infra/home/cluster/tmobile-exporter/src/Dockerfile
Graham McIntire f2d6dbd271
tmobile-exporter: vendor minimal Go exporter that handles G4AR quirks
Replaces tpaulus/tmobile-internet-exporter upstream image, which crashes
on every scrape against the G4AR because the gateway returns `bars` as a
JSON float (`4.0`) and the upstream struct types it as int.

The vendored exporter:
- decodes all radio numerics as float64 so `4.0` round-trips
- treats the 4g / 5g signal blocks as optional (the G4AR omits 4g)
- evicts stale (type, band) series when a band disappears between scrapes
- adds a scrape_errors_total counter and /healthz endpoint

Deployment now pulls git.mcintire.me/graham/tmobile-exporter:v1 via the
forgejo-registry imagePullSecret (matching the convention used by aprs,
prop, towerops). Build + push the image before Argo can pull it; the
imagePullSecret must also be copied into the monitoring namespace.
2026-05-10 17:42:25 -05:00

12 lines
350 B
Docker

FROM golang:1.23-alpine AS build
WORKDIR /src
COPY go.mod ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/tmobile-exporter .
FROM gcr.io/distroless/static-debian12:nonroot
COPY --from=build /out/tmobile-exporter /tmobile-exporter
USER 65532:65532
EXPOSE 9099
ENTRYPOINT ["/tmobile-exporter"]