From 6b633d5dff39d128b43183149af012a7b710ca99 Mon Sep 17 00:00:00 2001 From: tdakkota Date: Mon, 17 Aug 2026 23:20:14 +0300 Subject: [PATCH] fix(controller): move self-metrics port off oteldb's admin API bind portSelfMetric was 8090, which is oteldb's admin API bind (admin.bind defaults to :8090 and the operator never overrides it), so the Service port named metrics routed to the admin API and UI. Fixes #12 --- README.md | 4 +++- internal/controller/naming.go | 20 +++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d24a1f4..cdee7a0 100644 --- a/README.md +++ b/README.md @@ -135,9 +135,11 @@ config file. ## Ports Client APIs (exposed by the client Service): `4317` OTLP gRPC, `4318` OTLP HTTP, `19291` Prometheus -remote-write, `9090` PromQL, `3200` TraceQL (Tempo), `3100` LogQL (Loki), `4040` Pyroscope, `8090` +remote-write, `9090` PromQL, `3200` TraceQL (Tempo), `3100` LogQL (Loki), `4040` Pyroscope, `9464` self-metrics, `13133` health. Peer replication: `7946` (headless Service). +`8090` is deliberately not exposed: it is oteldb's admin API bind, not a self-metrics endpoint. + ## Getting Started Prerequisites: Go 1.26+, a Kubernetes cluster, `kubectl`, and (for building the image) Docker. diff --git a/internal/controller/naming.go b/internal/controller/naming.go index 2005630..28ecf5c 100644 --- a/internal/controller/naming.go +++ b/internal/controller/naming.go @@ -51,15 +51,17 @@ const ( // Container ports exposed by every oteldb node. Names must be <= 15 chars (k8s port-name limit). const ( - portOTLPGRPC = 4317 - portOTLPHTTP = 4318 - portPromRW = 19291 - portPromHTTP = 9090 - portTempoHTTP = 3200 - portLokiHTTP = 3100 - portPyroscope = 4040 - portHealth = 13133 - portSelfMetric = 8090 + portOTLPGRPC = 4317 + portOTLPHTTP = 4318 + portPromRW = 19291 + portPromHTTP = 9090 + portTempoHTTP = 3200 + portLokiHTTP = 3100 + portPyroscope = 4040 + portHealth = 13133 + // portSelfMetric is the OpenTelemetry default Prometheus exporter port. It must not be 8090: + // that is oteldb's own admin API bind (admin.bind defaults to :8090). + portSelfMetric = 9464 // portPeer is the default; the effective value comes from spec.cluster.peerPort. portPeer = 7946 )