Skip to content

Commit 68f9b4c

Browse files
committed
RHIDP-5570 - Document that the Dynamic Plugin cache PVC is disabled by default
1 parent 0ceed19 commit 68f9b4c

File tree

1 file changed

+86
-3
lines changed

1 file changed

+86
-3
lines changed

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

Lines changed: 86 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,16 @@ 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+
// For Helm chart installations, a persistent volume named `dynamic-plugins-root` is automatically created.
1717

18-
For operator-based installations, you must manually create the PersistentVolumeClaim (PVC) as follows:
18+
=== Creating a PVC for Dynamic Plugins Cache using the Operator
19+
// For operator-based installations, you must manually create the PersistentVolumeClaim (PVC) as follows:
1920

21+
For operator-based installations, you must manually create the PersistentVolumeClaim (PVC) by replacing the default `dynamic-plugins-root` volume with a Persistent Volume Claim (PVC) named `dynamic-plugins-root`.
22+
23+
Create the persistent volume definition and save it to a file, for example `pvc.yaml`.
24+
25+
.Example creating the persistent volume definition
2026
[source,yaml]
2127
----
2228
kind: PersistentVolumeClaim
@@ -29,10 +35,18 @@ spec:
2935
resources:
3036
requests:
3137
storage: 5Gi
38+
----
3239

33-
---
40+
Replace the default dynamic-plugins-root volume with a persistent volume claim (PVC) named dynamic-plugins-root.
3441

42+
<<<<<<< HEAD
3543
apiVersion: rhdh.redhat.com/v1alpha3
44+
=======
45+
.Example replacing the `dynamic-plugins-root` volume
46+
[source,yaml]
47+
----
48+
apiVersion: rhdh.redhat.com/v1alpha2
49+
>>>>>>> 5ef6a4fa9 (RHIDP-5570 - Document that the Dynamic Plugin cache PVC is disabled by default)
3650
kind: Backstage
3751
metadata:
3852
name: developer-hub
@@ -49,6 +63,75 @@ spec:
4963
claimName: dynamic-plugins-root
5064
----
5165
66+
[NOTE]
67+
To avoid adding a new volume, you must use the `$patch: replace` directive.
68+
69+
=== Creating a PVC for Dynamic Plugins Cache using the Helm Chart
70+
For Helm Chart installations, if you require the dynamic plugin cache to persist across pod restarts, you must create a PersistentVolumeClaim (PVC) and configure the Helm Chart to use it.
71+
72+
.Example creating the persistent volume definition
73+
[source,yaml]
74+
----
75+
kind: PersistentVolumeClaim
76+
apiVersion: v1
77+
metadata:
78+
name: dynamic-plugins-root
79+
spec:
80+
accessModes:
81+
- ReadWriteOnce
82+
resources:
83+
requests:
84+
storage: 5Gi
85+
86+
----
87+
88+
[NOTE]
89+
====
90+
This example uses `ReadWriteOnce` as the access mode which prevents multiple replicas from sharing the PVC across different nodes.
91+
92+
To run multiple replicas on different nodes, depending on your storage driver, you must use an access mode such as `ReadWriteMany`.
93+
====
94+
95+
To apply this PVC to your cluster, run the following command:
96+
[source,terminal]
97+
----
98+
oc apply -f pvc.yaml
99+
----
100+
101+
.Example configuring Helm to use the PVC
102+
[source,yaml]
103+
----
104+
extraVolumes:
105+
- name: dynamic-plugins-root
106+
persistentVolumeClaim:
107+
claimName: dynamic-plugins-root
108+
- name: dynamic-plugins
109+
configMap:
110+
defaultMode: 420
111+
name: '{{ printf "%s-dynamic-plugins" .Release.Name }}'
112+
optional: true
113+
- name: dynamic-plugins-npmrc
114+
secret:
115+
defaultMode: 420
116+
optional: true
117+
secretName: '{{ printf "%s-dynamic-plugins-npmrc" .Release.Name }}'
118+
- name: dynamic-plugins-registry-auth
119+
secret:
120+
defaultMode: 416
121+
optional: true
122+
secretName: '{{ printf "%s-dynamic-plugins-registry-auth" .Release.Name }}'
123+
- name: npmcacache
124+
emptyDir: {}
125+
- name: temp
126+
emptyDir: {}=
127+
----
128+
129+
To deploy the Helm Chart, run the following command:
130+
[source,terminal]
131+
----
132+
helm upgrade --install rhdh-backstage charts/backstage --namespace rhdh -f values.yaml
133+
----
134+
52135
== Configuring the dynamic plugins cache
53136
You can set the following optional dynamic plugin cache parameters:
54137

0 commit comments

Comments
 (0)