app: init resourceFields by default
Previously we were gating creation of factories and managers required by
task resources behind the task cpu/memory limits flag. Now we gate the
usage behind feature specific flags that require these dependencies.
@@ -201,9 +201,7 @@ func (agent *ecsAgent) start() int {
imageManager := engine.NewImageManager(agent.cfg, agent.dockerClient, state)
client := ecsclient.NewECSClient(agent.credentialProvider, agent.cfg, agent.ec2MetadataClient)
- if agent.cfg.TaskCPUMemLimit.Enabled() {
agent.initializeResourceFields(credentialsManager)
- }
return agent.doStart(containerChangeEventStream, credentialsManager, state, imageManager, client)
}
