Test kas => GitLab rate limiter on staging

Definition of done

  • kas => GitLab API rate limiter is tested

Follow up of #297682 (closed)

Background

From #297682 (comment 507468284)

For the GitLab API, when rate limited, authorization requests time out and fail

To simulate this, we turned off the API request cache. API requests are cached for 5 minutes per kas instance per token (including auth), so one actually needs a huge amount of tokens to pull this off. The refill rate is 10 per second, so I think a single KAS instance can sustain

10 tokens/second  # refill rate
* 5 minutes         # auth request cache period
* 60 seconds/minute # unit conversion
= 3000 tokens

until auth requests may start to fail in the default setting.

Edited by Hordur Freyr Yngvason