pingcap / pingcap/tidb-operator
Define a struct of common fields for all components
Open
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
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 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