Mutating Webhook Not Triggered on Deployment Scaling Events Controlled by KEDA ScaledObject #6341
Unanswered
weidalin
asked this question in
Q&A / Need Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description: I have configured a MutatingWebhookConfiguration to intercept CREATE and UPDATE operations on Deployment resources that have the label app-gpu-device: nvidia-a800. The Webhook modifies the priorityClassName attribute to assign a higher priority.
The Webhook configuration is as follows:
The Webhook logic modifies the Deployment using a JSONPatchEntry to change the priorityClassName:
Problem:
The Webhook triggers as expected when I manually edit the Deployment (e.g., changing the replicas field). However, when the Deployment is scaled by modifying a KEDA ScaledObject (e.g., adjusting minReplicas and maxReplicas to scale the Deployment from 1 to 2 replicas), the Webhook is not triggered.
I verified that the Deployment controlled by the KEDA ScaledObject is the same one that can be manually edited to trigger the Webhook.
Question:
Does KEDA's ScaledObject or HPA bypass MutatingWebhookConfiguration, preventing the Webhook from intercepting UPDATE events during scaling? If so, is there an approach to ensure that updates made by KEDA or HPA to Deployment resources can be intercepted by a Webhook or another solution to modify priorityClassName under these circumstances?
Beta Was this translation helpful? Give feedback.
All reactions