diff --git a/controllers/serviceexport/reconciler.go b/controllers/serviceexport/reconciler.go index c4d17a331..563bb7746 100644 --- a/controllers/serviceexport/reconciler.go +++ b/controllers/serviceexport/reconciler.go @@ -218,7 +218,7 @@ func isValidNameSpace(ns string, slice *kubeslicev1beta1.Slice) bool { if ns == fmt.Sprintf(sliceController.VPC_NS_FMT, slice.Name) { return true } - return arrayContainsString(slice.Status.ApplicationNamespaces, ns) + return arrayContainsString(slice.Status.SliceConfig.NamespaceIsolationProfile.ApplicationNamespaces, ns) } // Setup ServiceExport Reconciler diff --git a/controllers/slicegateway/utils.go b/controllers/slicegateway/utils.go index 7e32a9ecb..99cf6334c 100644 --- a/controllers/slicegateway/utils.go +++ b/controllers/slicegateway/utils.go @@ -357,6 +357,9 @@ func GetPodForGwDeployment(ctx context.Context, c client.Client, depName string) if err := c.List(ctx, &podList, listOpts...); err != nil { return nil, err } + if len(podList.Items) == 0 { + return nil, fmt.Errorf("No pods found with matching labels") + } return &podList.Items[0], nil }