From 03bcf7cc643728c57c6a77afb68c800f6deb6ec8 Mon Sep 17 00:00:00 2001 From: Harsh Maheshwari <42198531+09harsh@users.noreply.github.com> Date: Fri, 29 Sep 2023 12:10:47 +0530 Subject: [PATCH] Service missing namespace (#1818) * exposing context * fetching service from cluster's namespace --------- Co-authored-by: harsh maheshwari --- e2e/fixtures/fdb_cluster.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/e2e/fixtures/fdb_cluster.go b/e2e/fixtures/fdb_cluster.go index 7dab4f3cc..781f93ce8 100644 --- a/e2e/fixtures/fdb_cluster.go +++ b/e2e/fixtures/fdb_cluster.go @@ -799,8 +799,11 @@ func (fdbCluster *FdbCluster) SetPublicIPSource(publicIPSource fdbv1beta2.Public func (fdbCluster *FdbCluster) GetServices() *corev1.ServiceList { serviceList := &corev1.ServiceList{} gomega.Expect( - fdbCluster.getClient(). - List(ctx.TODO(), serviceList, client.MatchingLabels(fdbCluster.GetResourceLabels())), + fdbCluster.getClient().List( + ctx.TODO(), + serviceList, + client.InNamespace(fdbCluster.Namespace()), + client.MatchingLabels(fdbCluster.GetResourceLabels())), ).NotTo(gomega.HaveOccurred()) return serviceList