|
| 1 | +// Module included in the following assemblies: |
| 2 | +// * lightspeed-docs-main/configure/ols-configuring-openshift-lightspeed.adoc |
| 3 | + |
| 4 | +:_mod-docs-content-type: PROCEDURE |
| 5 | +[id="ols-activating-token-quota-limits_{context}"] |
| 6 | += Activating token quota limits |
| 7 | + |
| 8 | +Activate token quota limits for the {ols-long} service by defining key-value pairs in the `ConfigMap` resource. The {ols-long} pod mounts the `ConfigMap` resource as a volume, enabling access to the file stored within it. The `OLSConfig` custom resource (CR) references the `ConfigMap` resource to obtain the quota limit information. |
| 9 | + |
| 10 | +.Prerequisites |
| 11 | + |
| 12 | +* You have installed the the {ols-long} Operator. |
| 13 | +
|
| 14 | +* You have configured a large language model provider. |
| 15 | +
|
| 16 | +* A PostgreSQL database is configured and the {ols-long} service can access the database. |
| 17 | +
|
| 18 | +.Procedure |
| 19 | + |
| 20 | +. Open the {ols-long} `OLSconfig` CR file by running the following command: |
| 21 | ++ |
| 22 | +[source,terminal] |
| 23 | +---- |
| 24 | +$ oc edit olsconfig cluster |
| 25 | +---- |
| 26 | + |
| 27 | +. Modify the `spec.ols.quotaHandlersConfig` specification to include token quota limit information. |
| 28 | ++ |
| 29 | +.Example {ols-long} `OLSConfig` CR |
| 30 | +[source,yaml] |
| 31 | +---- |
| 32 | +apiVersion: ols.openshift.io/v1alpha1 |
| 33 | +kind: OLSConfig |
| 34 | +metadata: |
| 35 | + name: cluster |
| 36 | +spec: |
| 37 | + ols: |
| 38 | + quotaHandlersConfig: |
| 39 | + limitersConfig: |
| 40 | + - name: user_limits # <1> |
| 41 | + type: user_limiter |
| 42 | + initialQuota: 100000 # <2> |
| 43 | + quotaIncrease: 1000 # <3> |
| 44 | + period: 30 days |
| 45 | + - name: cluster_limits # <4> |
| 46 | + type: cluster_limiter |
| 47 | + initialQuota: 1000000 # <5> |
| 48 | + quotaIncrease: 100000 # <6> |
| 49 | + period: 30 days # <7> |
| 50 | +---- |
| 51 | +<1> Specifies the token limit for user account. |
| 52 | +<2> Specifies a token quota limit of 100,000 for each user over the time period specified in the `period` field. |
| 53 | +<3> Increases the token quota limit for the user by 1,000 at the end of the time period specified in the `period` field. |
| 54 | +<4> Specifies the token limit for a cluster. |
| 55 | +<5> Specifies a token quota limit of 1,000,000 for each cluster over the time period specified in the `period` field. |
| 56 | +<6> Increases the token quota limit for the cluster by 100,000 at the end of the time period specified in the `period` field. |
| 57 | +<7> Defines the amount of time that the scheduler waits before the period resets or the quota limit increases. |
| 58 | + |
| 59 | +. Click *Save*. |
| 60 | ++ |
| 61 | +The save operation saves the file and applies the changes to activate the token quota limits. |
0 commit comments