pingcap / pingcap/tidb-operator
TidbInitializer support specifying tidb endpoint
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1.3k
- Forks
- 540
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 18
Description
Feature Request
For a cluster enabling SEM (Security Enhanced Mode), the tidb-server have limited permission, if we want to do some initialization that beyond SEM tidb-servers permissions, we have two choices:
- Disable SEM first and then run initialization SQL statement and then restart tidb to enable SEM
- Run TidbInitializer via a SEM disabled tidb-server, after that shut down SEM disabled tidb-server
The first one need to rolling restart all tidb-servers which might take a long time. While with the second one, TidbInitializer currently only support finding tidb-server endpoint via TidbCluster, so it's impossible to do the initialization via TidbInitializer.
So I'd like to allow user specifying a tidb endpoint for TidbInitializer.
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 by locating TidbInitializer and its current TidbCluster-based endpoint discovery in the tidb-operator repository. Trace how initialization SQL connects to TiDB, then define done as allowing a user-specified endpoint while retaining the existing discovery behavior when none is provided; add or update tests for both paths if the relevant test location is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- databases, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100