pbacsko commented on a change in pull request #308:
URL: 
https://github.com/apache/incubator-yunikorn-k8shim/pull/308#discussion_r725108811



##########
File path: pkg/plugin/admissioncontrollers/webhook/admission_controller.go
##########
@@ -229,38 +234,47 @@ func (c *admissionController) validateConf(ar 
*v1beta1.AdmissionReview) *v1beta1
                                },
                        }
                }
+
+               if skipped {
+                       return &v1beta1.AdmissionResponse{
+                               Allowed: true,
+                               Result: &metav1.Status{
+                                       Message: skippedByController,
+                               },
+                       }
+               }
        }
 
        return &v1beta1.AdmissionResponse{
                Allowed: true,
        }
 }
 
-func (c *admissionController) validateConfigMap(cm *v1.ConfigMap) error {
+func (c *admissionController) validateConfigMap(cm *v1.ConfigMap) (error, 
bool) {

Review comment:
       This can work, however, if we follow your suggestion, we can't print 
anything in `serve()`, because we don't know why we have allowed:true. It's 
either because the configmap is not ours, or because its ours and the contents 
are OK. 




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