-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
@aws-cdk/aws-ecs-patternsRelated to ecs-patterns libraryRelated to ecs-patterns libraryeffort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.good first issueRelated to contributions. See CONTRIBUTING.mdRelated to contributions. See CONTRIBUTING.mdp2
Description
Describe the feature
Surface the container-level cpu and container-level memoryLimitMiB property of ContainerDefinitionOptions as part of the ApplicationLoadBalancedFargateService construct.
Currently those two properties are not accessible when creating an ApplicationLoadBalancedFargateService. (see code)
Use Case
I want to deploy a sidecar container to the service container, within the same task definition. Right now the issue I observe is, the service container is set a cpu value that equals to the task cpu value (named cpu in ApplicationLoadBalancedFargateService construct prop), thus I get error because the sum of sidecar container cpu and service container cpu exceeds the task cpu limit.
Proposed Solution
const service = new ApplicationLoadBalancedFargateService(this, 'Service', {
cpu: 4096 ,
memoryLimitMiB: 7168,
containerCpu: 2048,
containerMemoryLimitMiB: 6144,
...
}
or maybe passing in an object
const service = new ApplicationLoadBalancedFargateService(this, 'Service', {
cpu: 4096 ,
memoryLimitMiB: 7168,
containerDefinitionOptions : {
containerCpu: 2048,
containerMemoryLimitMiB: 6144,
...
}
...
}
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
CDK version used
2
Environment details (OS name and version, etc.)
Linux
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-ecs-patternsRelated to ecs-patterns libraryRelated to ecs-patterns libraryeffort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.good first issueRelated to contributions. See CONTRIBUTING.mdRelated to contributions. See CONTRIBUTING.mdp2