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

httpscaledobjects does not trigger a change in the corresponding scaledobjects. #323

Closed
tpiperatgod opened this issue Nov 13, 2021 · 2 comments · Fixed by #402
Closed

httpscaledobjects does not trigger a change in the corresponding scaledobjects. #323

tpiperatgod opened this issue Nov 13, 2021 · 2 comments · Fixed by #402
Labels
bug Something isn't working stale-bot-ignore All issues that should not be automatically closed by our stale bot

Comments

@tpiperatgod
Copy link
Contributor

The httpscaledobjects resource does not trigger a change in the corresponding scaledobjects resource.(I'm not sure if this is a bug)

Expected Behavior

When I update an HSO resource, I want the corresponding SO resource to be updated as well.

Actual Behavior

When I update the HSO resource, the corresponding SO resource is not updated.

Steps to Reproduce the Problem

  1. Create a HSO

    kind: HTTPScaledObject
    apiVersion: http.keda.sh/v1alpha1
    metadata:
        name: xkcd
        namespace: keda
    spec:
        host: myhost.com
        scaleTargetRef:
            deployment: xkcd
            service: xkcd
            port: 8080
        replicas:
            min: 0
            max: 10

    The HSO and SO resource have been created.

    # kubectl get httpscaledobjects.http.keda.sh -n keda
    NAME   SCALETARGETDEPLOYMENTNAME   SCALETARGETSERVICENAME                               SCALETARGETPORT   MINREPLICAS   MAXREPLICAS   AGE    ACTIVE
    xkcd                               {"deployment":"xkcd","port":8080,"service":"xkcd"}                     0             10            173m
    
    # kubectl get scaledobjects.keda.sh -n keda
    NAME                            SCALETARGETKIND      SCALETARGETNAME                 MIN   MAX   TRIGGERS        AUTHENTICATION   READY   ACTIVE   FALLBACK   AGE
    keda-add-ons-http-interceptor   apps/v1.Deployment   keda-add-ons-http-interceptor   1     50    external                         True    True     False      3h19m
    xkcd-app                        apps/v1.Deployment   xkcd                            0     10    external-push                    True    False    False      173m
  2. Update the xkcd HSO with the following configuration.

    kind: HTTPScaledObject
    apiVersion: http.keda.sh/v1alpha1
    metadata:
        name: xkcd
        namespace: keda
    spec:
        host: myhost.com
        scaleTargetRef:
            deployment: xkcd
            service: xkcd
            port: 8080
        replicas:
            min: 5 # change spec.replicas.min to 5
            max: 10

    The HSO resource has been updated, but the SO resource has not.

    # kubectl get httpscaledobjects.http.keda.sh -n keda
    NAME   SCALETARGETDEPLOYMENTNAME   SCALETARGETSERVICENAME                               SCALETARGETPORT   MINREPLICAS   MAXREPLICAS   AGE    ACTIVE
    xkcd                               {"deployment":"xkcd","port":8080,"service":"xkcd"}                     5             10            177m
    
    # kubectl get scaledobjects.keda.sh -n keda
    NAME                            SCALETARGETKIND      SCALETARGETNAME                 MIN   MAX   TRIGGERS        AUTHENTICATION   READY   ACTIVE   FALLBACK   AGE
    keda-add-ons-http-interceptor   apps/v1.Deployment   keda-add-ons-http-interceptor   1     50    external                         True    True     False      3h23m
    xkcd-app                        apps/v1.Deployment   xkcd                            0     10    external-push                    True    False    False      177m

Specifications

  • KEDA Version: 2.4.0
  • KEDA HTTP Add-on Version: 0.2.0.RC1
  • Platform & Version: Ubuntu 18.04 LTS x86_64
  • Kubernetes Version: v1.21.5

I noticed that during the HSO reconciliation process, the corresponding SO resource is created via createScaledObjects(). But why not to update the SO when it already exists?

@tpiperatgod tpiperatgod added the bug Something isn't working label Nov 13, 2021
@arschles
Copy link
Collaborator

Thanks for the YAML diff @tpiperatgod. I was able to reproduce this behavior, and it is indeed a bug. I'll look into this and get back with a fix.

@stale
Copy link

stale bot commented Jan 15, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Jan 15, 2022
@arschles arschles added the stale-bot-ignore All issues that should not be automatically closed by our stale bot label Jan 20, 2022
@stale stale bot removed the stale All issues that are marked as stale due to inactivity label Jan 20, 2022
@arschles arschles modified the milestones: v0.3.0, v0.4.0 Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale-bot-ignore All issues that should not be automatically closed by our stale bot
Projects
None yet
2 participants