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


##########
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:
   Update to return error for NewNamespaceCache and RegisterHandler functions 
back to main(), and it will stop the process. Check the new commit.
   Another question: what about the cleanup here?



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