Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webhook: cache miss fallback to direct client for ScaledObject #1478

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions content/docs/2.16/operate/admission-webhooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ By default, the admission webhooks are registered with `failurePolicy: Ignore`,

In particular, the admission webhooks for HPA ownership validation can be skipped by setting the annotation `validations.keda.sh/hpa-ownership` to `"false"`. Be cautious when doing so as it exposes the system to potential risks.

### Cache Miss with Fallback to Direct Client for ScaledObject

When validation enforcement is enabled, it's possible to run into a race condition when `ScaledObject` is part of the same deployment artifact as the `scaleTargetRef` (see also issue: [#5973](https://github.com/kedacore/keda/issues/5973)). For this purpose it's possible to configure additional argument for the webhook `Deployment`:
```
--cache-miss-to-direct-client=true
```
This will ensure that if getting the `scaleTargetRef` from the cached client returns `IsNotFound` error, webhook will attempt to getting the object directly from Kubernetes API.
wozniakjan marked this conversation as resolved.
Show resolved Hide resolved


## Custom Validations using Kubernetes ValidatingAdmissionPolicy

> ⚠️ FEATURE STATE: Kubernetes v1.30 [stable]
Expand Down
Loading