이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 8. Using the dynamic plugins cache
The dynamic plugins cache in Red Hat Developer Hub (RHDH) enhances the installation process and reduces platform boot time by storing previously installed plugins. If the configuration remains unchanged, this feature prevents the need to re-download plugins on subsequent boots.
When you enable dynamic plugins cache:
-
The system calculates a checksum of each plugin’s YAML configuration (excluding
pluginConfig
). -
The checksum is stored in a file named
dynamic-plugin-config.hash
within the plugin’s directory. - During boot, if a plugin’s package reference matches the previous installation and the checksum is unchanged, the download is skipped.
- Plugins that are disabled since the previous boot are automatically removed.
8.1. Enabling the dynamic plugins cache 링크 복사링크가 클립보드에 복사되었습니다!
To enable the dynamic plugins cache in RHDH, the plugins directory dynamic-plugins-root
must be a persistent volume.
8.1.1. 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
.
Procedure
Create the persistent volume definition and save it to a file, such as
pvc.yaml
. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThis 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:
oc apply -f pvc.yaml
oc apply -f pvc.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace the default
dynamic-plugins-root
volume with a PVC nameddynamic-plugins-root
. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteTo avoid adding a new volume, you must use the
$patch: replace
directive.
8.1.2. 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:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThis 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:
oc apply -f pvc.yaml
oc apply -f pvc.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the Helm chart to use the PVC. For example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteWhen you configure the Helm chart to use the PVC, you must also include the
extraVolumes
defined in the default Helm chart.
8.2. Configuring the dynamic plugins cache 링크 복사링크가 클립보드에 복사되었습니다!
You can set the following optional dynamic plugin cache parameters in your dynamic-plugins.yaml
file:
-
forceDownload
: Set the value totrue
to force a reinstall of the plugin, bypassing the cache. The default value isfalse
. pullPolicy
: Similar to theforceDownload
parameter and is consistent with other image container platforms. You can use one of the following values for this key:-
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. IfNotPresent
: This value downloads the artifact if it is not already present in the dynamic-plugins-root folder, without checking image digests.NoteThe
pullPolicy
setting is also applied to the NPM downloading method, althoughAlways
will download the remote artifact without a digest check. The existingforceDownload
option remains functional, however, thepullPolicy
option takes precedence. TheforceDownload
option may be deprecated in a future Developer Hub release.
-
Example dynamic-plugins.yaml
file configuration to download the remote artifact without a digest check:
plugins: - disabled: false pullPolicy: Always package: 'oci://quay.io/example-org/example-plugin:v1.0.0!internal-backstage-plugin-example'
plugins:
- disabled: false
pullPolicy: Always
package: 'oci://quay.io/example-org/example-plugin:v1.0.0!internal-backstage-plugin-example'