pingcap / pingcap/tidb-operator

Usability improvement on manipulating pd-ctl manually

Open
#4,757 0 comments 0 reactions 0 assignees View on GitHub

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:

Currently, if we want to do certain operations using pd-ctl, typically we need to log into a pd pod, figure out the certificates and host information, and then file the command. There're two problems with this approach:

  1. It could be hard to automate
  2. It could be difficult or impossible in some restricted environment where users are not given permissions to exec in pods

Describe the feature you'd like:

It could be helpful if we have some resources to automate the PD operations, maybe something similar to TidbInitializer, which helps us on automating the TiDB initialization by running SQL statements for us. By exposing a CRD for PD operations, it would be helpful for unifying the privilege management to k8s's RBAC, and it would be easier to perform certain automations or gitops operations.

Describe alternatives you've considered:

The alternative is just logging into PD pods and manually run commands using pd-ctl. We need to figure out all the connection info (certs, keys, hostnames, etc) on our own and it's could be hard to automate.

Teachability, Documentation, Adoption, Migration Strategy:

Could be similar to TidbInitializer, could use that as a reference.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing how pd-ctl currently obtains PD connection information and use TidbInitializer as the reference for the proposed resource. Define the PD operations and CRD behavior that need to be supported, including Kubernetes RBAC and restricted environments. Done means users can automate the requested PD operations without exec access to PD pods.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.