cleanup some code (#4989)

Automatically submitted.
This commit is contained in:
xuweiwei
2021-11-20 00:15:58 +08:00
committed by GitHub
parent c707a4e7c6
commit 5f900b86f5
3 changed files with 3 additions and 8 deletions

View File

@@ -6,10 +6,7 @@ package kubernetes
// see namespaceExposed.
func (k *Kubernetes) filteredNamespaceExists(namespace string) bool {
_, err := k.APIConn.GetNamespaceByName(namespace)
if err != nil {
return false
}
return true
return err == nil
}
// configuredNamespace returns true when the namespace is exposed through the plugin