From 37ee080d050bdc05cdf2ed525daf472b255ba90c Mon Sep 17 00:00:00 2001 From: Edward Viaene Date: Fri, 5 Jul 2019 10:36:09 +0200 Subject: [PATCH] added scheduling strategy --- provider/ecs/ecs.go | 4 ++++ service/deploy.go | 1 + 2 files changed, 5 insertions(+) diff --git a/provider/ecs/ecs.go b/provider/ecs/ecs.go index ed49e7c..4b6cebd 100644 --- a/provider/ecs/ecs.go +++ b/provider/ecs/ecs.go @@ -704,6 +704,10 @@ func (e *ECS) CreateService(d service.Deploy) error { }, } + if d.SchedulingStrategy != "" { + input.SetSchedulingStrategy(d.SchedulingStrategy) + } + if strings.ToLower(d.ServiceProtocol) != "none" { input.SetLoadBalancers([]*ecs.LoadBalancer{ { diff --git a/service/deploy.go b/service/deploy.go index 29edfe2..ff0cef2 100644 --- a/service/deploy.go +++ b/service/deploy.go @@ -29,6 +29,7 @@ type Deploy struct { Volumes []DeployVolume `json:"volumes" yaml:"volumes"` EnvNamespace string `json:"envNamespace" yaml:"envNamespace"` ServiceRegistry string `json:"serviceRegistry" yaml:"serviceRegistry"` + SchedulingStrategy string `json:"schedulingStrategy" yaml:"schedulingStrategy"` } type DeployContainer struct { ContainerName string `json:"containerName" yaml:"containerName" binding:"required"`