이 콘텐츠는 선택한 언어로 제공되지 않습니다.

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

  1. Create the persistent volume definition and save it to a file, such as pvc.yaml. For example:

    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
      name: dynamic-plugins-root
    spec:
      accessModes:
        - ReadWriteOnce
      resources:
        requests:
          storage: 5Gi
    Copy to Clipboard Toggle word wrap
    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.

  2. To apply this PVC to your cluster, run the following command:

    oc apply -f pvc.yaml
    Copy to Clipboard Toggle word wrap
  3. Replace the default dynamic-plugins-root volume with a PVC named dynamic-plugins-root. For example:

    apiVersion: rhdh.redhat.com/v1alpha3
    kind: Backstage
    metadata:
      name: developer-hub
    spec:
      deployment:
        patch:
          spec:
            template:
              spec:
                volumes:
                  - $patch: replace
                    name: dynamic-plugins-root
                    persistentVolumeClaim:
                      claimName: dynamic-plugins-root
    Copy to Clipboard Toggle word wrap
    Note

    To 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

  1. Create the persistent volume definition. For example:

    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
      name: dynamic-plugins-root
    spec:
      accessModes:
        - ReadWriteOnce
      resources:
        requests:
          storage: 5Gi
    Copy to Clipboard Toggle word wrap
    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.

  2. To apply this PVC to your cluster, run the following command:

    oc apply -f pvc.yaml
    Copy to Clipboard Toggle word wrap
  3. Configure the Helm chart to use the PVC. For example:

    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: {}
    Copy to Clipboard Toggle word wrap
    Note

    When 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 to true to force a reinstall of the plugin, bypassing the cache. The default value is false.
  • 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:

    • 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.

      Note

      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 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'
Copy to Clipboard Toggle word wrap

맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat