diff --git a/api/v1/seaweed_types.go b/api/v1/seaweed_types.go index 338725d..36c2921 100644 --- a/api/v1/seaweed_types.go +++ b/api/v1/seaweed_types.go @@ -122,11 +122,11 @@ type MasterSpec struct { // Config in raw toml string Config *string `json:"config,omitempty"` - VolumePreallocate *bool `json:"volumePreallocate,omitempty"` - VolumeSizeLimitMB *int32 `json:"volumeSizeLimitMB,omitempty"` - GarbageThreshold *float64 `json:"garbageThreshold,omitempty"` - PulseSeconds *int32 `json:"pulseSeconds,omitempty"` - DefaultReplication *string `json:"defaultReplication,omitempty"` + VolumePreallocate *bool `json:"volumePreallocate,omitempty"` + VolumeSizeLimitMB *int32 `json:"volumeSizeLimitMB,omitempty"` + GarbageThreshold *string `json:"garbageThreshold,omitempty"` + PulseSeconds *int32 `json:"pulseSeconds,omitempty"` + DefaultReplication *string `json:"defaultReplication,omitempty"` } // VolumeSpec is the spec for volume servers diff --git a/api/v1/zz_generated.deepcopy.go b/api/v1/zz_generated.deepcopy.go index 43ae982..af0b627 100644 --- a/api/v1/zz_generated.deepcopy.go +++ b/api/v1/zz_generated.deepcopy.go @@ -176,7 +176,7 @@ func (in *MasterSpec) DeepCopyInto(out *MasterSpec) { } if in.GarbageThreshold != nil { in, out := &in.GarbageThreshold, &out.GarbageThreshold - *out = new(float64) + *out = new(string) **out = **in } if in.PulseSeconds != nil { diff --git a/config/crd/bases/seaweed.seaweedfs.com_seaweeds.yaml b/config/crd/bases/seaweed.seaweedfs.com_seaweeds.yaml index 46ba57d..81bb00a 100644 --- a/config/crd/bases/seaweed.seaweedfs.com_seaweeds.yaml +++ b/config/crd/bases/seaweed.seaweedfs.com_seaweeds.yaml @@ -3525,6 +3525,9 @@ spec: description: Annotations of the component. Merged into the cluster-level annotations if non-empty type: object + config: + description: Config in raw toml string + type: string env: description: List of environment variables to set in the container, like v1.Container.Env. Note that following env names cannot be @@ -6715,6 +6718,11 @@ spec: description: Annotations of the component. Merged into the cluster-level annotations if non-empty type: object + config: + description: Config in raw toml string + type: string + defaultReplication: + type: string env: description: List of environment variables to set in the container, like v1.Container.Env. Note that following env names cannot be @@ -6824,6 +6832,7 @@ spec: - name type: object type: array + garbageThreshold: {} hostNetwork: description: Whether Hostnetwork of the component is enabled. Override the cluster-level setting if present @@ -6866,6 +6875,9 @@ spec: description: PriorityClassName of the component. Override the cluster-level one if present type: string + pulseSeconds: + format: int32 + type: integer replicas: description: The desired ready replicas format: int32 @@ -6968,6 +6980,11 @@ spec: description: Version of the component. Override the cluster-level version if non-empty type: string + volumePreallocate: + type: boolean + volumeSizeLimitMB: + format: int32 + type: integer required: - replicas type: object diff --git a/controllers/controller_master_statefulset.go b/controllers/controller_master_statefulset.go index e4099f1..0e79b38 100644 --- a/controllers/controller_master_statefulset.go +++ b/controllers/controller_master_statefulset.go @@ -24,7 +24,7 @@ func buildMasterStartupScript(m *seaweedv1.Seaweed) string { } if spec.GarbageThreshold != nil { - command = append(command, fmt.Sprintf("-garbageThreshold=%f", *spec.GarbageThreshold)) + command = append(command, fmt.Sprintf("-garbageThreshold=%s", *spec.GarbageThreshold)) } if spec.PulseSeconds != nil {