Configure storage for rate limiting
To configure a shared redis datastore for limitador so you can persist rate limit counters in a multicluster environment.
Configure Redis storage for rate limiting
To configure persistence for rate limit counters in a multicluster environment, you must configure the connection details for your shared Redis-based datastore. This datastore makes shared rate limit counters for the Limitador Operator component of Connectivity Link persistent.
|
Important
|
You must configure connection details for your shared Redis-based datastore on each OpenShift Container Platform cluster that you want to use Connectivity Link for rate limiting. |
-
You installed Connectivity Link on one or more clusters.
-
You have a shared Redis-based datastore.
-
You installed the OpenShift CLI (
oc). -
You have write access to the OpenShift Container Platform namespaces you need to work with.
-
You have access to external or on-premise DNS.
-
You created a
Gatewayobject. -
You configured your policies and
HTTProutes.
-
Set the following environment variable to your shared Redis-based instance URL:
$ export REDIS_URL=rediss://user:xxxxxx@some-redis.com:10340Include the appropriate URI scheme for your environment, for example:
-
Secure Redis:
rediss:// -
Standard Redis:
redis://
-
-
Create a Secret resource for your Redis URL as follows:
$ oc -n kuadrant-system create secret generic redis-config \ --from-literal=URL=$REDIS_URL -
Update your Limitador custom resource to use the Secret that you created as follows:
$ oc patch limitador limitador --type=merge -n kuadrant-system -p ' spec: storage: redis: configSecretRef: name: redis-config '