Giter Site home page Giter Site logo

Error on create HPA resource about bonny HOT 7 CLOSED

sleipnir avatar sleipnir commented on August 16, 2024
Error on create HPA resource

from bonny.

Comments (7)

mruoss avatar mruoss commented on August 16, 2024

Well - look at the error message:

horizontalpodautoscalers.autoscaling "shopping-cart-hpa-autoscaler" is forbidden: User "system:serviceaccount:eigr-functions:eigr-functions-controller" cannot patch resource "horizontalpodautoscalers" in API group "autoscaling" in the namespace "default"

You have to configure RBAC correctly!

from bonny.

sleipnir avatar sleipnir commented on August 16, 2024

Well - look at the error message:

horizontalpodautoscalers.autoscaling "shopping-cart-hpa-autoscaler" is forbidden: User "system:serviceaccount:eigr-functions:eigr-functions-controller" cannot patch resource "horizontalpodautoscalers" in API group "autoscaling" in the namespace "default"

You have to configure RBAC correctly!

Thanks for answer @mruoss. The more question is how configure RBAC on bonny correctly?

from bonny.

mruoss avatar mruoss commented on August 16, 2024

There is no RBAC configuration for bonny. The configuration of RBAC depends on the operator you're implementing. Your operator runs as a specific service account. This service account needs permissions to do what your operator needs to do.

You can use @rule constants in your controllers if you're generating the manifest with bonny. Maybe also have a look at Cory's tutorial. Part 2 has info on RBAC.

from bonny.

sleipnir avatar sleipnir commented on August 16, 2024

I don't think that's it, who creates the kubernetes settings for me is Bonny, he via rule adds the RBACK settings for me. That's how I was able to add the other permissions to my operator. However for the HPA I could not create via rule what I need.

from bonny.

sleipnir avatar sleipnir commented on August 16, 2024

I left a link to my code here in this Issue where you can see that I added the @rule. I can change the manifest manually, but I don't want to have to.

from bonny.

mruoss avatar mruoss commented on August 16, 2024

Oh I see. So... maybe a typo? => horizontalpodautoscaler vs horizontalpodautoscalers (singular vs plural). Compare the error msg and your rule.

from bonny.

sleipnir avatar sleipnir commented on August 16, 2024

The correct configuration for autoscaler is:

@rule {"autoscaling", ["horizontalpodautoscalers"], ["*"]}

@mruoss thanks for your attention

from bonny.

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.