Lower CPU/ memory of sidecar container to minimum (reached limits and commented with error message)
@@ -113,7 +113,7 @@ func getDNSSidecar(containers []containerinstance.Container) containerinstance.C
commands = append(commands, fmt.Sprintf("echo 127.0.0.1 %s >> /etc/hosts", *container.Name))
}
// ACI restart policy is currently at container group level, cannot let the sidecar terminate quietly once /etc/hosts has been edited
- // Pricing is done at the container group level so letting the sidecar container "sleep" does not impact the proce for the whole group
+ // Pricing is done at the container group level so letting the sidecar container "sleep" should not impact the price for the whole group
commands = append(commands, "sleep infinity")
alpineCmd := []string{"sh", "-c", strings.Join(commands, ";")}
dnsSideCar := containerinstance.Container{
@@ -123,12 +123,12 @@ func getDNSSidecar(containers []containerinstance.Container) containerinstance.C
Command: &alpineCmd,
Resources: &containerinstance.ResourceRequirements{
Limits: &containerinstance.ResourceLimits{
- MemoryInGB: to.Float64Ptr(1),
- CPU: to.Float64Ptr(1),
+ MemoryInGB: to.Float64Ptr(0.1), // "The memory requirement should be in incrememts of 0.1 GB."
+ CPU: to.Float64Ptr(0.01), // "The CPU requirement should be in incrememts of 0.01."
},
Requests: &containerinstance.ResourceRequests{
- MemoryInGB: to.Float64Ptr(1),
- CPU: to.Float64Ptr(1),
+ MemoryInGB: to.Float64Ptr(0.1),
+ CPU: to.Float64Ptr(0.01),
},
},
},
