Skip to content

feat(metrics): expose kine metrics via /metrics/kine#3910

Open
pascalbreuninger wants to merge 1 commit intomainfrom
issue/engcp-400
Open

feat(metrics): expose kine metrics via /metrics/kine#3910
pascalbreuninger wants to merge 1 commit intomainfrom
issue/engcp-400

Conversation

@pascalbreuninger
Copy link
Copy Markdown
Member

@pascalbreuninger pascalbreuninger commented Apr 30, 2026

Summary

  • Bind kine's metrics listener to 127.0.0.1:2381 instead of 0 (disabled), so kine's Prometheus metrics are reachable inside the pod.
  • Proxy them through the control plane on /metrics/kine, gated to non-etcd backing stores (embedded sqlite, embedded database, external database).
  • Add a ServiceMonitor endpoint scraping /metrics/kine for non-etcd deployments, with corresponding chart unit tests.
  • Disable the listener in the snapshot restore path to avoid a port conflict with the running kine.

Closes ENGCP-400

Test plan

  • go build ./... in vcluster
  • go test ./pkg/server/... ./pkg/k8s/... ./pkg/snapshot/...
  • helm unittest against chart/tests/service-monitor_test.yaml (default sqlite, virtual scheduler, embedded etcd, deployed etcd, external etcd, external database)
  • In-cluster verification: curl -k https://:/metrics/kine returns Prometheus metrics; ServiceMonitor scrape succeeds in Prometheus

🤖 Generated with Claude Code

@pascalbreuninger pascalbreuninger requested review from a team as code owners April 30, 2026 11:24
@pascalbreuninger
Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Bind kine's metrics listener to 127.0.0.1:2381 and proxy it through the
control plane on /metrics/kine when a database backing store is in use.
Add a ServiceMonitor endpoint to scrape it. Snapshot restore explicitly
disables the listener to avoid a port conflict with the running kine.

Closes ENGCP-400

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

E2E Ginkgo Tests

Status Commit Run
Passed 24497f878fc4460f5b55935be64d419cd18c839e View run #25163105081

Comment thread chart/templates/service-monitor.yaml
Comment thread pkg/server/filters/k8s_metrics.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants