Skip to content

Commit

Permalink
Fix serve update when limits is null (#935)
Browse files Browse the repository at this point in the history
* Fix serve update when limits is null

* update arena version
  • Loading branch information
AlanFokCo authored Mar 6, 2023
1 parent 5eb3b9c commit f7e889e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.3
0.9.4
4 changes: 4 additions & 0 deletions pkg/serving/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@ func findAndBuildDeployment(args *types.CommonUpdateServingArgs) (*appsv1.Deploy
}

resourceLimits := deploy.Spec.Template.Spec.Containers[0].Resources.Limits
if resourceLimits == nil {
resourceLimits = make(map[v1.ResourceName]resource.Quantity)
}

if args.GPUCount > 0 {
resourceLimits[ResourceGPU] = resource.MustParse(strconv.Itoa(args.GPUCount))
if _, ok := resourceLimits[ResourceGPUMemory]; ok {
Expand Down

0 comments on commit f7e889e

Please sign in to comment.