Skip to content

Commit 4ae6c72

Browse files
Gerry-Fordeopenshift-cherrypick-robotlinfrazepabel-rhnickboldt
committed
RHIDP-5570 - Document that the Dynamic Plugin cache PVC is disabled by default (redhat-developer#919)
* RHIDP-5570 - Document that the Dynamic Plugin cache PVC is disabled by default * RHDH-5561: TechDocs content restructure (redhat-developer#917) Co-authored-by: linfraze <[email protected]> * Changed alpha2 to alpha3 (redhat-developer#928) Co-authored-by: Priyanka Abel <[email protected]> * [release-1.5] RHIDP-5592:Wrong definition of Service Monitor for an RHDH instance by the Operator (redhat-developer#937) * fixed merge conflicts * Incorporated Jessica's comments * Made a few changes * Final changes * Incorporated Lindsey's comments * Final update * Incorporated comments * Incorporated comment --------- Co-authored-by: Priyanka Abel <[email protected]> * chore: bad link in code snippet points to non-existent branch (redhat-developer#940) Co-authored-by: Nick Boldt <[email protected]> * RHIDP-5570 - Document that the Dynamic Plugin cache PVC is disabled by default * RHIDP-5570 - Document that the Dynamic Plugin cache PVC is disabled by default * RHIDP-5570 - Document that the Dynamic Plugin cache PVC is disabled by default * RHIDP-5570 - Document that the Dynamic Plugin cache PVC is disabled by default * Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc Co-authored-by: Lindsey Frazier <[email protected]> * Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc Co-authored-by: Lindsey Frazier <[email protected]> * Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc Co-authored-by: Lindsey Frazier <[email protected]> * Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc Co-authored-by: Lindsey Frazier <[email protected]> * Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc Co-authored-by: Lindsey Frazier <[email protected]> * Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc Co-authored-by: Lindsey Frazier <[email protected]> * Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc Co-authored-by: Lindsey Frazier <[email protected]> * Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc Co-authored-by: Lindsey Frazier <[email protected]> * Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc Co-authored-by: Lindsey Frazier <[email protected]> * Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc Co-authored-by: Armel Soro <[email protected]> * RHIDP-5570 - Document that the Dynamic Plugin cache PVC is disabled by default * Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc Co-authored-by: Lindsey Frazier <[email protected]> * Update con-dynamic-plugins-cache.adoc * Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc Co-authored-by: Lindsey Frazier <[email protected]> --------- Co-authored-by: OpenShift Cherrypick Robot <[email protected]> Co-authored-by: linfraze <[email protected]> Co-authored-by: Priyanka Abel <[email protected]> Co-authored-by: Nick Boldt <[email protected]> Co-authored-by: Armel Soro <[email protected]>
1 parent 1f78dc3 commit 4ae6c72

File tree

1 file changed

+91
-4
lines changed

1 file changed

+91
-4
lines changed

modules/dynamic-plugins/con-dynamic-plugins-cache.adoc

Lines changed: 91 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ When you enable dynamic plugins cache:
1313
== Enabling the dynamic plugins cache
1414
To enable the dynamic plugins cache in {product-very-short}, the plugins directory `dynamic-plugins-root` must be a persistent volume.
1515

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+
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`.
1718

18-
For operator-based installations, you must manually create the PersistentVolumeClaim (PVC) as follows:
19+
.Procedure
1920

21+
. Create the persistent volume definition and save it to a file, such as `pvc.yaml`. For example:
22+
+
2023
[source,yaml]
2124
----
2225
kind: PersistentVolumeClaim
@@ -29,9 +32,26 @@ spec:
2932
resources:
3033
requests:
3134
storage: 5Gi
35+
----
36+
+
37+
[NOTE]
38+
====
39+
This example uses `ReadWriteOnce` as the access mode which prevents multiple replicas from sharing the PVC across different nodes.
3240
33-
---
41+
To run multiple replicas on different nodes, depending on your storage driver, you must use an access mode such as `ReadWriteMany`.
42+
====
3443

44+
. To apply this PVC to your cluster, run the following command:
45+
+
46+
[source,terminal]
47+
----
48+
oc apply -f pvc.yaml
49+
----
50+
51+
. Replace the default `dynamic-plugins-root` volume with a PVC named `dynamic-plugins-root`. For example:
52+
+
53+
[source,yaml]
54+
----
3555
apiVersion: rhdh.redhat.com/v1alpha3
3656
kind: Backstage
3757
metadata:
@@ -48,10 +68,77 @@ spec:
4868
persistentVolumeClaim:
4969
claimName: dynamic-plugins-root
5070
----
71+
+
72+
[NOTE]
73+
To avoid adding a new volume, you must use the `$patch: replace` directive.
74+
75+
=== Creating a PVC for the dynamic plugin cache using the Helm Chart
76+
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.
77+
78+
.Procedure
79+
. Create the persistent volume definition. For example:
80+
+
81+
[source,yaml]
82+
----
83+
kind: PersistentVolumeClaim
84+
apiVersion: v1
85+
metadata:
86+
name: dynamic-plugins-root
87+
spec:
88+
accessModes:
89+
- ReadWriteOnce
90+
resources:
91+
requests:
92+
storage: 5Gi
93+
----
94+
+
95+
[NOTE]
96+
====
97+
This example uses `ReadWriteOnce` as the access mode which prevents multiple replicas from sharing the PVC across different nodes.
98+
99+
To run multiple replicas on different nodes, depending on your storage driver, you must use an access mode such as `ReadWriteMany`.
100+
====
51101

102+
. To apply this PVC to your cluster, run the following command:
103+
+
104+
[source,terminal]
105+
----
106+
oc apply -f pvc.yaml
107+
----
108+
. Configure the Helm chart to use the PVC. For example:
109+
+
110+
[source,yaml]
111+
----
112+
upstream:
113+
backstage:
114+
extraVolumes:
115+
- name: dynamic-plugins-root
116+
persistentVolumeClaim:
117+
claimName: dynamic-plugins-root
118+
- name: dynamic-plugins
119+
configMap:
120+
defaultMode: 420
121+
name: '{{ printf "%s-dynamic-plugins" .Release.Name }}'
122+
optional: true
123+
- name: dynamic-plugins-npmrc
124+
secret:
125+
defaultMode: 420
126+
optional: true
127+
secretName: '{{ printf "%s-dynamic-plugins-npmrc" .Release.Name }}'
128+
- name: dynamic-plugins-registry-auth
129+
secret:
130+
defaultMode: 416
131+
optional: true
132+
secretName: '{{ printf "%s-dynamic-plugins-registry-auth" .Release.Name }}'
133+
- name: npmcacache
134+
emptyDir: {}
135+
- name: temp
136+
emptyDir: {}
137+
----
138+
+
52139
[NOTE]
53140
====
54-
Future versions of the {product-very-short} operator are planned to automatically create the PVC.
141+
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.
55142
====
56143

57144
== Configuring the dynamic plugins cache

0 commit comments

Comments
 (0)