chia7712 commented on code in PR #850:
URL: https://github.com/apache/yunikorn-k8shim/pull/850#discussion_r1616231105


##########
pkg/admission/conf/am_conf.go:
##########
@@ -118,7 +119,11 @@ func NewAdmissionControllerConf(configMaps 
[]*v1.ConfigMap) *AdmissionController
 }
 
 func (acc *AdmissionControllerConf) RegisterHandlers(configMaps 
informersv1.ConfigMapInformer) {
-       configMaps.Informer().AddEventHandler(&configMapUpdateHandler{conf: 
acc})
+       _, err := 
configMaps.Informer().AddEventHandler(&configMapUpdateHandler{conf: acc})
+       if err != nil {
+               log.Log(log.AdmissionConf).Fatal("Failed to create Register 
handler", zap.Error(err))
+               os.Exit(1)

Review Comment:
   Maybe we can return error instead of breaking program here, since the caller 
may want to do something cleanup before leaving.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to