Remove an unnecessary check

This commit is contained in:
M. Mert Yildiran 2023-07-03 11:45:00 +03:00
parent 3c25cec633
commit f7ce141d0d
No known key found for this signature in database
GPG Key ID: DA5D6DCBB758A461

View File

@ -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 {