diff --git a/charts/backstage/Chart.yaml b/charts/backstage/Chart.yaml index 4e939324..c503f95a 100644 --- a/charts/backstage/Chart.yaml +++ b/charts/backstage/Chart.yaml @@ -47,4 +47,4 @@ sources: [] # Versions are expected to follow Semantic Versioning (https://semver.org/) # Note that when this chart is published to https://github.com/openshift-helm-charts/charts # it will follow the RHDH versioning 1.y.z -version: 4.9.0 +version: 5.0.0 diff --git a/charts/backstage/README.md b/charts/backstage/README.md index add2999e..2f75e261 100644 --- a/charts/backstage/README.md +++ b/charts/backstage/README.md @@ -1,7 +1,7 @@ # RHDH Backstage Helm Chart for OpenShift -![Version: 4.9.0](https://img.shields.io/badge/Version-4.9.0-informational?style=flat-square) +![Version: 5.0.0](https://img.shields.io/badge/Version-5.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) A Helm chart for deploying Red Hat Developer Hub, which is a Red Hat supported version of Backstage. @@ -30,7 +30,7 @@ helm repo add bitnami https://charts.bitnami.com/bitnami helm repo add backstage https://backstage.github.io/charts helm repo add redhat-developer https://redhat-developer.github.io/rhdh-chart -helm install my-backstage redhat-developer/backstage --version 4.9.0 +helm install my-backstage redhat-developer/backstage --version 5.0.0 ``` ## Introduction @@ -221,6 +221,7 @@ Kubernetes: `>= 1.27.0-0` | upstream | Upstream Backstage [chart configuration](https://github.com/backstage/charts/blob/main/charts/backstage/values.yaml) | object | Use Openshift compatible settings | | upstream.backstage.extraVolumes[0] | Ephemeral volume that will contain the dynamic plugins installed by the initContainer below at start. | object | `{"ephemeral":{"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"5Gi"}}}}},"name":"dynamic-plugins-root"}` | | upstream.backstage.extraVolumes[0].ephemeral.volumeClaimTemplate.spec.resources.requests.storage | Size of the volume that will contain the dynamic plugins. It should be large enough to contain all the plugins. | string | `"5Gi"` | +| upstream.backstage.extraVolumes[5] | Ephemeral volume used by the install-dynamic-plugins init container to extract catalog entities from the catalog index image. Mounted at the /extensions path in the backstage-backend main container for automatic discovery by the extension catalog backend providers. | object | `{"emptyDir":{},"name":"extensions-catalog"}` | | upstream.backstage.initContainers[0].image | Image used by the initContainer to install dynamic plugins into the `dynamic-plugins-root` volume mount. It could be replaced by a custom image based on this one. | string | `quay.io/janus-idp/backstage-showcase:latest` | ## Opinionated Backstage deployment diff --git a/charts/backstage/ci/with-custom-dynamic-pvc-claim-spec-values.yaml b/charts/backstage/ci/with-custom-dynamic-pvc-claim-spec-values.yaml index 0b2f4625..8a13ec41 100644 --- a/charts/backstage/ci/with-custom-dynamic-pvc-claim-spec-values.yaml +++ b/charts/backstage/ci/with-custom-dynamic-pvc-claim-spec-values.yaml @@ -48,3 +48,5 @@ upstream: emptyDir: {} - name: temp emptyDir: {} + - name: extensions-catalog + emptyDir: {} diff --git a/charts/backstage/values.schema.json b/charts/backstage/values.schema.json index 4a98733d..f18e5141 100644 --- a/charts/backstage/values.schema.json +++ b/charts/backstage/values.schema.json @@ -2922,6 +2922,10 @@ "mountPath": "/opt/app-root/src/dynamic-plugins-root", "name": "dynamic-plugins-root" }, + { + "mountPath": "/extensions", + "name": "extensions-catalog" + }, { "mountPath": "/tmp", "name": "temp" @@ -3015,6 +3019,10 @@ "emptyDir": {}, "name": "npmcacache" }, + { + "emptyDir": {}, + "name": "extensions-catalog" + }, { "emptyDir": {}, "name": "temp" @@ -4652,6 +4660,10 @@ { "name": "CATALOG_INDEX_IMAGE", "value": "{{ .Values.global.catalogIndex.image.registry }}/{{ .Values.global.catalogIndex.image.repository }}:{{ .Values.global.catalogIndex.image.tag }}" + }, + { + "name": "CATALOG_ENTITIES_EXTRACT_DIR", + "value": "/extensions" } ], "image": "{{ include \"backstage.image\" . }}", @@ -4707,6 +4719,10 @@ "mountPath": "/opt/app-root/src/.npm/_cacache", "name": "npmcacache" }, + { + "mountPath": "/extensions", + "name": "extensions-catalog" + }, { "mountPath": "/tmp", "name": "temp" diff --git a/charts/backstage/values.yaml b/charts/backstage/values.yaml index 0456b8ae..1ae8fd4d 100644 --- a/charts/backstage/values.yaml +++ b/charts/backstage/values.yaml @@ -153,6 +153,8 @@ upstream: # The initContainer below will install dynamic plugins in this volume mount. - name: dynamic-plugins-root mountPath: /opt/app-root/src/dynamic-plugins-root + - name: extensions-catalog + mountPath: /extensions - name: temp mountPath: /tmp extraVolumes: @@ -190,6 +192,10 @@ upstream: secretName: '{{ printf "%s-dynamic-plugins-registry-auth" .Release.Name }}' - name: npmcacache emptyDir: {} + # -- Ephemeral volume used by the install-dynamic-plugins init container to extract catalog entities from the catalog index image. + # Mounted at the /extensions path in the backstage-backend main container for automatic discovery by the extension catalog backend providers. + - name: extensions-catalog + emptyDir: {} - name: temp emptyDir: {} initContainers: @@ -225,6 +231,8 @@ upstream: value: "30000000" - name: CATALOG_INDEX_IMAGE value: '{{ .Values.global.catalogIndex.image.registry }}/{{ .Values.global.catalogIndex.image.repository }}:{{ .Values.global.catalogIndex.image.tag }}' + - name: CATALOG_ENTITIES_EXTRACT_DIR + value: '/extensions' imagePullPolicy: "" volumeMounts: - mountPath: /dynamic-plugins-root @@ -242,6 +250,8 @@ upstream: readOnly: true - mountPath: /opt/app-root/src/.npm/_cacache name: npmcacache + - name: extensions-catalog + mountPath: /extensions - name: temp mountPath: /tmp workingDir: /opt/app-root/src diff --git a/docs/catalog-index-configuration.md b/docs/catalog-index-configuration.md index e36411a5..1cba59ee 100644 --- a/docs/catalog-index-configuration.md +++ b/docs/catalog-index-configuration.md @@ -1,8 +1,8 @@ # Catalog Index Configuration -The Helm chart supports loading default plugin configurations from an OCI container image (catalog index). For general information about how the catalog index works, see [Using a Catalog Index Image for Default Plugin Configurations](https://github.com/redhat-developer/rhdh/blob/main/docs/dynamic-plugins/installing-plugins.md#using-a-catalog-index-image-for-default-plugin-configurations). +The `backstage` Helm chart supports loading default plugin configurations from an OCI container image (catalog index). For general information about how the catalog index works, see [Using a Catalog Index Image for Default Plugin Configurations](https://github.com/redhat-developer/rhdh/blob/main/docs/dynamic-plugins/installing-plugins.md#using-a-catalog-index-image-for-default-plugin-configurations). -By default, the chart configures the catalog index image using `global.catalogIndex.image` with `registry`, `repository`, and `tag` fields. You can override these values in your values file to use a different version or a mirrored image: +By default, the `backstage` chart configures the catalog index image using `global.catalogIndex.image` with `registry`, `repository`, and `tag` fields. You can override these values in your values file to use a different version or a mirrored image: ```yaml global: @@ -18,3 +18,12 @@ global: If your catalog index image is stored in a private registry that requires authentication, create a secret named `-dynamic-plugins-registry-auth` containing an `auth.json` file with your registry credentials. For detailed instructions on configuring private registry authentication, see the [official Red Hat Developer Hub documentation](https://docs.redhat.com/en/documentation/red_hat_developer_hub/1.8/html/installing_and_viewing_plugins_in_red_hat_developer_hub/assembly-third-party-plugins#proc-load-plugin-oci-image_assembly-install-third-party-plugins-rhdh). + +## Extensions Catalog Entities + +When the catalog index image is configured, the `backstage` chart instructs the RHDH `install-dynamic-plugins` init container to extract catalog entities from the catalog index image to a new `/extensions` volume mount by default. +This allows the extensions backend providers to automatically discover plugin metadata for display in the RHDH Extensions UI. + +The extraction directory can be configured via the `CATALOG_ENTITIES_EXTRACT_DIR` environment variable in the `install-dynamic-plugins` init container. + +More details in [Catalog Entities Extraction](https://github.com/redhat-developer/rhdh/blob/main/docs/dynamic-plugins/installing-plugins.md#catalog-entities-extraction).