Skip to content

Commit

Permalink
smaller job defaults requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
wdbaruni committed Dec 18, 2024
1 parent 7cf0f35 commit e4c3408
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
10 changes: 7 additions & 3 deletions cmd/cli/node/columns.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/c2h5oh/datasize"
"github.com/dustin/go-humanize"
"github.com/jedib0t/go-pretty/v6/table"
"github.com/jedib0t/go-pretty/v6/text"
"github.com/samber/lo"
Expand Down Expand Up @@ -97,13 +97,17 @@ var toggleColumns = map[string][]output.TableColumn[*models.NodeState]{
{
ColumnConfig: table.ColumnConfig{Name: "memory", WidthMax: len("10.0 GB / "), WidthMaxEnforcer: text.WrapSoft},
Value: ifComputeNode(func(cni models.ComputeNodeInfo) string {
return fmt.Sprintf("%s / %s", datasize.ByteSize(cni.AvailableCapacity.Memory).HR(), datasize.ByteSize(cni.MaxCapacity.Memory).HR())
return fmt.Sprintf("%s / %s",
humanize.Bytes(cni.AvailableCapacity.Memory),
humanize.Bytes(cni.MaxCapacity.Memory))
}),
},
{
ColumnConfig: table.ColumnConfig{Name: "disk", WidthMax: len("100.0 GB / "), WidthMaxEnforcer: text.WrapSoft},
Value: ifComputeNode(func(cni models.ComputeNodeInfo) string {
return fmt.Sprintf("%s / %s", datasize.ByteSize(cni.AvailableCapacity.Disk).HR(), datasize.ByteSize(cni.MaxCapacity.Disk).HR())
return fmt.Sprintf("%s / %s",
humanize.Bytes(cni.AvailableCapacity.Disk),
humanize.Bytes(cni.MaxCapacity.Disk))
}),
},
{
Expand Down
14 changes: 7 additions & 7 deletions pkg/config/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ var Default = types.Bacalhau{
Interval: 15 * types.Second,
},
AllocatedCapacity: types.ResourceScaler{
CPU: "70%",
Memory: "70%",
Disk: "70%",
CPU: "80%",
Memory: "80%",
Disk: "80%",
GPU: "100%",
},
},
Expand All @@ -63,7 +63,7 @@ var Default = types.Bacalhau{
Task: types.BatchTaskDefaultConfig{
Resources: types.ResourcesConfig{
CPU: "500m",
Memory: "1Gb",
Memory: "512Mb",
},
},
},
Expand All @@ -72,7 +72,7 @@ var Default = types.Bacalhau{
Task: types.BatchTaskDefaultConfig{
Resources: types.ResourcesConfig{
CPU: "500m",
Memory: "1Gb",
Memory: "512Mb",
},
},
},
Expand All @@ -81,7 +81,7 @@ var Default = types.Bacalhau{
Task: types.LongRunningTaskDefaultConfig{
Resources: types.ResourcesConfig{
CPU: "500m",
Memory: "1Gb",
Memory: "512Mb",
},
},
},
Expand All @@ -90,7 +90,7 @@ var Default = types.Bacalhau{
Task: types.LongRunningTaskDefaultConfig{
Resources: types.ResourcesConfig{
CPU: "500m",
Memory: "1Gb",
Memory: "512Mb",
},
},
},
Expand Down

0 comments on commit e4c3408

Please sign in to comment.