From 4747e92fc4dda9b8709e7650f0e3f29add2f8c1f Mon Sep 17 00:00:00 2001 From: Yvonnick Esnault Date: Tue, 7 Jul 2020 09:57:59 +0200 Subject: [PATCH] fix(hatchery/k8s): enable service requirement (#5292) Signed-off-by: Yvonnick Esnault --- engine/hatchery/kubernetes/kubernetes.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/engine/hatchery/kubernetes/kubernetes.go b/engine/hatchery/kubernetes/kubernetes.go index 5b64e7f9cb..d82161a9e9 100644 --- a/engine/hatchery/kubernetes/kubernetes.go +++ b/engine/hatchery/kubernetes/kubernetes.go @@ -233,10 +233,7 @@ func (h *HatcheryKubernetes) WorkerModelSecretList(m sdk.Model) (sdk.WorkerModel func (h *HatcheryKubernetes) CanSpawn(ctx context.Context, model *sdk.Model, jobID int64, requirements []sdk.Requirement) bool { // Service and Hostname requirement are not supported for _, r := range requirements { - if r.Type == sdk.ServiceRequirement { - log.Debug("CanSpawn> Job %d has a service requirement. Kubernetes can't spawn a worker for this job", jobID) - return false - } else if r.Type == sdk.HostnameRequirement { + if r.Type == sdk.HostnameRequirement { log.Debug("CanSpawn> Job %d has a hostname requirement. Kubernetes can't spawn a worker for this job", jobID) return false }