pingcap / pingcap/tidb-operator
expose tikv metrics port in tikv peer service
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1.3k
- Forks
- 540
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 18
Description
Feature Request
Is your feature request related to a problem? Please describe:
I'm exposing metrics to an existent prometheus-like scraping. I'm using VictoriaMetrics Operator with VMScrapeConfig CRs for that (similar to Prometheus Operator ServiceMonitor CRs). I'm using the *-peer services created as a result of TidbCluster CR since they are headless and so the VMScrapeConfig actually scrapes the underlying pods individually and doesn't load-balance scrape requests in case normal ClusterIP Services were used.
All -peer services created for pd, tidb and tiflash include ports where /metrics HTTP endpoints reside. Except the tikv-peer service. It is also not possible to add additionalPorts or similar to current TidbCluster CR to achieve that.
Describe the feature you'd like:
I would like that the metrics port of tikv peer service (20180) be exposed by default or at least through the additionalPorts in the TidbCluster CR.
Describe alternatives you've considered:
Currently I'm manually deploying an additional Service with metrics port (20180). But I'd like this to be part of TidbCluster deployment like with other services (pd, tidb, tiflash).
I'm using TiDB Operator 1.6.0 with TiDB 8.1.1
Regards, Peter
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the TidbCluster-generated peer Service definitions, comparing the existing PD, TiDB, and TiFlash peer services with the TiKV peer service. Trace how service ports or additionalPorts are configured, then verify that port 20180 is exposed for TiKV peer services and that the resulting service supports per-pod metrics scraping.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 66/100