@@ -3,6 +3,7 @@ package project
3
3
import (
4
4
"io/ioutil"
5
5
"path/filepath"
6
+ "reflect"
6
7
7
8
"github.com/aws/amazon-ecs-cli/ecs-cli/modules/cli/compose/containerconfig"
8
9
"github.com/aws/amazon-ecs-cli/ecs-cli/modules/utils/compose"
@@ -168,7 +169,8 @@ func convertToContainerConfig(serviceConfig types.ServiceConfig) (*containerconf
168
169
c .MountPoints = mountPoints
169
170
}
170
171
171
- // TODO: add Environtment, EnvFile to ContainerConfig
172
+ logWarningForDeployFields (serviceConfig .Deploy , serviceConfig .Name )
173
+
172
174
// TODO: log out unsupported fields
173
175
return c , nil
174
176
}
@@ -192,3 +194,17 @@ func convertPortConfigToECSMapping(portConfig types.ServicePortConfig) *ecs.Port
192
194
}
193
195
return & ecsMapping
194
196
}
197
+
198
+ func logWarningForDeployFields (d types.DeployConfig , serviceName string ) {
199
+ if d .Resources .Limits != nil || d .Resources .Reservations != nil {
200
+ log .WithFields (log.Fields {
201
+ "option name" : "deploy" ,
202
+ "service name" : serviceName ,
203
+ }).Warn ("Skipping unsupported YAML option for service... service-level resources should be configured in the ecs-param.yml file." )
204
+ } else if ! reflect .DeepEqual (d , types.DeployConfig {}) {
205
+ log .WithFields (log.Fields {
206
+ "option name" : "deploy" ,
207
+ "service name" : serviceName ,
208
+ }).Warn ("Skipping unsupported YAML option for service..." )
209
+ }
210
+ }
0 commit comments