Skip to content

Commit e319c54

Browse files
authored
Merge pull request kubernetes#129298 from omerap12/fix-discovery-controller-panic
apiextensions: replace panic with error handling in DiscoveryController
2 parents 732fc19 + 4411a3f commit e319c54

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,8 @@ func (c *DiscoveryController) Run(stopCh <-chan struct{}, synchedCh chan<- struc
320320
utilruntime.HandleError(fmt.Errorf("timed out waiting for initial discovery sync"))
321321
return
322322
}
323-
panic(fmt.Errorf("unexpected error: %v", err))
323+
utilruntime.HandleError(fmt.Errorf("unexpected error: %w", err))
324+
return
324325
}
325326
close(synchedCh)
326327

0 commit comments

Comments
 (0)