INNER CODE UNIT · Go
getWatchNamespaceConfig
SeldonIO/seldon-core · operator/main.go:65
func getWatchNamespaceConfig(namespace, watchNamespaces string, clusterwide bool) map[string]cache.Config {
configs := make(map[string]cache.Config)
if !clusterwide {
setupLog.Info("Watching namespace", "namespace", namespace)
configs[namespace] = cache.Config{}
return configs
}
if watchNamespaces == "" {
setupLog.Info("Clusterwide mode enabled, watching all namespaces")
return configs
}
setupLog.Info("Clusterwide mode enabled, watching namespaces", "namespaces", watchNamespaces)
nsSet := make(map[string]struct{})
for _, ns := range strings.Split(watchNamespaces, ",") {