wilfred-s commented on code in PR #966:
URL: https://github.com/apache/yunikorn-k8shim/pull/966#discussion_r2567664303


##########
pkg/admission/admission_controller.go:
##########
@@ -194,7 +194,16 @@ func (c *AdmissionController) processPod(req 
*admissionv1.AdmissionRequest, name
                log.Log(log.Admission).Info("bypassing namespace", 
zap.String("namespace", namespace))
                return admissionResponseBuilder(uid, true, "", nil)
        }
-       patch = updateSchedulerName(patch)
+
+       // Only override default-scheduler unless override is enabled
+       if c.conf.GetOverrideCustomSchedulers() && pod.Spec.SchedulerName != 
constants.SchedulerName {

Review Comment:
   See earlier comments: this is not correct, default behaviour should not 
change. can be turned off if wanted. 2nd part of the check is not needed as we 
preserve existing behaviour



##########
pkg/admission/conf/am_conf.go:
##########
@@ -68,11 +69,12 @@ const (
        DefaultWebHookSchedulerServiceAddress = "yunikorn-service:9080"
 
        // filtering defaults
-       DefaultFilteringProcessNamespaces    = ""
-       DefaultFilteringBypassNamespaces     = "^kube-system$"
-       DefaultFilteringLabelNamespaces      = ""
-       DefaultFilteringNoLabelNamespaces    = ""
-       DefaultFilteringGenerateUniqueAppIds = false
+       DefaultFilteringProcessNamespaces        = ""
+       DefaultFilteringBypassNamespaces         = "^kube-system$"
+       DefaultFilteringLabelNamespaces          = ""
+       DefaultFilteringNoLabelNamespaces        = ""
+       DefaultFilteringGenerateUniqueAppIds     = false
+       DefaultFilteringOverrideCustomSchedulers = false

Review Comment:
   This must be a value of `true` as we want to preserve the existing 
behaviour. Override always unless we have turned this off and then we only 
change if empty or default-scheduler.



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