@@ -21,14 +21,17 @@ import (
2121)
2222
2323const (
24- SchedulerPortNameClient = "client"
24+ // Deprecated: use SchedulingPortNameClient
25+ SchedulerPortNameClient = "client"
26+ // Deprecated: use DefaultSchedulingPortClient
2527 DefaultSchedulerPortClient = 3379
2628)
2729
2830// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
2931// +kubebuilder:object:root=true
3032
3133// SchedulerGroupList defines a list of Scheduler groups
34+ // Deprecated: use SchedulingGroupList
3235type SchedulerGroupList struct {
3336 metav1.TypeMeta `json:",inline"`
3437 metav1.ListMeta `json:"metadata,omitempty"`
@@ -40,7 +43,7 @@ type SchedulerGroupList struct {
4043// +kubebuilder:object:root=true
4144// +kubebuilder:subresource:status
4245// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector
43- // +kubebuilder:resource:categories=group,shortName=sg
46+ // +kubebuilder:resource:categories=group,shortName=schg
4447// +kubebuilder:selectablefield:JSONPath=`.spec.cluster.name`
4548// +kubebuilder:printcolumn:name="Cluster",type=string,JSONPath=`.spec.cluster.name`
4649// +kubebuilder:printcolumn:name="Desired",type=string,JSONPath=`.spec.replicas`
@@ -51,8 +54,10 @@ type SchedulerGroupList struct {
5154// +kubebuilder:printcolumn:name="Synced",type=string,JSONPath=`.status.conditions[?(@.type=="Synced")].status`
5255// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status`
5356// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
57+ // +kubebuilder:deprecatedversion:warning="This type is deprecated, use SchedulingGroup instead"
5458
5559// SchedulerGroup defines a group of similar Scheduler instances
60+ // Deprecated: use SchedulingGroup
5661// +kubebuilder:validation:XValidation:rule="size(self.metadata.name) <= 40",message="name must not exceed 40 characters"
5762type SchedulerGroup struct {
5863 metav1.TypeMeta `json:",inline"`
@@ -66,6 +71,7 @@ type SchedulerGroup struct {
6671// +kubebuilder:object:root=true
6772
6873// SchedulerList defines a list of Scheduler instances
74+ // Deprecated: use SchedulingList
6975type SchedulerList struct {
7076 metav1.TypeMeta `json:",inline"`
7177 metav1.ListMeta `json:"metadata,omitempty"`
@@ -82,8 +88,10 @@ type SchedulerList struct {
8288// +kubebuilder:printcolumn:name="Synced",type=string,JSONPath=`.status.conditions[?(@.type=="Synced")].status`
8389// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status`
8490// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
91+ // +kubebuilder:deprecatedversion:warning="This is deprecated, use Scheduling instead"
8592
8693// Scheduler defines a Scheduler instance
94+ // Deprecated: use Scheduling
8795// +kubebuilder:validation:XValidation:rule="size(self.metadata.name) <= 47",message="name must not exceed 47 characters"
8896type Scheduler struct {
8997 metav1.TypeMeta `json:",inline"`
@@ -94,6 +102,7 @@ type Scheduler struct {
94102}
95103
96104// SchedulerGroupSpec describes the common attributes of a SchedulerGroup
105+ // Deprecated: use SchedulingGroupSpec
97106type SchedulerGroupSpec struct {
98107 Cluster ClusterReference `json:"cluster"`
99108 // Features are enabled feature
@@ -109,21 +118,23 @@ type SchedulerGroupSpec struct {
109118 Template SchedulerTemplate `json:"template"`
110119}
111120
121+ // SchedulerTemplate defines template of Scheduler
122+ // Deprecated: use SchedulingTemplate
112123type SchedulerTemplate struct {
113124 ObjectMeta `json:"metadata,omitempty"`
114125 Spec SchedulerTemplateSpec `json:"spec"`
115126}
116127
117128// SchedulerTemplateSpec can only be specified in SchedulerGroup
118- // TODO: It's name may need to be changed to distinguish from PodTemplateSpec
129+ // Deprecated: use SchedulingTemplateSpec
119130// +kubebuilder:validation:XValidation:rule="!has(self.overlay) || !has(self.overlay.volumeClaims) || (has(self.volumes) && self.overlay.volumeClaims.all(vc, vc.name in self.volumes.map(v, v.name)))",message="overlay volumeClaims names must exist in volumes"
120131type SchedulerTemplateSpec struct {
121132 // Version must be a semantic version.
122133 // It can has a v prefix or not.
123134 // +kubebuilder:validation:Pattern=`^(v)?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`
124135 Version string `json:"version"`
125136
126- // Image is pd 's image
137+ // Image is scheduler 's image
127138 // If tag is omitted, version will be used as the image tag.
128139 // Default is pingcap/pd
129140 Image * string `json:"image,omitempty"`
@@ -136,7 +147,7 @@ type SchedulerTemplateSpec struct {
136147 UpdateStrategy UpdateStrategy `json:"updateStrategy,omitempty"`
137148
138149 // Config defines config file of Scheduler
139- // See https://docs.pingcap.com/tidb/stable/Scheduler -configuration-file/
150+ // See https://docs.pingcap.com/tidb/stable/scheduling -configuration-file/
140151 Config ConfigFile `json:"config,omitempty"`
141152
142153 // Security defines security config
@@ -153,22 +164,26 @@ type SchedulerTemplateSpec struct {
153164 Overlay * Overlay `json:"overlay,omitempty"`
154165}
155166
167+ // Deprecated: use SchedulingServer
156168type SchedulerServer struct {
157169 // Ports defines all ports listened by Scheduler
158170 Ports SchedulerPorts `json:"ports,omitempty"`
159171}
160172
173+ // Deprecated: use SchedulingPorts
161174type SchedulerPorts struct {
162175 // Client defines port for Scheduler's api service
163176 Client * Port `json:"client,omitempty"`
164177}
165178
179+ // Deprecated: use SchedulingGroupStatus
166180type SchedulerGroupStatus struct {
167181 CommonStatus `json:",inline"`
168182 GroupStatus `json:",inline"`
169183}
170184
171185// SchedulerSpec describes the common attributes of a Scheduler instance
186+ // Deprecated: use SchedulingSpec
172187// +kubebuilder:validation:XValidation:rule="(!has(oldSelf.topology) && !has(self.topology)) || (has(oldSelf.topology) && has(self.topology))",fieldPath=".topology",message="topology can only be set when creating"
173188type SchedulerSpec struct {
174189 // Cluster is a reference of tidb cluster
@@ -191,6 +206,7 @@ type SchedulerSpec struct {
191206 SchedulerTemplateSpec `json:",inline"`
192207}
193208
209+ // Deprecated: use SchedulingStatus
194210type SchedulerStatus struct {
195211 CommonStatus `json:",inline"`
196212}
0 commit comments