kubernetes.core icon indicating copy to clipboard operation
kubernetes.core copied to clipboard

client side rate limiting

Open alaypatel07 opened this issue 5 years ago • 4 comments

SUMMARY

kubernetes client-go has QPS and Burst configurations that will allow us to rate-limit the number of request hitting the api-server on client side. It would be great if the k8s module can be backed by rate-limiting client to stop a rogue playbook bring down api-server

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

probably all components that use the client

ADDITIONAL INFORMATION
    // QPS indicates the maximum QPS to the master from this client.
    // If it's zero, the created RESTClient will use DefaultQPS: 5
    QPS float32
    // Maximum burst for throttle.
    // If it's zero, the created RESTClient will use DefaultBurst: 10.
    Burst int

alaypatel07 avatar Aug 06 '20 21:08 alaypatel07

I see the value of this safety net, but I'm not sure how Ansible would facilitate something like this given the distributed and forking nature of its module system. I'll defer to @Akasurde and @maxamillion who have a deeper understanding of the engines internals to see what they think.

tima avatar Aug 06 '20 22:08 tima

cc @fabianvf

tima avatar Aug 12 '20 17:08 tima

@fabianvf Are still want to implement this by yourself? This feature can be implemented easily on the top of the turbo mode.https://github.com/ansible-collections/community.kubernetes/pull/313

alinabuzachis avatar Jan 13 '21 13:01 alinabuzachis

@alinabuzachis I think I'm assigned to a lot of these issues just as a default as I was the primary maintainer for quite a while, certainly won't be able to pick this one up myself anytime soon

fabianvf avatar Jan 13 '21 18:01 fabianvf