Coder Social home page Coder Social logo

Comments (5)

vinod827 avatar vinod827 commented on June 11, 2024

When triggers is set with an empty array in ScaledObject, KEDA doesn't validate this empty value and will create a default HPA with a default 80% averageUtilization CPU resource. This can mislead users.

hmmm....that's interesting. From where this 80% of averageUtilization for CPU is coming in the HPA?

from keda.

SpiritZhou avatar SpiritZhou commented on June 11, 2024

When triggers is set with an empty array in ScaledObject, KEDA doesn't validate this empty value and will create a default HPA with a default 80% averageUtilization CPU resource. This can mislead users.

hmmm....that's interesting. From where this 80% of averageUtilization for CPU is coming in the HPA?

It's K8s default behavior. When I create an HPA directly without metrics spec, k8s will create an HPA with 80% of averageUtilization for CPU resource.

HPA example:

apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: test
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: sut
  minReplicas: 1
  maxReplicas: 10

from keda.

vinod827 avatar vinod827 commented on June 11, 2024

So that means HPA should not be defaulted to as a scaling option when triggers are empty in the KEDA's ScaledObject

from keda.

JorTurFer avatar JorTurFer commented on June 11, 2024

I think that we should validate it as part of admission hooks and also raise an error in the operator. Adding default value is quite weird as it's totally unrelated with the given triggers. This doesn't happen just with empty triggers but also when there are some issues in the creation loop

from keda.

zroubalik avatar zroubalik commented on June 11, 2024

I agree, we should validate both on the Operator and validation webhook side. This is an ideal "good first issue " :)

from keda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.