fix float issues
Signed-off-by: Howard Lau <howardlau1999@hotmail.com>
This commit is contained in:
parent
95b9af71fa
commit
8c390ce083
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue