Skip to content

Commit

Permalink
Fix NPE (#20)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
tamalsaha committed Nov 22, 2021
1 parent e523d52 commit 9938b07
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ func ResourceLimits(rr core.ResourceRequirements) core.ResourceList {
}

func ResourceRequests(rr core.ResourceRequirements) core.ResourceList {
if rr.Requests == nil {
return core.ResourceList{}
}
return rr.Requests
}

Expand Down

0 comments on commit 9938b07

Please sign in to comment.