Skip to content
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
64fad39
RHIDP-5570 - Document that the Dynamic Plugin cache PVC is disabled b…
Gerry-Forde Feb 9, 2025
0b088de
RHDH-5561: TechDocs content restructure (#917)
openshift-cherrypick-robot Feb 7, 2025
15f8952
Changed alpha2 to alpha3 (#928)
openshift-cherrypick-robot Feb 13, 2025
db77e5f
[release-1.5] RHIDP-5592:Wrong definition of Service Monitor for an R…
openshift-cherrypick-robot Feb 14, 2025
0ceed19
chore: bad link in code snippet points to non-existent branch (#940)
openshift-cherrypick-robot Feb 17, 2025
68f9b4c
RHIDP-5570 - Document that the Dynamic Plugin cache PVC is disabled b…
Gerry-Forde Feb 26, 2025
dc39e02
Merge branch 'release-1.5' into RHIDP-5570
Gerry-Forde Feb 26, 2025
f84fceb
Merge branch 'release-1.5' into RHIDP-5570
Gerry-Forde Mar 10, 2025
d76102c
RHIDP-5570 - Document that the Dynamic Plugin cache PVC is disabled b…
Gerry-Forde Mar 11, 2025
292ccc2
RHIDP-5570 - Document that the Dynamic Plugin cache PVC is disabled b…
Gerry-Forde Mar 11, 2025
0a05d70
RHIDP-5570 - Document that the Dynamic Plugin cache PVC is disabled b…
Gerry-Forde Mar 11, 2025
4829854
Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc
Gerry-Forde Mar 11, 2025
85ec70f
Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc
Gerry-Forde Mar 11, 2025
cf9a630
Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc
Gerry-Forde Mar 11, 2025
512ff7e
Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc
Gerry-Forde Mar 12, 2025
f57ee65
Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc
Gerry-Forde Mar 12, 2025
0cf4859
Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc
Gerry-Forde Mar 12, 2025
63748e0
Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc
Gerry-Forde Mar 12, 2025
1b2b55e
Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc
Gerry-Forde Mar 12, 2025
8f115d8
Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc
Gerry-Forde Mar 12, 2025
6846714
Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc
Gerry-Forde Mar 12, 2025
dcbf32b
RHIDP-5570 - Document that the Dynamic Plugin cache PVC is disabled b…
Gerry-Forde Mar 12, 2025
0de62fd
Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc
Gerry-Forde Mar 13, 2025
98afcac
Update con-dynamic-plugins-cache.adoc
Gerry-Forde Mar 13, 2025
67f6768
Merge branch 'release-1.5' into RHIDP-5570
Gerry-Forde Mar 13, 2025
17c102f
Update modules/dynamic-plugins/con-dynamic-plugins-cache.adoc
Gerry-Forde Mar 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 91 additions & 4 deletions modules/dynamic-plugins/con-dynamic-plugins-cache.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ When you enable dynamic plugins cache:
== Enabling the dynamic plugins cache
To enable the dynamic plugins cache in {product-very-short}, the plugins directory `dynamic-plugins-root` must be a persistent volume.

For Helm chart installations, a persistent volume named `dynamic-plugins-root` is automatically created.
=== Creating a PVC for the dynamic plugin cache by using the Operator
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`.

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

. Create the persistent volume definition and save it to a file, such as `pvc.yaml`. For example:
+
[source,yaml]
----
kind: PersistentVolumeClaim
Expand All @@ -29,9 +32,26 @@ spec:
resources:
requests:
storage: 5Gi
----
+
[NOTE]
====
This example uses `ReadWriteOnce` as the access mode which prevents multiple replicas from sharing the PVC across different nodes.

---
To run multiple replicas on different nodes, depending on your storage driver, you must use an access mode such as `ReadWriteMany`.
====

. To apply this PVC to your cluster, run the following command:
+
[source,terminal]
----
oc apply -f pvc.yaml
----

. Replace the default `dynamic-plugins-root` volume with a PVC named `dynamic-plugins-root`. For example:
+
[source,yaml]
----
apiVersion: rhdh.redhat.com/v1alpha3
kind: Backstage
metadata:
Expand All @@ -48,10 +68,77 @@ spec:
persistentVolumeClaim:
claimName: dynamic-plugins-root
----
+
[NOTE]
To avoid adding a new volume, you must use the `$patch: replace` directive.

=== Creating a PVC for the dynamic plugin cache using the Helm Chart
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.

.Procedure
. Create the persistent volume definition. For example:
+
[source,yaml]
----
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: dynamic-plugins-root
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
----
+
[NOTE]
====
This example uses `ReadWriteOnce` as the access mode which prevents multiple replicas from sharing the PVC across different nodes.

To run multiple replicas on different nodes, depending on your storage driver, you must use an access mode such as `ReadWriteMany`.
====

. To apply this PVC to your cluster, run the following command:
+
[source,terminal]
----
oc apply -f pvc.yaml
----
. Configure the Helm chart to use the PVC. For example:
+
[source,yaml]
----
upstream:
backstage:
extraVolumes:
- name: dynamic-plugins-root
persistentVolumeClaim:
claimName: dynamic-plugins-root
- name: dynamic-plugins
configMap:
defaultMode: 420
name: '{{ printf "%s-dynamic-plugins" .Release.Name }}'
optional: true
- name: dynamic-plugins-npmrc
secret:
defaultMode: 420
optional: true
secretName: '{{ printf "%s-dynamic-plugins-npmrc" .Release.Name }}'
- name: dynamic-plugins-registry-auth
secret:
defaultMode: 416
optional: true
secretName: '{{ printf "%s-dynamic-plugins-registry-auth" .Release.Name }}'
- name: npmcacache
emptyDir: {}
- name: temp
emptyDir: {}
----
+
[NOTE]
====
Future versions of the {product-very-short} operator are planned to automatically create the PVC.
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.
====

== Configuring the dynamic plugins cache
Expand Down