-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Report
Certain use cases require the usage of server side dry-run request to validate manifests at Kubernetes API server side, a simple way of simulating that would be, when using a helm chart, to execute the following:
helm -n default template release-name some-chart-name | kubectl -n default apply -f - --dry-run=server
Assuming the helm chart has the following:
- A
ScaledObjectdefined for ascaleTargetRefof theDeploymentkind. - The
ScaledObjectis defining acpuand/ormemorytrigger.
The kubectl command is going to fail with the following error:
Error from server (NotFound): error when creating "STDIN": admission webhook "vscaledobject.kb.io" denied the request: Deployment.apps "some-deployment" not found
Expected Behavior
I would expect, when in dry-run mode, the admission webhook to succeed without requiring the deployment to exist, meaning the webhook wouldn't check by a side effect during dry-run mode.
Actual Behavior
The admission webhook is failing due side effects when in dry-run mode, side effects should only be checked when the request is not in dry-run mode.
Steps to Reproduce the Problem
- Create a helm chart with a valid ScaledObject using a Deployment or StatefulSet as a target
- Define a
cpuormemorytrigger to the ScaledObject - Execute
helm -n default template release-name some-chart-name | kubectl -n default apply -f - --dry-run=server
Logs from KEDA operator
example
KEDA Version
2.12.1
Kubernetes Version
1.26
Platform
Amazon Web Services
Scaler Details
CPU, memory
Anything else?
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done