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 in raw toml string
|
||||||
Config *string `json:"config,omitempty"`
|
Config *string `json:"config,omitempty"`
|
||||||
|
|
||||||
VolumePreallocate *bool `json:"volumePreallocate,omitempty"`
|
VolumePreallocate *bool `json:"volumePreallocate,omitempty"`
|
||||||
VolumeSizeLimitMB *int32 `json:"volumeSizeLimitMB,omitempty"`
|
VolumeSizeLimitMB *int32 `json:"volumeSizeLimitMB,omitempty"`
|
||||||
GarbageThreshold *float64 `json:"garbageThreshold,omitempty"`
|
GarbageThreshold *string `json:"garbageThreshold,omitempty"`
|
||||||
PulseSeconds *int32 `json:"pulseSeconds,omitempty"`
|
PulseSeconds *int32 `json:"pulseSeconds,omitempty"`
|
||||||
DefaultReplication *string `json:"defaultReplication,omitempty"`
|
DefaultReplication *string `json:"defaultReplication,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// VolumeSpec is the spec for volume servers
|
// VolumeSpec is the spec for volume servers
|
||||||
|
|
|
@ -176,7 +176,7 @@ func (in *MasterSpec) DeepCopyInto(out *MasterSpec) {
|
||||||
}
|
}
|
||||||
if in.GarbageThreshold != nil {
|
if in.GarbageThreshold != nil {
|
||||||
in, out := &in.GarbageThreshold, &out.GarbageThreshold
|
in, out := &in.GarbageThreshold, &out.GarbageThreshold
|
||||||
*out = new(float64)
|
*out = new(string)
|
||||||
**out = **in
|
**out = **in
|
||||||
}
|
}
|
||||||
if in.PulseSeconds != nil {
|
if in.PulseSeconds != nil {
|
||||||
|
|
|
@ -3525,6 +3525,9 @@ spec:
|
||||||
description: Annotations of the component. Merged into the cluster-level
|
description: Annotations of the component. Merged into the cluster-level
|
||||||
annotations if non-empty
|
annotations if non-empty
|
||||||
type: object
|
type: object
|
||||||
|
config:
|
||||||
|
description: Config in raw toml string
|
||||||
|
type: string
|
||||||
env:
|
env:
|
||||||
description: List of environment variables to set in the container,
|
description: List of environment variables to set in the container,
|
||||||
like v1.Container.Env. Note that following env names cannot be
|
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
|
description: Annotations of the component. Merged into the cluster-level
|
||||||
annotations if non-empty
|
annotations if non-empty
|
||||||
type: object
|
type: object
|
||||||
|
config:
|
||||||
|
description: Config in raw toml string
|
||||||
|
type: string
|
||||||
|
defaultReplication:
|
||||||
|
type: string
|
||||||
env:
|
env:
|
||||||
description: List of environment variables to set in the container,
|
description: List of environment variables to set in the container,
|
||||||
like v1.Container.Env. Note that following env names cannot be
|
like v1.Container.Env. Note that following env names cannot be
|
||||||
|
@ -6824,6 +6832,7 @@ spec:
|
||||||
- name
|
- name
|
||||||
type: object
|
type: object
|
||||||
type: array
|
type: array
|
||||||
|
garbageThreshold: {}
|
||||||
hostNetwork:
|
hostNetwork:
|
||||||
description: Whether Hostnetwork of the component is enabled. Override
|
description: Whether Hostnetwork of the component is enabled. Override
|
||||||
the cluster-level setting if present
|
the cluster-level setting if present
|
||||||
|
@ -6866,6 +6875,9 @@ spec:
|
||||||
description: PriorityClassName of the component. Override the cluster-level
|
description: PriorityClassName of the component. Override the cluster-level
|
||||||
one if present
|
one if present
|
||||||
type: string
|
type: string
|
||||||
|
pulseSeconds:
|
||||||
|
format: int32
|
||||||
|
type: integer
|
||||||
replicas:
|
replicas:
|
||||||
description: The desired ready replicas
|
description: The desired ready replicas
|
||||||
format: int32
|
format: int32
|
||||||
|
@ -6968,6 +6980,11 @@ spec:
|
||||||
description: Version of the component. Override the cluster-level
|
description: Version of the component. Override the cluster-level
|
||||||
version if non-empty
|
version if non-empty
|
||||||
type: string
|
type: string
|
||||||
|
volumePreallocate:
|
||||||
|
type: boolean
|
||||||
|
volumeSizeLimitMB:
|
||||||
|
format: int32
|
||||||
|
type: integer
|
||||||
required:
|
required:
|
||||||
- replicas
|
- replicas
|
||||||
type: object
|
type: object
|
||||||
|
|
|
@ -24,7 +24,7 @@ func buildMasterStartupScript(m *seaweedv1.Seaweed) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
if spec.GarbageThreshold != nil {
|
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 {
|
if spec.PulseSeconds != nil {
|
||||||
|
|
Loading…
Reference in New Issue