-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Creating a new ScaledObject with the “paused” annotation is not working #6421
Comments
We have a similar issue with pausing. If we add the
Which comes from this code The Active type is
|
I believe there is a bug, but I am unable to reproduce it. Would you be able to provide the ScaledObject YAML? |
I can only reproduce this if I specify both in a conflicting situation (both
I think it would be clearer if |
Hi, @SpiritZhou, @rickbrouwer. This issue occurred when paused was used during the initial creation of a new resource. apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
annotations:
autoscaling.keda.sh/paused: 'false'
labels:
scaledobject.keda.sh/name: resource-name-1
name: resource-name-1
namespace: deployment-dev
spec:
advanced:
horizontalPodAutoscalerConfig:
behavior:
scaleDown:
policies:
- periodSeconds: 60
type: Percent
value: 30
selectPolicy: Min
stabilizationWindowSeconds: 300
scaleUp:
policies:
- periodSeconds: 15
type: Pods
value: 4
- periodSeconds: 15
type: Percent
value: 100
selectPolicy: Max
stabilizationWindowSeconds: 0
name: resource-name-1
scalingModifiers: {}
cooldownPeriod: 300
maxReplicaCount: 3
minReplicaCount: 1
pollingInterval: 30
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: resource-name-1
triggers:
- metadata:
desiredReplicas: '1'
end: 30 1 * * *
name: lateNight
start: 0 1 * * *
timezone: Asia/Seoul
type: cron
- metadata:
desiredReplicas: '3'
end: 30 9 * * *
name: earlyMorning
start: 0 9 * * *
timezone: Asia/Seoul
type: cron
- metadata:
desiredReplicas: '3'
end: 0 16 * * *
name: earlyEvening
start: 30 15 * * *
timezone: Asia/Seoul
type: cron
- metadata:
value: '55'
metricType: Utilization
type: cpu Please feel free to let me know if you need any additional information. |
I use Keda 2.16.0 (with ArgoCD v2.12.8). The only thing I can reproduce is the following: When i initially place the above scaledObject with only a
When I look at the code, an initial creation with the value With a little adjustment in the |
Thank you for checking this out. @rickbrouwer. Unfortunately, if you create a scaledObject with the paused annotation set to true,
Here is a video from the Lens app demonstrating the issue. KEDA_.mov |
The tricky thing is that the paused status with SO will be changed from false to true. However, the kada operator will not update the paused status proactively. |
Report
There is an issue where, after creating the initial ScaledObject with the “paused” annotation set, when resuming, the ScaledObject correctly generates the HPA, but the "Paused" condition state becomes True again, and the HPA remains in place.
Expected Behavior
Init condition(Create the ScaledObject)
Ready: True
Active: True
Fallback: False
Paused: True
HPA: None
After resume(Paused Annotation Removed)
Ready: True
Active: True
Fallback: False
Paused: False
HPA: New one created by the scaled object
Actual Behavior
Init condition(Create the ScaledObject)
Ready: True
Active: Unknown
Fallback: Unknown
Paused: True
HPA: None
After resume(Paused Annotation Removed)
2-1. Init
Ready: True
Active: Unknown
Fallback: Unknown
Paused: False
HPA: New one created by scaled object
2-2. After a few seconds
Ready: True
Active: Unknown
Fallback: False
Paused: True
HPA: New one created by scaled object
Here is a video from the Lens app demonstrating the issue
Steps to Reproduce the Problem
Logs from KEDA operator
KEDA Version
2.15.1
Kubernetes Version
1.30
Platform
Amazon Web Services
Scaler Details
cpu, memory, cron
Anything else?
Hi,
I’ve been using KEDA effectively, and I have a question.
Has the pattern of initially creating a ScaledObject resource with a paused annotation by default and resuming it as needed been considered?
If there are any parts of the code you suspect might be relevant, please let me know, and I’ll try making modifications myself.
Thank you!
The text was updated successfully, but these errors were encountered: