From 22a24925aa5fd9a6f4fa2a4afd4488fcc43eb19e Mon Sep 17 00:00:00 2001 From: Robusta Runner Date: Fri, 30 Aug 2024 09:48:22 +0300 Subject: [PATCH] fixed bug when multiple CRDs are configured. --- pkg/controller/controller.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index a6e2c91d..c40d9e72 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -548,7 +548,8 @@ func Start(conf *config.Config, eventHandler handlers.Handler) { go c.Run(stopCh) } - for _, crd := range conf.CustomResources { + for _, curRes := range conf.CustomResources { + crd := curRes informer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {