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

Up-down scaling behavior configuration is ignored in Kubernetes version >= 18.0 #1176

Closed
dkuzmianok-sc opened this issue Sep 21, 2020 · 3 comments · Fixed by #1177
Closed
Assignees
Labels
bug Something isn't working

Comments

@dkuzmianok-sc
Copy link

dkuzmianok-sc commented Sep 21, 2020

Scaling up-down behavior configuration #805 is ignored in Kubernetes 19.0 and 18.8 (only 2 versions I checked on).
Here is info from logs

2020-09-21T07:17:45.828Z        INFO    controllers.ScaledObject        Creating a new HPA      {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kafka-receiver-scaledobject", "HPA.Namespace": "default", "HPA.Name": "keda-hpa-kafka-receiver-scaledobject"}
2020-09-21T07:17:45.968Z        INFO    controllers.ScaledObject        Warning: Ignoring scaledObject.spec.behavior, it is only supported on kubernetes version >= 1.18 {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kafka-receiver-scaledobject", "kubernetes.version": "1.19"}
2020-09-21T07:17:45.968Z        INFO    controllers.ScaledObject        Initializing Scaling logic according to ScaledObject Specification      {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kafka-receiver-scaledobject"}

Expected Behavior

Scaling behavior should be functioning

Actual Behavior

It's not. Logs confirm that.

Steps to Reproduce the Problem

  1. Install keda, create ScaledObject with scaledDown, scaleUp advanced config.
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  name: kafka-receiver-scaledobject
spec:
  scaleTargetRef:
    name: test
  pollingInterval: 5
  cooldownPeriod:  5
  minReplicaCount: 1
  maxReplicaCount: 4
  advanced:                                          # Optional. Section to specify advanced options
    horizontalPodAutoscalerConfig:                   # Optional. Section to specify HPA related options
      behavior:                                      # Optional. Use to modify HPA's scaling behavior
        scaleDown:
          stabilizationWindowSeconds: 1000
          policies:
          - type: Percent
            value: 1
            periodSeconds: 1000
          - type: Pods
            value: 1
            periodSeconds: 1000
          selectPolicy: Disabled
        scaleUp:
          stabilizationWindowSeconds: 1000
          policies:
          - type: Pods
            value: 1
            periodSeconds: 1000    
          policies:
          - type: Percent
            value: 1
            periodSeconds: 1000   
          selectPolicy: Disabled
  triggers:
  - type: prometheus
    metadata:
      serverAddress: http://prometheus.default:9090
      metricName: sender-metric-test
      threshold: '10'
      query: sum(irate(spring_integration_send_seconds_count{application_name="kafka-receiver"}[1m])) * 10
  1. Test it, see that it's not functioning, see logs.

Specifications

  • KEDA Version: 2.0.0 beta
  • Platform & Version: tested in Minikube
  • Kubernetes Version: 19.0
  • Scaler(s): Prometheus
@dkuzmianok-sc dkuzmianok-sc added the bug Something isn't working label Sep 21, 2020
@dkuzmianok-sc dkuzmianok-sc changed the title Up-down scaling behaviour configuration is ignored in kubernetes version >= 18.0 Up-down scaling behavior configuration is ignored in Kubernetes version >= 18.0 Sep 21, 2020
@zroubalik
Copy link
Member

@dkuzmianok-sc Hm, it must be something with Minikube version string, would you mind sharing the beginning of the Operator log? There should be a log message like this:
{"level":"info","ts":1600678755.6548228,"logger":"controllers.ScaledObject","msg":"Running on Kubernetes 1.18+"}

@zroubalik
Copy link
Member

@dkuzmianok-sc there was a small bug in the version resolving, failing on some corner cases. Thanks for finding this! Will send a PR in a moment.

@dkuzmianok-sc
Copy link
Author

@zroubalik

2020-09-21T07:12:49.093Z INFO controller-runtime.metrics   metrics server is starting to listen    {"addr": ":8080"}
2020-09-21T07:12:49.095Z INFO controllers.ScaledObject     Running on Kubernetes 1.19
2020-09-21T07:12:49.095Z INFO setup   Starting manager
2020-09-21T07:12:49.095Z INFO setup   KEDA Version: v2
2020-09-21T07:12:49.095Z INFO setup   KEDA Commit: 717aab81817f0d9b6d02b0e6d1499367c751faf2
2020-09-21T07:12:49.095Z INFO setup   Go Version: go1.15.1
2020-09-21T07:12:49.095Z INFO  setup   Go OS/Arch: linux/amd64

Here are logs if still needed.
Thank you for quick response.

SpiritZhou pushed a commit to SpiritZhou/keda that referenced this issue Jul 18, 2023
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.

2 participants