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


##########
pkg/admission/conf/am_conf.go:
##########
@@ -118,7 +118,10 @@ 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})

Review Comment:
   It seems to me this error should be viewed as fatal, and we should propagate 
it to stop k8shime. 



##########
pkg/admission/namespace_cache.go:
##########
@@ -58,7 +59,10 @@ func NewNamespaceCache(namespaces 
informersv1.NamespaceInformer) *NamespaceCache
                nameSpaces: make(map[string]nsFlags),
        }
        if namespaces != nil {
-               
namespaces.Informer().AddEventHandler(&namespaceUpdateHandler{cache: nsc})
+               _, err := 
namespaces.Informer().AddEventHandler(&namespaceUpdateHandler{cache: nsc})

Review Comment:
   ditto. I don't think admission controller should start with those failures



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