Skip to content

Commit

Permalink
*: fix typo and delete comments radondb#494
Browse files Browse the repository at this point in the history
  • Loading branch information
andyli029 committed May 25, 2022
1 parent 4821e07 commit ca27d35
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 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
2 changes: 0 additions & 2 deletions api/v1alpha1/mysqlcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,6 @@ type MysqlCluster struct {
Status MysqlClusterStatus `json:"status,omitempty"`
}

// +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

0 comments on commit ca27d35

Please sign in to comment.