Skip to content

Commit

Permalink
fix(hatchery/k8s): enable service requirement (#5292)
Browse files Browse the repository at this point in the history
Signed-off-by: Yvonnick Esnault <[email protected]>
  • Loading branch information
yesnault authored Jul 7, 2020
1 parent 114967f commit 4747e92
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions engine/hatchery/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 4747e92

Please sign in to comment.