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

Cron: Target don't scale down if start and end are given same #2031

Closed
Ritikaa96 opened this issue Aug 12, 2021 · 0 comments · Fixed by #2032
Closed

Cron: Target don't scale down if start and end are given same #2031

Ritikaa96 opened this issue Aug 12, 2021 · 0 comments · Fixed by #2032
Labels
bug Something isn't working

Comments

@Ritikaa96
Copy link
Contributor

Report

During testing when we apply same start and end time, the target scale up but doesn't scale down.
Applied :

start: "31 * * * *"      
end: "31 * * * * " 

Expected Behavior

Cron should either give a warning on applying SO or target should scale down after the scheduled time.

Actual Behavior

Target does not scale down at all until SO is removed or changed.

Steps to Reproduce the Problem

  1. Apply target Deployment
  2. Apply the following ScaledObject configuration:
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  name: cron-scaledobject
  labels:
    deploymentName:dummy-deployment
spec:
  maxReplicaCount: 4
  pollingInterval: 3  
  cooldownPeriod:  5
  scaleTargetRef:
    name: nginx-deployment
  triggers:
    - type: cron
      metadata:
        timezone: Asia/Kolkata  # The acceptable values would be a value from the IANA Time Zone Database.
        start: "31 * * * *"      
        end: "31 * * * * "         
        desiredReplicas: "3"
  1. check target deployment replica by kubectl get deployment

Logs from KEDA operator

2021-08-12T12:59:22.358Z	INFO	controllers.ScaledObject	Reconciling ScaledObject	{"ScaledObject.Namespace": "default", "ScaledObject.Name": "cron-scaledobject"}
2021-08-12T12:59:22.485Z	INFO	controllers.ScaledObject	Updated HPA according to ScaledObject	{"ScaledObject.Namespace": "default", "ScaledObject.Name": "cron-scaledobject", "HPA.Namespace": "default", "HPA.Name": "keda-hpa-cron-scaledobject"}
2021-08-12T12:59:22.485Z	INFO	controllers.ScaledObject	Initializing Scaling logic according to ScaledObject Specification	{"ScaledObject.Namespace": "default", "ScaledObject.Name": "cron-scaledobject"}
2021-08-12T12:59:22.499Z	INFO	controllers.ScaledObject	Reconciling ScaledObject	{"ScaledObject.Namespace": "default", "ScaledObject.Name": "cron-scaledobject"}
2021-08-12T12:59:27.083Z	INFO	controllers.ScaledObject	Reconciling ScaledObject	{"ScaledObject.Namespace": "default", "ScaledObject.Name": "cron-scaledobject"}

No Error

KEDA Version

2.4.0

Kubernetes Version

1.21

Platform

Other

Scaler Details

Cron

Anything else?

None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant