Skip to content

Commit e4c3408

Browse files
committed
smaller job defaults requirements
1 parent 7cf0f35 commit e4c3408

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

cmd/cli/node/columns.go

+7-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"strings"
66

7-
"github.com/c2h5oh/datasize"
7+
"github.com/dustin/go-humanize"
88
"github.com/jedib0t/go-pretty/v6/table"
99
"github.com/jedib0t/go-pretty/v6/text"
1010
"github.com/samber/lo"
@@ -97,13 +97,17 @@ var toggleColumns = map[string][]output.TableColumn[*models.NodeState]{
9797
{
9898
ColumnConfig: table.ColumnConfig{Name: "memory", WidthMax: len("10.0 GB / "), WidthMaxEnforcer: text.WrapSoft},
9999
Value: ifComputeNode(func(cni models.ComputeNodeInfo) string {
100-
return fmt.Sprintf("%s / %s", datasize.ByteSize(cni.AvailableCapacity.Memory).HR(), datasize.ByteSize(cni.MaxCapacity.Memory).HR())
100+
return fmt.Sprintf("%s / %s",
101+
humanize.Bytes(cni.AvailableCapacity.Memory),
102+
humanize.Bytes(cni.MaxCapacity.Memory))
101103
}),
102104
},
103105
{
104106
ColumnConfig: table.ColumnConfig{Name: "disk", WidthMax: len("100.0 GB / "), WidthMaxEnforcer: text.WrapSoft},
105107
Value: ifComputeNode(func(cni models.ComputeNodeInfo) string {
106-
return fmt.Sprintf("%s / %s", datasize.ByteSize(cni.AvailableCapacity.Disk).HR(), datasize.ByteSize(cni.MaxCapacity.Disk).HR())
108+
return fmt.Sprintf("%s / %s",
109+
humanize.Bytes(cni.AvailableCapacity.Disk),
110+
humanize.Bytes(cni.MaxCapacity.Disk))
107111
}),
108112
},
109113
{

pkg/config/defaults.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ var Default = types.Bacalhau{
5151
Interval: 15 * types.Second,
5252
},
5353
AllocatedCapacity: types.ResourceScaler{
54-
CPU: "70%",
55-
Memory: "70%",
56-
Disk: "70%",
54+
CPU: "80%",
55+
Memory: "80%",
56+
Disk: "80%",
5757
GPU: "100%",
5858
},
5959
},
@@ -63,7 +63,7 @@ var Default = types.Bacalhau{
6363
Task: types.BatchTaskDefaultConfig{
6464
Resources: types.ResourcesConfig{
6565
CPU: "500m",
66-
Memory: "1Gb",
66+
Memory: "512Mb",
6767
},
6868
},
6969
},
@@ -72,7 +72,7 @@ var Default = types.Bacalhau{
7272
Task: types.BatchTaskDefaultConfig{
7373
Resources: types.ResourcesConfig{
7474
CPU: "500m",
75-
Memory: "1Gb",
75+
Memory: "512Mb",
7676
},
7777
},
7878
},
@@ -81,7 +81,7 @@ var Default = types.Bacalhau{
8181
Task: types.LongRunningTaskDefaultConfig{
8282
Resources: types.ResourcesConfig{
8383
CPU: "500m",
84-
Memory: "1Gb",
84+
Memory: "512Mb",
8585
},
8686
},
8787
},
@@ -90,7 +90,7 @@ var Default = types.Bacalhau{
9090
Task: types.LongRunningTaskDefaultConfig{
9191
Resources: types.ResourcesConfig{
9292
CPU: "500m",
93-
Memory: "1Gb",
93+
Memory: "512Mb",
9494
},
9595
},
9696
},

0 commit comments

Comments
 (0)