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
+1-149Lines changed: 1 addition & 149 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,153 +10,5 @@ When you enable dynamic plugins cache:
10
10
* During boot, if a plugin's package reference matches the previous installation and the checksum is unchanged, the download is skipped.
11
11
* Plugins that are disabled since the previous boot are automatically removed.
12
12
13
-
== Enabling the dynamic plugins cache
14
-
To enable the dynamic plugins cache in {product-very-short}, the plugins directory `dynamic-plugins-root` must be a persistent volume.
15
-
16
-
=== Creating a PVC for the dynamic plugin cache by using the Operator
17
-
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
-
20
-
.Procedure
21
-
. Create the persistent volume definition and save it to a file, such as `pvc.yaml`. For example:
22
-
+
23
-
[source,yaml]
24
-
----
25
-
kind: PersistentVolumeClaim
26
-
apiVersion: v1
27
-
metadata:
28
-
name: dynamic-plugins-root
29
-
spec:
30
-
accessModes:
31
-
- ReadWriteOnce
32
-
resources:
33
-
requests:
34
-
storage: 5Gi
35
-
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
-
----
53
-
apiVersion: rhdh.redhat.com/v1alpha3
54
-
kind: Backstage
55
-
metadata:
56
-
name: developer-hub
57
-
spec:
58
-
deployment:
59
-
patch:
60
-
spec:
61
-
template:
62
-
spec:
63
-
volumes:
64
-
- $patch: replace
65
-
name: dynamic-plugins-root
66
-
persistentVolumeClaim:
67
-
claimName: dynamic-plugins-root
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.
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
13
[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
-
====
98
-
99
-
. To apply this PVC to your cluster, run the following command:
100
-
+
101
-
[source,terminal]
102
-
----
103
-
oc apply -f pvc.yaml
104
-
----
105
-
. Configure the Helm chart to use the PVC. For example:
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.
139
-
====
140
-
141
-
== Configuring the dynamic plugins cache
142
-
You can set the following optional dynamic plugin cache parameters in your `dynamic-plugins.yaml` file:
143
-
144
-
* `forceDownload`: Set the value to `true` to force a reinstall of the plugin, bypassing the cache. The default value is `false`.
145
-
146
-
* `pullPolicy`: Similar to the `forceDownload` parameter and is consistent with other image container platforms. You can use one of the following values for this key:
147
-
148
-
** `Always`: This value compares the image digest in the remote registry and downloads the artifact if it has changed, even if the plugin was previously downloaded.
149
-
** `IfNotPresent`: This value downloads the artifact if it is not already present in the dynamic-plugins-root folder, without checking image digests.
150
-
+
151
-
[NOTE]
152
-
The `pullPolicy` setting is also applied to the NPM downloading method, although `Always` will download the remote artifact without a digest check. The existing `forceDownload` option remains functional, however, the `pullPolicy` option takes precedence. The `forceDownload` option may be deprecated in a future {product-short} release.
153
-
154
-
.Example `dynamic-plugins.yaml` file configuration to download the remote artifact without a digest check:
= Creating a PVC for the dynamic plugin cache using the Helm Chart
3
+
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.
4
+
5
+
.Prerequisites
6
+
* You have installed {product} using the Helm chart.
7
+
* You have installed the {openshift-cli}.
8
+
9
+
.Procedure
10
+
. Create the persistent volume definition. For example:
11
+
+
12
+
[source,yaml]
13
+
----
14
+
kind: PersistentVolumeClaim
15
+
apiVersion: v1
16
+
metadata:
17
+
name: dynamic-plugins-root
18
+
spec:
19
+
accessModes:
20
+
- ReadWriteOnce
21
+
resources:
22
+
requests:
23
+
storage: 5Gi
24
+
----
25
+
+
26
+
[NOTE]
27
+
====
28
+
This example uses `ReadWriteOnce` as the access mode which prevents multiple replicas from sharing the PVC across different nodes.
29
+
To run multiple replicas on different nodes, depending on your storage driver, you must use an access mode such as `ReadWriteMany`.
30
+
====
31
+
32
+
. To apply this PVC to your cluster, run the following command:
33
+
+
34
+
[source,terminal]
35
+
----
36
+
oc apply -f pvc.yaml
37
+
----
38
+
. Configure the Helm chart to use the PVC. For example:
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.
= Creating a PVC for the dynamic plugin cache by using the Operator
3
+
4
+
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`.
5
+
6
+
.Prerequisites
7
+
* You have installed {product} on {ocp-short} using the {product} Operator.
8
+
* You have installed the {openshift-cli}.
9
+
10
+
.Procedure
11
+
. Create the persistent volume definition and save it to a file, such as `pvc.yaml`. For example:
12
+
+
13
+
[source,yaml]
14
+
----
15
+
kind: PersistentVolumeClaim
16
+
apiVersion: v1
17
+
metadata:
18
+
name: dynamic-plugins-root
19
+
spec:
20
+
accessModes:
21
+
- ReadWriteOnce
22
+
resources:
23
+
requests:
24
+
storage: 5Gi
25
+
26
+
----
27
+
+
28
+
[NOTE]
29
+
====
30
+
This example uses `ReadWriteOnce` as the access mode which prevents multiple replicas from sharing the PVC across different nodes.
31
+
To run multiple replicas on different nodes, depending on your storage driver, you must use an access mode such as `ReadWriteMany`.
32
+
====
33
+
. To apply this PVC to your cluster, run the following command:
34
+
+
35
+
[source,terminal]
36
+
----
37
+
oc apply -f pvc.yaml
38
+
----
39
+
. Replace the default `dynamic-plugins-root` volume with a PVC named `dynamic-plugins-root`. For example:
40
+
+
41
+
[source,yaml]
42
+
----
43
+
apiVersion: rhdh.redhat.com/v1alpha3
44
+
kind: Backstage
45
+
metadata:
46
+
name: developer-hub
47
+
spec:
48
+
deployment:
49
+
patch:
50
+
spec:
51
+
template:
52
+
spec:
53
+
volumes:
54
+
- $patch: replace
55
+
name: dynamic-plugins-root
56
+
persistentVolumeClaim:
57
+
claimName: dynamic-plugins-root
58
+
----
59
+
+
60
+
[NOTE]
61
+
To avoid adding a new volume, you must use the `$patch: replace` directive.
You can set the following optional dynamic plugin cache parameters in your `dynamic-plugins.yaml` file:
4
+
5
+
* `forceDownload`: Set the value to `true` to force a reinstall of the plugin, bypassing the cache. The default value is `false`.
6
+
7
+
* `pullPolicy`: Similar to the `forceDownload` parameter and is consistent with other image container platforms. You can use one of the following values for this key:
8
+
9
+
** `Always`: This value compares the image digest in the remote registry and downloads the artifact if it has changed, even if the plugin was previously downloaded.
10
+
** `IfNotPresent`: This value downloads the artifact if it is not already present in the dynamic-plugins-root folder, without checking image digests.
11
+
+
12
+
[NOTE]
13
+
The `pullPolicy` setting is also applied to the NPM downloading method, although `Always` will download the remote artifact without a digest check. The existing `forceDownload` option remains functional, however, the `pullPolicy` option takes precedence. The `forceDownload` option may be deprecated in a future {product-short} release.
14
+
15
+
.Example `dynamic-plugins.yaml` file configuration to download the remote artifact without a digest check:
0 commit comments