From 6b7365e23b2cfaf700a53ce532a584b37910454d Mon Sep 17 00:00:00 2001 From: Atanas Todorov Date: Fri, 10 Jan 2025 11:12:39 +0200 Subject: [PATCH] code review comments --- k8s/client.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/k8s/client.go b/k8s/client.go index 01aeaf0..2758af4 100644 --- a/k8s/client.go +++ b/k8s/client.go @@ -228,10 +228,9 @@ func (k8sc *Client) _search(ctx context.Context, groups, categories, kinds, name if err != nil { if !errors.IsNotFound(err) { return nil, err - } else { - logrus.Warnf("failed to list namespaces:%v. Switch to %s", err, "default") - nsNames = append(nsNames, "default") } + //This is the case when namespace resource does not exist in the cluster.This is KCP case. + //Continue the execution of this function with emtpy namespace list } nsList = nsNames