add support for ulimits.nofile

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2020-10-14 08:47:03 +02:00
parent 18ac5d7e66
commit 47344608b8
No known key found for this signature in database
GPG Key ID: 9858809D6F8F6E7E
2 changed files with 12 additions and 3 deletions

View File

@ -135,3 +135,12 @@ func (c *fargateCompatibilityChecker) CheckLoggingDriver(config *types.LoggingCo
c.Unsupported("services.logging.driver %s is not supported", config.Driver) c.Unsupported("services.logging.driver %s is not supported", config.Driver)
} }
} }
func (c *fargateCompatibilityChecker) CheckUlimits(service *types.ServiceConfig) {
for k := range service.Ulimits {
if k != "nofile" {
c.Unsupported("services.ulimits.%s is not supported by Fargate", k)
delete(service.Ulimits, k)
}
}
}

View File

@ -28,12 +28,12 @@ func (b *ecsAPIService) Down(ctx context.Context, project string) error {
return err return err
} }
err = resources.apply(awsTypeCapacityProvider, delete(ctx, b.aws.DeleteCapacityProvider)) err = resources.apply(awsTypeCapacityProvider, doDelete(ctx, b.aws.DeleteCapacityProvider))
if err != nil { if err != nil {
return err return err
} }
err = resources.apply(awsTypeAutoscalingGroup, delete(ctx, b.aws.DeleteAutoscalingGroup)) err = resources.apply(awsTypeAutoscalingGroup, doDelete(ctx, b.aws.DeleteAutoscalingGroup))
if err != nil { if err != nil {
return err return err
} }
@ -62,7 +62,7 @@ func (b *ecsAPIService) previousStackEvents(ctx context.Context, project string)
return previousEvents, nil return previousEvents, nil
} }
func delete(ctx context.Context, delete func(ctx context.Context, arn string) error) func(r stackResource) error { func doDelete(ctx context.Context, delete func(ctx context.Context, arn string) error) func(r stackResource) error {
return func(r stackResource) error { return func(r stackResource) error {
w := progress.ContextWriter(ctx) w := progress.ContextWriter(ctx)
w.Event(progress.Event{ w.Event(progress.Event{