keda icon indicating copy to clipboard operation
keda copied to clipboard

Support paused-replicas annotation as empty string value

Open benjackwhite opened this issue 1 month ago • 2 comments

Proposal

The paused-replicas needs to be an integer otherwise it causes a ScaledObjectCheckFailed. The issue is when using ArgoCD in particular you may want to override this annotation in order to fix the replica scaling and then have it be indicated as "out of sync" by Argo.

This isn't possible if the field is not explicitly defined in the manifest and as null fields don't count, there is no way of supporting this. If we could treat empty string as "no value" then this would enable setting it in git and allowing Argo to notice the diff when changes are manually applied.

An alternative would be to support a value like false to make it more explicit than empty string.

Use-Case

The Argo use case is the big one, but I could imagine there are other CD concepts that use the same idea of diffing manifests to determine if drift has occured.

Is this a feature you are interested in implementing yourself?

Maybe

Anything else?

No response

benjackwhite avatar Nov 24 '25 13:11 benjackwhite

I think I understand what you're trying to say. We often comment out or on the rule to activate it.

Besides that, I just submit a PR to ArgoCD to be able to set the paused-replicas via the UI: https://github.com/argoproj/argo-cd/pull/25302

I think that will help you too. Or do you really want that annotation part via Git?

rickbrouwer avatar Nov 24 '25 13:11 rickbrouwer

I think that will help you too. Or do you really want that annotation part via Git?

For us it would really help as its slightly different to the related PR for Argo. Primarily we wan to be able to at a glance see which apps are out of sync which isn't really possible without having an actual value in the metadata. For example we have the normal /paused value always set to false so that if anyone changes it (often during incident response) it shows up as out of sync and you are just one quick "sync" a way from going back to the desired state. This isn't pausible for replica count though.

So for example with that Argo PR, the button would exist (we have something similar in a custom UI extension) to set the paused replicas value but it wouldn't show up as being out of sync. But with this added functionality it would show as out of sync.

benjackwhite avatar Nov 24 '25 13:11 benjackwhite