refactor: use Namespace controller for namespaceSelector

Signed-off-by: Craig Trought <k8s@trought.ca>
This commit is contained in:
ctrought
2023-03-31 19:08:10 -04:00
parent 3907495a42
commit e39a8f6bcf
3 changed files with 52 additions and 26 deletions
+1 -1
View File
@@ -148,7 +148,7 @@ func startReloader(cmd *cobra.Command, args []string) {
var controllers []*controller.Controller
for k := range kube.ResourceMap {
if ignoredResourcesList.Contains(k) {
if ignoredResourcesList.Contains(k) || (len(namespaceLabelSelector) == 0 && k == "namespaces") {
continue
}