Skip to content

Commit

Permalink
fix typo (#6025)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <[email protected]>
Co-authored-by: Ryan Leung <[email protected]>
  • Loading branch information
ti-chi-bot and rleungx authored Jan 8, 2025
1 parent f2a081d commit df6a76a
Show file tree
Hide file tree
Showing 14 changed files with 63 additions and 63 deletions.
14 changes: 7 additions & 7 deletions docs/api-references/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -10972,7 +10972,7 @@ message.</p>
<a href="#tidbclusterspec">TidbClusterSpec</a>)
</p>
<p>
<p>PDMSSpec contains details of PD Micro Service</p>
<p>PDMSSpec contains details of PD microservice</p>
</p>
<table>
<thead>
Expand Down Expand Up @@ -11020,7 +11020,7 @@ string
</em>
</td>
<td>
<p>Name of the PD Micro Service</p>
<p>Name of the PD microservice</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -11068,7 +11068,7 @@ ServiceSpec
</td>
<td>
<em>(Optional)</em>
<p>Service defines a Kubernetes service of PD Micro Service cluster.
<p>Service defines a Kubernetes service of PD microservice cluster.
Optional: Defaults to <code>.spec.services</code> in favor of backward compatibility</p>
</td>
</tr>
Expand Down Expand Up @@ -11096,7 +11096,7 @@ PDConfigWraper
</td>
<td>
<em>(Optional)</em>
<p>Config is the Configuration of pd Micro Service servers</p>
<p>Config is the configuration of PD microservice servers</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -11145,7 +11145,7 @@ string
</td>
<td>
<em>(Optional)</em>
<p>The storageClassName of the persistent volume for PD Micro Service log storage.
<p>The storageClassName of the persistent volume for PD microservice log storage.
Defaults to Kubernetes default storage class.</p>
</td>
</tr>
Expand All @@ -11160,7 +11160,7 @@ Defaults to Kubernetes default storage class.</p>
</td>
<td>
<em>(Optional)</em>
<p>StorageVolumes configure additional storage for PD Micro Service pods.</p>
<p>StorageVolumes configure additional storage for PD microservice pods.</p>
</td>
</tr>
<tr>
Expand All @@ -11182,7 +11182,7 @@ int
<a href="#tidbclusterstatus">TidbClusterStatus</a>)
</p>
<p>
<p>PDMSStatus is PD Micro Service Status</p>
<p>PDMSStatus is PD microservice status</p>
</p>
<table>
<thead>
Expand Down
12 changes: 6 additions & 6 deletions pkg/apis/pingcap/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/apis/pingcap/v1alpha1/tidbcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (tc *TidbCluster) PDVersion() string {
return getImageVersion(tc.PDImage())
}

