Items marked with (R) are required prior to targeting to a release.
- (R) This design doc has been discussed and approved
- (R) Test plan is in place
- (R) e2e tests in kind
- (R) Graduation criteria is in place if required
- (R) User-facing documentation has been created in [pingcap/docs-tidb-operator]
Currently, PD support ms mode. It should be supported by tidb operator.
- Deploy PD in ms mode
- Update PD from normal mode to ms mode
- Update PD from ms mode back to normal mode
- Reuse common fields between PD components.
As a TiDB user, create PD in ms mode.
As a TiDB user, create TSO service and change PD from normal mode to ms mode.
- There are too many component CRDs and all of them need a similar
overlayfield.- Extract a common CRD for
overlayfield which can be referred by all components.
- Extract a common CRD for
Reuse PDGroup/PD CRD for API Service of PD in ms mode. Just add a new mode field.
apiVersion: core.pingcap.com/v1alpha1
kind: PDGroup
...
spec:
template:
spec:
mode: msapiVersion: core.pingcap.com/v1alpha1
kind: TSOGroup
metadata:
name: tso
spec:
cluster:
name: db
replicas: 2
template:
metadata:
annotations:
author: pingcap
spec:
resources:
cpu: "4"
memory: 8Gi
config: |
[log]
level = "debug"apiVersion: core.pingcap.com/v1alpha1
kind: SchedulingGroup
metadata:
name: scheduling
spec:
cluster:
name: db
replicas: 2
template:
metadata:
annotations:
author: pingcap
spec:
resources:
cpu: "4"
memory: 8Gi
config: |
[log]
level = "debug"apiVersion: core.pingcap.com/v1alpha1
kind: AdmissionControllerGroup
metadata:
name: admission
spec:
cluster:
name: db
replicas: 2
template:
metadata:
annotations:
author: pingcap
spec:
resources:
cpu: "4"
memory: 8Gi
config: |
[log]
level = "debug"Steps are unordered. PD/PDGroup controllers will wait until TSOGroup is synced and ready.
- Change PD mode to ms
- Apply TSO
- (Optional) Apply scheduling svc
- (Optional) Apply admission control svc
Steps are also unordered. TSOGroup will block deletion if PD mode is still ms.
- Change PD mode to normal
- (Optional) Del TSO
- (Optional) Del scheduling svc
- (Optional) Del admission control svc
TiDB Operator will automatically ensure the version skew policy of PDMS components. Now the default skew poligy is versions of all PDMS components are not greater than PD
All components can update config at the same time. It all depends on the request order of clients.
No feature gate
- Add too many components
- All PD components share many common fields
Pros:
- Some fields can be shared.
Cons:
- Not flexiable.
- Cannot support
scalesubresource. - Too complex and hard to display status of a specific component.