allow kb granularity for lua shared dicts (#6750)

Update internal/ingress/controller/template/configmap.go

Co-authored-by: Ricardo Katz <rikatz@users.noreply.github.com>

Co-authored-by: Ricardo Katz <rikatz@users.noreply.github.com>
This commit is contained in:
Matthew Silverman 2021-08-12 14:13:50 -04:00 committed by GitHub
parent b510b0e930
commit b591adac48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 140 additions and 34 deletions

View file

@ -1046,6 +1046,12 @@ For example following will set default `certificate_data` dictionary to `100M` a
lua-shared-dicts: "certificate_data: 100, my_custom_plugin: 5"
```
You can optionally set a size unit to allow for kilobyte-granularity. Allowed units are 'm' or 'k' (case-insensitive), and it defaults to MB if no unit is provided. Here is a similar example, but the `my_custom_plugin` dict is only 512KB.
```
lua-shared-dicts: "certificate_data: 100, my_custom_plugin: 512k"
```
_References:_
[http://nginx.org/en/docs/http/ngx_http_core_module.html#limit_rate_after](http://nginx.org/en/docs/http/ngx_http_core_module.html#limit_rate_after)