// PDMSImage return the image used by specified PD MicroService.
// PDMSImage return the image used by specified PD microservice.
//
// If PDMS isn't specified, return empty string.
func (tc *TidbCluster) PDMSImage(spec *PDMSSpec) string {
Expand Down Expand Up @@ -127,7 +127,7 @@ func (tc *TidbCluster) PDMSImage(spec *PDMSSpec) string {
return image
}

// PDMSVersion return the image version used by specified PD MicroService.
// PDMSVersion return the image version used by specified PD microservice.
//
// If PDMS isn't specified, return empty string.
func (tc *TidbCluster) PDMSVersion(name string) string {
Expand Down
14 changes: 7 additions & 7 deletions pkg/apis/pingcap/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,12 +600,12 @@ type PDSpec struct {
}

// +k8s:openapi-gen=true
// PDMSSpec contains details of PD Micro Service
// PDMSSpec contains details of PD microservice
type PDMSSpec struct {
ComponentSpec `json:",inline"`
corev1.ResourceRequirements `json:",inline"`

// Name of the PD Micro Service
// Name of the PD microservice
// +kubebuilder:validation:Enum:="tso";"scheduling"
Name string `json:"name"`

Expand All @@ -621,7 +621,7 @@ type PDMSSpec struct {
// +optional
BaseImage *string `json:"baseImage"`

// Service defines a Kubernetes service of PD Micro Service cluster.
// Service defines a Kubernetes service of PD microservice cluster.
// Optional: Defaults to `.spec.services` in favor of backward compatibility
// +optional
Service *ServiceSpec `json:"service,omitempty"`
Expand All @@ -632,7 +632,7 @@ type PDMSSpec struct {
// +optional
MaxFailoverCount *int32 `json:"maxFailoverCount,omitempty"`

// Config is the Configuration of pd Micro Service servers
// Config is the configuration of PD microservice servers
// +optional
// +kubebuilder:validation:Schemaless
// +kubebuilder:validation:XPreserveUnknownFields
Expand All @@ -652,12 +652,12 @@ type PDMSSpec struct {
// +kubebuilder:validation:Enum:="";"v1"
StartUpScriptVersion string `json:"startUpScriptVersion,omitempty"`

// The storageClassName of the persistent volume for PD Micro Service log storage.
// The storageClassName of the persistent volume for PD microservice log storage.
// Defaults to Kubernetes default storage class.
// +optional
StorageClassName *string `json:"storageClassName,omitempty"`

// StorageVolumes configure additional storage for PD Micro Service pods.
// StorageVolumes configure additional storage for PD microservice pods.
// +optional
StorageVolumes []StorageVolume `json:"storageVolumes,omitempty"`

Expand Down Expand Up @@ -1522,7 +1522,7 @@ type PDStatus struct {
VolReplaceInProgress bool `json:"volReplaceInProgress,omitempty"`
}

// PDMSStatus is PD Micro Service Status
// PDMSStatus is PD microservice status
type PDMSStatus struct {
Name string `json:"name,omitempty"`
// +optional
Expand Down
2 changes: 1 addition & 1 deletion pkg/manager/member/pd_member_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (m *pdMemberManager) Sync(tc *v1alpha1.TidbCluster) error {

if (tc.Spec.PD.Mode == "ms" && tc.Spec.PDMS == nil) ||
(tc.Spec.PDMS != nil && tc.Spec.PD.Mode != "ms") {
klog.Infof("tidbcluster: [%s/%s]'s enable micro service failed, please check `PD.Mode` and `PDMS`", tc.GetNamespace(), tc.GetName())
klog.Infof("tidbcluster: [%s/%s]'s enable microservice failed, please check `PD.Mode` and `PDMS`", tc.GetNamespace(), tc.GetName())
}

// skip sync if pd is suspended
Expand Down
18 changes: 9 additions & 9 deletions pkg/manager/member/pd_ms_member_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ func NewPDMSMemberManager(dependencies *controller.Dependencies, pdMSScaler Scal
}
}

// Sync for all PD Micro Service components.
// Sync for all PD microservice components.
func (m *pdMSMemberManager) Sync(tc *v1alpha1.TidbCluster) error {
// Need to start PD API
if tc.Spec.PDMS != nil && tc.Spec.PD == nil {
klog.Infof("PD Micro Service is enabled, but PD is not enabled, skip syncing PD Micro Service")
klog.Infof("PD microservice is enabled, but PD is not enabled, skip syncing PD microservice")
return nil
}
// remove all micro service components if PDMS is not enabled
// remove all microservice components if PDMS is not enabled
// PDMS need to be enabled when PD.Mode is ms && PDMS is not nil
if tc.Spec.PDMS == nil || (tc.Spec.PD != nil && tc.Spec.PD.Mode != "ms") {
for _, comp := range tc.Status.PDMS {
Expand Down Expand Up @@ -95,7 +95,7 @@ func (m *pdMSMemberManager) Sync(tc *v1alpha1.TidbCluster) error {
return nil
}

// init PD Micro Service status
// init PD microservice status
if tc.Status.PDMS == nil {
tc.Status.PDMS = make(map[string]*v1alpha1.PDMSStatus)
}
Expand All @@ -115,10 +115,10 @@ func (m *pdMSMemberManager) Sync(tc *v1alpha1.TidbCluster) error {
return nil
}

// syncSingleService for single PD Micro Service components.
// syncSingleService for single PD microservice components.
func (m *pdMSMemberManager) syncSingleService(tc *v1alpha1.TidbCluster, curSpec *v1alpha1.PDMSSpec) error {
curService := curSpec.Name
// Skip sync if PD Micro Service is suspended
// Skip sync if PD microservice is suspended
componentMemberType := v1alpha1.PDMSMemberType(curService)
needSuspend, err := m.suspender.SuspendComponent(tc, componentMemberType)
if err != nil {
Expand All @@ -129,17 +129,17 @@ func (m *pdMSMemberManager) syncSingleService(tc *v1alpha1.TidbCluster, curSpec
return nil
}

// Sync PD Micro Service
// Sync PD microservice
if err := m.syncPDMSService(tc, curSpec); err != nil {
return err
}

// Sync PD Micro Service Headless Service
// Sync PD microservice headless service
if err := m.syncPDMSHeadlessService(tc, curSpec); err != nil {
return err
}

// Sync PD Micro Service StatefulSet
// Sync PD microservice statefulSet
return m.syncPDMSStatefulSet(tc, curSpec)
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/manager/member/pd_ms_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type pdMSScaler struct {
generalScaler
}

// NewPDMSScaler returns a PD Micro Service Scaler.
// NewPDMSScaler returns a PD microservice scaler.
func NewPDMSScaler(deps *controller.Dependencies) *pdMSScaler {
return &pdMSScaler{generalScaler: generalScaler{deps: deps}}
}
Expand Down
8 changes: 4 additions & 4 deletions pkg/manager/member/pd_ms_upgrader.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type pdMSUpgrader struct {
deps *controller.Dependencies
}

// NewPDMSUpgrader returns a PD Micro Service Upgrader
// NewPDMSUpgrader returns a PD microservice upgrader
func NewPDMSUpgrader(deps *controller.Dependencies) Upgrader {
return &pdMSUpgrader{
deps: deps,
Expand Down Expand Up @@ -129,7 +129,7 @@ func (u *pdMSUpgrader) gracefulUpgrade(tc *v1alpha1.TidbCluster, oldSet *apps.St

func (u *pdMSUpgrader) upgradePDMSPod(tc *v1alpha1.TidbCluster, ordinal int32, newSet *apps.StatefulSet, curService string) error {
// Only support after `8.3.0` to keep compatibility.
if check, err := pdMSSupportMicroServicesWithName.Check(tc.PDMSVersion(curService)); check && err == nil {
if check, err := pdMSSupportMicroservicesWithName.Check(tc.PDMSVersion(curService)); check && err == nil {
ns := tc.GetNamespace()
tcName := tc.GetName()
upgradePDMSName := PDMSName(tcName, ordinal, tc.Namespace, tc.Spec.ClusterDomain, tc.Spec.AcrossK8s, curService)
Expand Down Expand Up @@ -206,9 +206,9 @@ func choosePDMSToTransferFromMembers(tc *v1alpha1.TidbCluster, newSet *apps.Stat
return targetName
}

// PDMSSupportMicroServicesWithName returns true if the given version of PDMS supports microservices with name.
// PDMSSupportMicroservicesWithName returns true if the given version of PDMS supports microservices with name.
// related https://github.com/tikv/pd/pull/8157.
var pdMSSupportMicroServicesWithName, _ = cmpver.NewConstraint(cmpver.GreaterOrEqual, "v8.3.0")
var pdMSSupportMicroservicesWithName, _ = cmpver.NewConstraint(cmpver.GreaterOrEqual, "v8.3.0")

type fakePDMSUpgrader struct{}

Expand Down
2 changes: 1 addition & 1 deletion pkg/manager/member/pvc_resizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func (p *pvcResizer) buildContextForTC(tc *v1alpha1.TidbCluster, status v1alpha1
ctx.desiredVolumeQuantity[v1alpha1.GetStorageVolumeName("", v1alpha1.PDMemberType)] = quantity
}
storageVolumes = tc.Spec.PD.StorageVolumes
// PD Micro Service
// PD microservice
case v1alpha1.PDMSTSOMemberType, v1alpha1.PDMSSchedulingMemberType:
pdmsRequirement := util.MustNewRequirement(label.ComponentLabelKey, selection.Equals, []string{label.PDMSLabel(comp.String())})
ctx.selector = selector.Add(*pdmsRequirement)
Expand Down
2 changes: 1 addition & 1 deletion pkg/manager/member/startscript/v2/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fi
`
dnsAwaitPart = "<<dns-await-part>>"

pdEnableMicroService = "<<pd-enable-micro-service>>"
pdEnableMicroservice = "<<pd-enable-micro-service>>"

componentCommonWaitForDnsIpMatchScript = `
elapseTime=0
Expand Down
Loading

0 comments on commit df6a76a

Please sign in to comment.