From ef177093c75f8e8ac36fd7a0e332caad8b5c3396 Mon Sep 17 00:00:00 2001 From: Howard Lau Date: Wed, 28 Oct 2020 05:09:01 +0000 Subject: [PATCH] remove unused field Signed-off-by: Howard Lau --- api/v1/seaweed_types.go | 10 ++-------- controllers/seaweed_controller.go | 8 -------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/api/v1/seaweed_types.go b/api/v1/seaweed_types.go index e6af00e..3966665 100644 --- a/api/v1/seaweed_types.go +++ b/api/v1/seaweed_types.go @@ -46,13 +46,7 @@ type SeaweedSpec struct { // Filer Filer *FilerSpec `json:"filer,omitempty"` - // VolumeServerCount is the number of volume servers, default to 1 - VolumeServerCount int32 `json:"volumeServerCount,omitempty"` - VolumeServerDiskCount int32 `json:"volumeServerDiskCount,omitempty"` - VolumeServerDiskSizeInGiB int32 `json:"volumeServerDiskSizeInGiB,omitempty"` - - // FilerCount is the number of filers, default to 1 - FilerCount int32 `json:"filerCount,omitempty"` + VolumeServerDiskCount int32 `json:"volumeServerDiskCount,omitempty"` // ingress Hosts []string `json:"hosts"` @@ -90,7 +84,7 @@ type FilerSpec struct { corev1.ResourceRequirements `json:",inline"` // The desired ready replicas - // +kubebuilder:validation:Minimum=0 + // +kubebuilder:validation:Minimum=1 Replicas int32 `json:"replicas"` } diff --git a/controllers/seaweed_controller.go b/controllers/seaweed_controller.go index 7583149..d2a5163 100644 --- a/controllers/seaweed_controller.go +++ b/controllers/seaweed_controller.go @@ -50,14 +50,6 @@ func (r *SeaweedReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { return result, err } - // temporary - if seaweedCR.Spec.VolumeServerCount == 0 { - seaweedCR.Spec.VolumeServerCount = 1 - } - if seaweedCR.Spec.FilerCount == 0 { - seaweedCR.Spec.FilerCount = 1 - } - if done, result, err = r.ensureMaster(seaweedCR); done { return result, err }