You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: modules/dynamic-plugins/con-dynamic-plugins-cache.adoc
+90-5
Original file line number
Diff line number
Diff line change
@@ -13,10 +13,13 @@ When you enable dynamic plugins cache:
13
13
== Enabling the dynamic plugins cache
14
14
To enable the dynamic plugins cache in {product-very-short}, the plugins directory `dynamic-plugins-root` must be a persistent volume.
15
15
16
-
For Helm chart installations, a persistent volume named `dynamic-plugins-root` is automatically created.
16
+
=== Creating a PVC for the dynamic plugin cache by using the Operator
17
17
18
-
For operator-based installations, you must manually create the PersistentVolumeClaim (PVC) as follows:
18
+
For operator-based installations, you must manually create the persistent volume claim (PVC) by replacing the default `dynamic-plugins-root` volume with a PVC named `dynamic-plugins-root`.
19
19
20
+
.Procedure
21
+
. Create the persistent volume definition and save it to a file, such as `pvc.yaml`. For example:
22
+
+
20
23
[source,yaml]
21
24
----
22
25
kind: PersistentVolumeClaim
@@ -30,8 +33,23 @@ spec:
30
33
requests:
31
34
storage: 5Gi
32
35
33
-
---
34
-
36
+
----
37
+
+
38
+
[NOTE]
39
+
====
40
+
This example uses `ReadWriteOnce` as the access mode which prevents multiple replicas from sharing the PVC across different nodes.
41
+
To run multiple replicas on different nodes, depending on your storage driver, you must use an access mode such as `ReadWriteMany`.
42
+
====
43
+
. To apply this PVC to your cluster, run the following command:
44
+
+
45
+
[source,terminal]
46
+
----
47
+
oc apply -f pvc.yaml
48
+
----
49
+
. Replace the default `dynamic-plugins-root` volume with a PVC named `dynamic-plugins-root`. For example:
50
+
+
51
+
[source,yaml]
52
+
----
35
53
apiVersion: rhdh.redhat.com/v1alpha3
36
54
kind: Backstage
37
55
metadata:
@@ -48,10 +66,77 @@ spec:
48
66
persistentVolumeClaim:
49
67
claimName: dynamic-plugins-root
50
68
----
69
+
+
70
+
[NOTE]
71
+
To avoid adding a new volume, you must use the `$patch: replace` directive.
72
+
73
+
=== Creating a PVC for the dynamic plugin cache using the Helm Chart
74
+
For Helm chart installations, if you require the dynamic plugin cache to persist across pod restarts, you must create a persistent volume claim (PVC) and configure the Helm chart to use it.
51
75
76
+
.Procedure
77
+
. Create the persistent volume definition. For example:
78
+
+
79
+
[source,yaml]
80
+
----
81
+
kind: PersistentVolumeClaim
82
+
apiVersion: v1
83
+
metadata:
84
+
name: dynamic-plugins-root
85
+
spec:
86
+
accessModes:
87
+
- ReadWriteOnce
88
+
resources:
89
+
requests:
90
+
storage: 5Gi
91
+
----
92
+
+
93
+
[NOTE]
94
+
====
95
+
This example uses `ReadWriteOnce` as the access mode which prevents multiple replicas from sharing the PVC across different nodes.
96
+
To run multiple replicas on different nodes, depending on your storage driver, you must use an access mode such as `ReadWriteMany`.
97
+
Gerry-Forde marked this conversation as resolved.
98
+
====
99
+
100
+
. To apply this PVC to your cluster, run the following command:
101
+
+
102
+
[source,terminal]
103
+
----
104
+
oc apply -f pvc.yaml
105
+
----
106
+
. Configure the Helm chart to use the PVC. For example:
Future versions of the {product-very-short} operator are planned to automatically create the PVC.
139
+
When you configure the Helm chart to use the PVC, you must also include the link:https://github.com/redhat-developer/rhdh-chart/blob/release-{product-version}/charts/backstage/values.yaml#L145-L181[`extraVolumes`] defined in the default Helm chart.
0 commit comments