Skip to content

Commit

Permalink
Omit zero value quantities
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbelamaric committed Jun 14, 2024
1 parent 7cac235 commit cde999c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2,161 deletions.
2 changes: 1 addition & 1 deletion dra-evolution/pkg/gen/nvidia.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func sharedGroupToResources(group newresourceapi.NamedResourcesSharedResourceGro

for _, item := range group.Items {
name := fmt.Sprintf("gpu-%d-%s", gpu, item.Name)
if item.QuantityValue != nil {
if item.QuantityValue != nil && !item.QuantityValue.IsZero() {
resources = append(resources, api.SharedCapacity{
Name: name,
Capacity: *item.QuantityValue,
Expand Down
Loading

0 comments on commit cde999c

Please sign in to comment.