Low-priority cleanups found while wiring Prometheus scraping for temporal-benchmarks. None block usage (metrics on :9090 work by default), but they surprise users who customize metrics:
-
spec.metrics.port ignored by the Service. buildMetrics() uses the configured port in listenAddress, but BuildHeadlessService/containerPorts hardcode metricsPort = 9090. Setting spec.metrics.port to a non-default value makes Temporal listen on the new port while the Service still exposes 9090, breaking ServiceMonitor scraping.
-
spec.metrics.serviceMonitor.interval ignored. BuildServiceMonitor hardcodes interval: 30s and never reads the CRD field.
-
status.endpoints.metrics never populated. The field is declared on EndpointsStatus but the reconciler never writes it.
Suggested fixes: thread cluster.Spec.Metrics.Port into the container/Service ports; use cluster.Spec.Metrics.ServiceMonitor.Interval (fallback 30s) in BuildServiceMonitor; populate status.endpoints.metrics during monitoring reconciliation.
Low-priority cleanups found while wiring Prometheus scraping for temporal-benchmarks. None block usage (metrics on
:9090work by default), but they surprise users who customize metrics:spec.metrics.portignored by the Service.buildMetrics()uses the configured port inlistenAddress, butBuildHeadlessService/containerPortshardcodemetricsPort = 9090. Settingspec.metrics.portto a non-default value makes Temporal listen on the new port while the Service still exposes 9090, breaking ServiceMonitor scraping.spec.metrics.serviceMonitor.intervalignored.BuildServiceMonitorhardcodesinterval: 30sand never reads the CRD field.status.endpoints.metricsnever populated. The field is declared onEndpointsStatusbut the reconciler never writes it.Suggested fixes: thread
cluster.Spec.Metrics.Portinto the container/Service ports; usecluster.Spec.Metrics.ServiceMonitor.Interval(fallback 30s) inBuildServiceMonitor; populatestatus.endpoints.metricsduring monitoring reconciliation.