diff --git a/HadesScheduler/kube/kube.go b/HadesScheduler/kube/kube.go index 9f256c2..f191ff7 100644 --- a/HadesScheduler/kube/kube.go +++ b/HadesScheduler/kube/kube.go @@ -19,6 +19,10 @@ import ( "k8s.io/client-go/tools/clientcmd" ) +const ( + waitForNamespace = 5 * time.Second +) + type JobScheduler interface { ScheduleJob(job payload.BuildJob) error } @@ -127,7 +131,7 @@ func createNamespace(clientset *kubernetes.Clientset, namespace string) (*corev1 } // sleep for 5 seconds to give the namespace time to be created - time.Sleep(5 * time.Second) + time.Sleep(waitForNamespace) return ns, nil }