Container Resource Limit Enforcement in Portainer CE
0 reputation · 20 May 2024, 02:05 UTC
Resource Constraint Configuration
Portainer CE allows users to define CPU shares, memory limits, and memory reservations through the 'Resources' section during container creation or editing. This interface abstracts the underlying Docker Engine API to prevent individual containers from consuming all available host memory or processing power.
Environmental Constraints
The availability of these controls depends on the endpoint type. While standard Docker environments support these fields, the UI behavior changes when connected to different orchestrators or specific environment configurations where the underlying API does not support these specific resource flags.
There is uncertainty regarding how Portainer handles the persistence of these limits when a container is updated via the UI versus when the underlying image is updated through a pull-and-redeploy action.
- Does the 'Resources' configuration persist automatically during a manual image update?
- How does Portainer validate the memory limit against the actual available host RAM to prevent deployment failures?