Skip to content

Commit

Permalink
Merge pull request radondb#495 from andyli029/neater
Browse files Browse the repository at this point in the history
*: fix typo and comments radondb#494
  • Loading branch information
andyli029 authored May 26, 2022
2 parents f5ab75b + 628f18a commit 2bbb142
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion api/v1alpha1/backup_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type BackupSpec struct {
NFSServerAddress string `json:"nfsServerAddress,omitempty"`

// ClusterName represents the cluster name to backup
ClusterName string `json:"clustname"`
ClusterName string `json:"clusterName"`

// History Limit of job
// +optional
Expand Down
1 change: 0 additions & 1 deletion api/v1alpha1/mysqlcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@ type MysqlCluster struct {
}

// +kubebuilder:object:root=true

// MysqlClusterList contains a list of MysqlCluster
type MysqlClusterList struct {
metav1.TypeMeta `json:",inline"`
Expand Down
3 changes: 1 addition & 2 deletions api/v1alpha1/mysqlcluster_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ func (r *MysqlCluster) ValidateDelete() error {

// Validate volume size, forbidden shrink storage size.
func (r *MysqlCluster) validateVolumeSize(oldCluster *MysqlCluster) error {

oldStorageSize, err := resource.ParseQuantity(oldCluster.Spec.Persistence.Size)
if err != nil {
return err
Expand All @@ -88,7 +87,7 @@ func (r *MysqlCluster) validateVolumeSize(oldCluster *MysqlCluster) error {
if err != nil {
return err
}
// =1 means that old storage size is greater then new
// =1 means that old storage size is greater than new.
if oldStorageSize.Cmp(newStorageSize) == 1 {
return apierrors.NewForbidden(schema.GroupResource{}, "", fmt.Errorf("volesize can not be decreased"))
}
Expand Down
4 changes: 2 additions & 2 deletions charts/mysql-operator/crds/mysql.radondb.com_backups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
spec:
description: BackupSpec defines the desired state of Backup
properties:
clustname:
clusterName:
description: ClusterName represents the cluster name to backup
type: string
historyLimit:
Expand All @@ -56,7 +56,7 @@ spec:
description: Represents the ip address of the nfs server.
type: string
required:
- clustname
- clusterName
type: object
status:
description: BackupStatus defines the observed state of Backup
Expand Down
4 changes: 2 additions & 2 deletions config/crd/bases/mysql.radondb.com_backups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
spec:
description: BackupSpec defines the desired state of Backup
properties:
clustname:
clusterName:
description: ClusterName represents the cluster name to backup
type: string
historyLimit:
Expand All @@ -56,7 +56,7 @@ spec:
description: Represents the ip address of the nfs server.
type: string
required:
- clustname
- clusterName
type: object
status:
description: BackupStatus defines the observed state of Backup
Expand Down
2 changes: 1 addition & 1 deletion config/samples/mysql_v1alpha1_backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ spec:
image: radondb/mysql57-sidecar:v2.2.0
# hostname if empty, use the leader as hostname
hostname: sample-mysql-0
clustname: sample
clustername: sample
# nfsServerAddress: ""
4 changes: 2 additions & 2 deletions docs/en-us/deploy_backup_restore_s3.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ metadata:
spec:
# Add fields here
hostname: sample-mysql-0
clustname: sample
clustername: sample

```
| name | function |
|------|--------|
|hostname|pod name in cluser|
|clustname|cluster name|
|clustername|cluster name|

### start cluster

Expand Down
4 changes: 2 additions & 2 deletions docs/zh-cn/deploy_backup_restore_s3.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ metadata:
spec:
# Add fields here
hostname: sample-mysql-0
clustname: sample
clustername: sample

```
| name | function |
|------|--------|
|hostname|pod name in cluser|
|clustname|cluster name|
|clustername|cluster name|

### start cluster

Expand Down

0 comments on commit 2bbb142

Please sign in to comment.