Skip to content

Commit

Permalink
feat(defaults): Add default resources to engine container
Browse files Browse the repository at this point in the history
Defines default requests and limits on the engine/executor container.

Contributes to 2475

Signed-off-by: Nick Groszewski <groszewn@gmail.com>
  • Loading branch information
groszewn committed Oct 1, 2020
1 parent 490651c commit acd341d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions operator/controllers/seldondeployment_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,16 @@ func createEngineContainer(mlDep *machinelearningv1.SeldonDeployment, p *machine
//Engine resources
engineResources := p.SvcOrchSpec.Resources
if engineResources == nil {
cpuQuantity, _ := resource.ParseQuantity("0.1")
cpuQuantity := resource.MustParse("1")
memoryQuantity := resource.MustParse("512Mi")
engineResources = &corev1.ResourceRequirements{
Requests: map[corev1.ResourceName]resource.Quantity{
corev1.ResourceCPU: cpuQuantity,
corev1.ResourceCPU: cpuQuantity,
corev1.ResourceMemory: memoryQuantity,
},
Limits: map[corev1.ResourceName]resource.Quantity{
corev1.ResourceCPU: cpuQuantity,
corev1.ResourceMemory: memoryQuantity,
},
}
}
Expand Down

0 comments on commit acd341d

Please sign in to comment.