diff --git a/cmd/fluent-manager/main.go b/cmd/fluent-manager/main.go index 4d43ba231..b8ed7b97d 100644 --- a/cmd/fluent-manager/main.go +++ b/cmd/fluent-manager/main.go @@ -17,12 +17,11 @@ limitations under the License. package main import ( + "errors" "flag" "os" "strings" - "errors" - "github.com/joho/godotenv" "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/metrics/server" @@ -105,6 +104,8 @@ func main() { config := cache.Config{} namespacedController = true namespaces := strings.Split(watchNamespaces, ",") + + ctrlOpts.Cache.DefaultNamespaces = make(map[string]cache.Config) for _, namespace := range namespaces { ctrlOpts.Cache.DefaultNamespaces[namespace] = config }