fix: skip ECS container when information are missing instead of panic.

This commit is contained in:
Ludovic Fernandez
2020-01-06 15:10:05 +01:00
committed by Traefiker Bot
parent 3f1925e20e
commit d24f78222c

View File

@@ -309,6 +309,11 @@ func (p *Provider) listInstances(ctx context.Context, client *awsClient) ([]ecsI
state: aws.StringValue(task.LastStatus),
}
} else {
if containerInstance == nil {
log.Errorf("Unable to find container instance information for %s", aws.StringValue(container.Name))
continue
}
var ports []portMapping
for _, mapping := range container.NetworkBindings {
if mapping != nil {