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


##########
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:
   Good insight. Many thanks. Allow NewNamespaceCache, RegisterHandlers 
functions to pass error back, and deal with the error in main(). The code is 
updated.



-- 
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