pingcap / pingcap/tidb-operator

Define a struct of common fields for all components

Open
#3,908 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

priority:P2 type/feature-request
Dominant language
Go
Stars
1.3k
Forks
540
Avg merge
3d 2h
Merged PRs (30d)
18

Description

Now there are many fields defined everywhere in API

  • imagePullSecret
  • imagePullPolicy
  • affinity
  • toleration
  • nodeSelector
  • podSecurityContext

All of these fields are common for all components. And number of fields will grow in the feature kubernetes version.

We need a struct for all of these common fields.

  • Add struct of common fields
  • Add common functions to sync these fields in controller

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 locating the API definitions where imagePullSecret, imagePullPolicy, affinity, toleration, nodeSelector, and podSecurityContext are repeated, then trace the controller code that synchronizes them. Done means the common fields are represented by one shared struct and common synchronization functions are used across all components.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
backend-api-design, infrastructure
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.