From 9f210a02f9e13ff9255866739de97d93614210d4 Mon Sep 17 00:00:00 2001 From: Alex Leong Date: Fri, 27 Oct 2023 08:18:33 -0700 Subject: [PATCH] Destination controller should initialize jobs metadata api (#11541) The destination controller uses the metadata API to retrieve Job metadata, but does not properly initialize the metadata API to sync jobs. This results in error messages in the log and a fallback to using direct API calls instead of the informer cache. We properly initialize the jobs informer so that this works as expected. Signed-off-by: Alex Leong --- controller/cmd/destination/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/cmd/destination/main.go b/controller/cmd/destination/main.go index 68bb191f47575..b36befc25de2a 100644 --- a/controller/cmd/destination/main.go +++ b/controller/cmd/destination/main.go @@ -117,7 +117,7 @@ func Main(args []string) { log.Fatalf("Failed to initialize K8s API: %s", err) } - metadataAPI, err := k8s.InitializeMetadataAPI(*kubeConfigPath, "local", k8s.Node, k8s.RS) + metadataAPI, err := k8s.InitializeMetadataAPI(*kubeConfigPath, "local", k8s.Node, k8s.RS, k8s.Job) if err != nil { log.Fatalf("Failed to initialize Kubernetes metadata API: %s", err) }