Account for the target namespace when determining availability
@@ -88,9 +88,13 @@ func FindAvailableNamespace(r client.Reader, experiment *redskyv1alpha1.Experime
inuse := make(map[string]bool, len(trials))
for i := range trials {
if redskytrial.IsTrialActive(&trials[i]) {
+ if trials[i].Spec.TargetNamespace != "" {
+ inuse[trials[i].Spec.TargetNamespace] = true
+ } else {
inuse[trials[i].Namespace] = true
}
}
+ }
// Find eligible namespaces
if experiment.Spec.NamespaceSelector != nil {
