|
| 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="enabling-postgresql-persistence_{context}"] |
| 6 | += Enabling PostgreSQL persistence |
| 7 | + |
| 8 | +Modify the `OLSConfig` custom resource (CR) file to enable PostgreSQL persistence for the {ols-long} service. |
| 9 | + |
| 10 | +.Prerequisites |
| 11 | + |
| 12 | +* You are logged in to the {ocp-product-title} web console as a user account with permission to create a cluster-scoped CR file, such as a user with the `cluster-admin` role. |
| 13 | +
|
| 14 | +* You have installed the {ols-long} Operator. |
| 15 | +
|
| 16 | +* You have configured the large language model provider. |
| 17 | +
|
| 18 | +.Procedure |
| 19 | + |
| 20 | +. In the {ocp-product-title} web console, click *Operators* -> *Installed Operators*. |
| 21 | + |
| 22 | +. Select *All Projects* in the *Project* list at the top of the screen. |
| 23 | + |
| 24 | +. Click *{ols-long} Operator*. |
| 25 | + |
| 26 | +. Click *OLSConfig*, then click the `cluster` configuration instance in the list. |
| 27 | + |
| 28 | +. Click the *YAML* tab. |
| 29 | + |
| 30 | +. Insert the `spec.ols.storage` YAML code. |
| 31 | ++ |
| 32 | +.Example `OLSconfig` CR file |
| 33 | +[source,yaml,subs="attributes,verbatim"] |
| 34 | +---- |
| 35 | +apiVersion: ols.openshift.io/v1alpha1 |
| 36 | +kind: OLSConfig |
| 37 | +metadata: |
| 38 | + name: cluster |
| 39 | + namespace: openshift-lightspeed |
| 40 | +spec: |
| 41 | + llm: |
| 42 | + providers: |
| 43 | +... |
| 44 | + ols: |
| 45 | + storage: {} <1> |
| 46 | +---- |
| 47 | +<1> The class depends on the existing instances of the storage class in the cluster. If you leave the storage class empty, {ols-short} uses default values. The persistent volume allocated for the PostgreSQL database is 1 GB in size and uses the storage class of the default cluster. Specify empty braces for the `storage` parameter to use the default values. |
| 48 | ++ |
| 49 | +If you want to change the `size` and `class` parameters, you can independently specify an explicit value for the parameter. |
| 50 | ++ |
| 51 | +[source,yaml,subs="attributes,verbatim"] |
| 52 | +---- |
| 53 | +ols: |
| 54 | + storage: |
| 55 | + size: 768Mi <1> |
| 56 | + class: gp2-csi <2> |
| 57 | +---- |
| 58 | +<1> Specifies the size of the Requested Volume. If the size is not specified, the default value is 1 GB. |
| 59 | +<2> Specifies the Storage Class of the Requested Volume. If no class is specified, the storage class uses the default storage class setting for the cluster. |
| 60 | + |
| 61 | +. Click *Save*. |
0 commit comments