pingcap / pingcap/tidb-operator

Reconsider CR abstraction granularity

Open
#3,734 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status/discussion-wanted
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:

As the version number goes up, TiDB Operator is exposing more and more Kubernetes native abstraction details (like verbatim fields in StatefulSet) in the CRs (e.g. TidbCluster). This trend of making CRs more like Kubernetes native objects in field level is a sign of bad design. On the one side, the Kubernetes api objects are well defined and could give users more control of the behavior of TiDB Operator. On the other side, this results in a lot of work for users to understand before they could use TiDB Operator to do their job.

Describe the feature you'd like:

We should come up with a more robust and user friendly abstraction for CRs, which must make both basic level and advanced users happy.
One possible way of achieving this goal is to make separated levels of abstractions: we could expose simple APIs through CRs, and also allow the user to touch the underlying Kubernetes native objects for advanced usages.

Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

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 the TidbCluster CR fields that expose StatefulSet details and the Kubernetes native objects they represent. Identify which controls are needed by basic versus advanced users, then investigate how separate simple APIs and access to underlying objects could be designed and migrated without breaking existing CRs.

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
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.