Skip to content

Commit

Permalink
Add storage to deployment resource calculation for podGroup (#416)
Browse files Browse the repository at this point in the history
  • Loading branch information
live-wire authored Jun 10, 2022
1 parent aaf29e1 commit afef85e
Show file tree
Hide file tree
Showing 2 changed files with 294 additions and 116 deletions.
6 changes: 6 additions & 0 deletions internal/batchscheduler/volcano/volcano.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,12 @@ func getDeploymentResources(spec *appsv1.DeploymentSpec) *corev1.ResourceRequire
for i := int32(0); i < *spec.Replicas; i++ {
tmResource := getPodResource(&spec.Template.Spec)
addResourceRequirements(reqs, tmResource)

for _, volume := range spec.Template.Spec.Volumes {
if volume.Ephemeral != nil && volume.Ephemeral.VolumeClaimTemplate != nil {
addResourceRequirements(reqs, &volume.Ephemeral.VolumeClaimTemplate.Spec.Resources)
}
}
}
return reqs
}
Expand Down
Loading

0 comments on commit afef85e

Please sign in to comment.