From cf7d143e438a82cb2da6f6f2f1604373b2434bde Mon Sep 17 00:00:00 2001 From: Edward Angert Date: Thu, 13 Mar 2025 21:09:26 -0500 Subject: [PATCH] docs: use consistent examples in prometheus doc and add namespaceSelector spec (#16918) closes: #15385 - use consistent `prom-http` port (@johnstcn looks like this was changed/added in #12214 - do we prefer `prom-http` over `prometheus-http` or is it more important that they align?) - add `namespaceSelector:` per @francisco-mata (thanks! - sorry it took so long to get this in) from issue: > For some reason our target was not appearing on our prometheus targets, we had to add a namespaceSelector key on the Service Monitor to successfully appear Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com> --- docs/admin/integrations/prometheus.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/admin/integrations/prometheus.md b/docs/admin/integrations/prometheus.md index 0d6054bbf3..ac88c8c5be 100644 --- a/docs/admin/integrations/prometheus.md +++ b/docs/admin/integrations/prometheus.md @@ -84,9 +84,12 @@ metadata: namespace: coder spec: endpoints: - - port: prometheus-http + - port: prom-http interval: 10s scrapeTimeout: 10s + namespaceSelector: + matchNames: + - coder selector: matchLabels: app.kubernetes.io/name: coder