Skip to content

Commit b82abd3

Browse files
committed
Add resource requests for TaskAPI when CPU is used
1 parent 39f6617 commit b82abd3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/operator/operator/k8s.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,13 @@ func TaskContainers(api *spec.API) ([]kcore.Container, []kcore.Volume) {
166166
}
167167

168168
containers = append(containers, neuronContainer)
169+
} else {
170+
if api.Compute.CPU != nil {
171+
apiPodResourceList[kcore.ResourceCPU] = api.Compute.CPU.DeepCopy()
172+
}
173+
if api.Compute.Mem != nil {
174+
apiPodResourceList[kcore.ResourceMemory] = api.Compute.Mem.DeepCopy()
175+
}
169176
}
170177

171178
containers = append(containers, kcore.Container{

0 commit comments

Comments
 (0)