Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(ecs): add a service extension interface to ECS services #13234

Closed
1 of 2 tasks
misterjoshua opened this issue Feb 23, 2021 · 2 comments
Closed
1 of 2 tasks

(ecs): add a service extension interface to ECS services #13234

misterjoshua opened this issue Feb 23, 2021 · 2 comments
Assignees
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container feature/enhancement A new API to make things easier or more intuitive. A catch-all for general feature requests. feature-request A feature should be added or improved.

Comments

@misterjoshua
Copy link
Contributor

misterjoshua commented Feb 23, 2021

I'd like ECS services to have an extension interface similar to TaskDefinition.addExtension and ITaskDefinitionExtension.

Use Case

I want to create packaged sets of modifications for ECS services. For instance, I may have a standard set of service discovery options or scaling policies that I want to apply to a service. I would like the option to create these packaged modifications in a way that works on either or both of Fargate and EC2 services.

Proposed Solution

Add an IServiceExtension interface and an addExtension method to BaseService. Users could then implement an IServiceExtension and provide it as a parameter to the service's addExtension method.

class MyStandardScaling implements ecs.IFargateServiceExtension, ecs.IEc2ServiceExtension {
  extend(service: ecs.FargateService | ecs.Ec2Service): void {
    service.autoScaleTaskCount({
      maxCapacity: 100,
      minCapacity: 2,
    }).scaleOnCpuUtilization('Target40', {
      targetUtilizationPercent: 40,
    });
  }
}

service.addExtension(new MyStandardScaling());

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@misterjoshua misterjoshua added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 23, 2021
@peterwoodworth peterwoodworth added the @aws-cdk/aws-ecs Related to Amazon Elastic Container label Feb 24, 2021
@SoManyHs SoManyHs removed the needs-triage This issue or PR still needs to be triaged. label Mar 1, 2021
@ericzbeard ericzbeard added the feature/enhancement A new API to make things easier or more intuitive. A catch-all for general feature requests. label Apr 1, 2021
@SoManyHs
Copy link
Contributor

SoManyHs commented Apr 2, 2021

Closing as per comment in #13235

@SoManyHs SoManyHs closed this as completed Apr 2, 2021
@github-actions
Copy link

github-actions bot commented Apr 2, 2021

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container feature/enhancement A new API to make things easier or more intuitive. A catch-all for general feature requests. feature-request A feature should be added or improved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants