Repository navigation
fix(keda): allow webhook to get HPAs - #938
avneetbansal-aws wants to merge 1 commit into
Conversation
The webhook ClusterRole grants only list and watch on autoscaling horizontalpodautoscalers. With cache-miss-to-direct-client enabled, getFromCacheOrDirect falls back to a direct Get when the cached read is NotFound, which is always the case for a new ScaledObject, so the request is denied as forbidden. Add the get verb. Fixes kedacore/keda#8386 Tests: helm template was not run (helm is not installed in this environment). Change is one added verb in a ClusterRole template, checked by git diff only. No chart version bump, per CONTRIBUTING.md. Signed-off-by: avneetbansal-aws <284363899+avneetbansal-aws@users.noreply.github.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
The webhook ClusterRole grants only list and watch on horizontalpodautoscalers. When the ScaledObject admission webhook looks up an HPA and the informer cache has not yet seen it, the webhook falls back to a direct API read, which needs the get verb. Without it, that fallback is denied with a forbidden error and the ScaledObject admission can fail. This change adds get to the horizontalpodautoscalers rule in keda/templates/webhooks/clusterrole.yaml. Nothing else is modified and the chart version is not bumped, since individual PRs do not need to do that.
Fixes kedacore/keda#8386
Treating a cache NotFound as final inside the webhook is an alternative fix on the KEDA side. Maintainers may prefer that approach, and this RBAC change can be closed if so.
I could not run helm template locally because helm is not installed in my environment, so the change was checked by reading the diff only. It is a one-line addition to an existing verbs list.
Checklist