Allow setting default docker run options
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
Kubernetes for example allows setting default pod (in terms of ECS task) resource settings:
https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/
https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/
https://github.com/kubernetes/kubernetes/pull/57973
Is it possible to add some default parameters to either ECS cluster or ECS agent so that containers which are started without some or any resource limits explicitly set will inherit these defaults?
Example task definition:
```json
[
{
"name": "web",
"image": "nginx:latest",
"portMappings": [{
"hostPort": 8080,
"containerPort": 80,
"protocol": "tcp"
}
]
}
]
```
No memory and cpu are set as [they're not required](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#container_definitions), but on the ECS agent/cluster level it would be possible to set default limitations.
Example use case:
For huge ECS clusters with thousands of services accidentally missed resource settings on some services shouldn't make cluster instances unstable and dramatically affect other services.
Related issue #945
Contributor guide
Research direction
Review the ECS task definition parameters and the ECS cluster or agent settings described in the issue. Determine where default CPU and memory limits could be configured and define how explicitly set limits interact with defaults. Done would provide a specified, documented way for containers missing resource limits to inherit them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, docker
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100