You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(scan): reach auto-detected Prometheus/OpenCost via the API server proxy
scan runs on the user's machine, but auto-detection returned an in-cluster
Service DNS name (*.svc) that only resolves inside the cluster. Every query
failed with "no such host" and the scan silently reported a misleading
100/100 $0 (zero usage mistaken for zero waste) — hit on a real cluster.
- Reach an auto-detected Prometheus/OpenCost through the Kubernetes API server
proxy (/api/v1/namespaces/<ns>/services/<svc>:<port>/proxy), reusing the
kubeconfig's API server address + credentials. Works wherever kubectl works,
no port-forward.
- Validate reachability (a trivial `up` query / live allocation fetch) before
committing to Tier 1 / Tier 2; an unreachable endpoint falls back to the
operator / metrics-server / derived pricing with a clear note.
- Expose kube.Clients.RESTConfig; add DetectPrometheusEndpoint /
DetectOpenCostEndpoint (+ struct), NewPrometheusProviderViaAPIProxy,
NewOpenCostProviderViaAPIProxy, and usage.Reachable. Auto-detect now sits
behind provider seams (prometheusAutoProvider / openCostAutoProvider).
- An explicit --prometheus-url / --opencost-url is still used directly.
0 commit comments