From f7ce141d0d7cc23212caf9c2370a849f0da965cc Mon Sep 17 00:00:00 2001 From: "M. Mert Yildiran" Date: Mon, 3 Jul 2023 11:45:00 +0300 Subject: [PATCH] :zap: Remove an unnecessary check --- cmd/tapRunner.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/cmd/tapRunner.go b/cmd/tapRunner.go index 467f3cc33..b6a7a751e 100644 --- a/cmd/tapRunner.go +++ b/cmd/tapRunner.go @@ -77,13 +77,6 @@ func tap() { state.targetNamespaces = kubernetesProvider.GetNamespaces() - if config.Config.IsNsRestrictedMode() { - if len(state.targetNamespaces) != 1 || !utils.Contains(state.targetNamespaces, config.Config.Tap.ReleaseNamespace) { - log.Error().Msg(fmt.Sprintf("%s can't resolve IPs in other namespaces when running in namespace restricted mode. You can use the same namespace for --%s and --%s", misc.Software, configStructs.NamespacesLabel, configStructs.ReleaseNamespaceLabel)) - return - } - } - log.Info().Strs("namespaces", state.targetNamespaces).Msg("Targeting pods in:") if err := printTargetedPodsPreview(ctx, kubernetesProvider, state.targetNamespaces); err != nil {