Skip to content

Commit 3977957

Browse files
Merge pull request #93627 from rh-tokeefe/OLS-1754
OLS-1754: Document PostgreSQL persistence configuration
2 parents 2a44631 + a69cb65 commit 3977957

File tree

3 files changed

+76
-0
lines changed

3 files changed

+76
-0
lines changed

configure/ols-configuring-openshift-lightspeed.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ include::modules/ols-about-cluster-interaction.adoc[leveloffset=+1]
2828
include::modules/ols-enabling-cluster-interaction.adoc[leveloffset=+2]
2929
include::modules/ols-tokens-and-token-quota-limits.adoc[leveloffset=+1]
3030
include::modules/ols-activating-token-quota-limits.adoc[leveloffset=+2]
31+
include::modules/ols-about-postgresql-persistence.adoc[leveloffset=+1]
32+
include::modules/ols-enabling-postgresql-persistence.adoc[leveloffset=+2]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Module included in the following assemblies:
2+
// * lightspeed-docs-main/configure/ols-configuring-openshift-lightspeed.adoc
3+
4+
:_mod-docs-content-type: CONCEPT
5+
[id="about-postgresql-persistence_{context}"]
6+
= About {ols-short} and PostgreSQL persistence
7+
8+
Using PostgreSQL persistence, you can save data, such as {ols-long} conversation history or quota usage, to a PostgreSQL database so that the data is retained in persistent volume. With PostgreSQL persistence, the data persists if the PostgreSQL pod restarts or is rescheduled in your {ocp-product-title} installation.
9+
10+
:FeatureName: PostgreSQL persistence
11+
include::snippets/technology-preview.adoc[]
12+
13+
PostgreSQL persistence is disabled by default. To enable the functionality, add the `spec.ols.storage` specification to the `OLSConfig` custom resource (CR).
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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

Comments
 (0)