diff --git a/charts/backstage/Chart.yaml b/charts/backstage/Chart.yaml index 9257e231..4e939324 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.8.1 +version: 4.9.0 diff --git a/charts/backstage/README.md b/charts/backstage/README.md index 6e6c059c..add2999e 100644 --- a/charts/backstage/README.md +++ b/charts/backstage/README.md @@ -1,7 +1,7 @@ # RHDH Backstage Helm Chart for OpenShift -![Version: 4.8.1](https://img.shields.io/badge/Version-4.8.1-informational?style=flat-square) +![Version: 4.9.0](https://img.shields.io/badge/Version-4.9.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.8.1 +helm install my-backstage redhat-developer/backstage --version 4.9.0 ``` ## Introduction @@ -172,6 +172,7 @@ Kubernetes: `>= 1.27.0-0` | global.auth.backend.enabled | Enable backend service to service authentication, unless configured otherwise it generates a secret value | bool | `true` | | global.auth.backend.existingSecret | Instead of generating a secret value, refer to existing secret | string | `""` | | global.auth.backend.value | Instead of generating a secret value, use the following value | string | `""` | +| global.catalogIndex | Catalog index configuration for automatic plugin discovery. The `install-dynamic-plugins.py` script pulls this image if the `CATALOG_INDEX_IMAGE` environment variable is set. The `dynamic-plugins.default.yaml` file will be extracted and written to `dynamic-plugins-root` volume mount. | object | `{"image":{"registry":"quay.io","repository":"rhdh/plugin-catalog-index","tag":"1.9"}}` | | global.clusterRouterBase | Shorthand for users who do not want to specify a custom HOSTNAME. Used ONLY with the DEFAULT upstream.backstage.appConfig value and with OCP Route enabled. | string | `"apps.example.com"` | | global.dynamic.includes | Array of YAML files listing dynamic plugins to include with those listed in the `plugins` field. Relative paths are resolved from the working directory of the initContainer that will install the plugins (`/opt/app-root/src`). | list | `["dynamic-plugins.default.yaml"]` | | global.dynamic.includes[0] | List of dynamic plugins included inside the `janus-idp/backstage-showcase` container image, some of which are disabled by default. This file ONLY works with the `janus-idp/backstage-showcase` container image. | string | `"dynamic-plugins.default.yaml"` | @@ -300,9 +301,15 @@ upstream: origin: 'https://{{- include "janus-idp.hostname" . }}' ``` +### Catalog Index Configuration + +The chart supports automatic plugin discovery through a catalog index OCI image. This is configured via `global.catalogIndex.image` (with `registry`, `repository`, and `tag` fields) and lets you use a pre-defined set of dynamic plugins. + +For detailed information on configuring the catalog index, including how to override the default image or use a private registry, see the [Catalog Index Configuration documentation](../../docs/catalog-index-configuration.md). + ### Vanilla Kubernetes compatibility mode -In order to deploy this chart on vanilla Kubernetes or any other non-OCP platform, please make sure to apply the following changes. Note that further customizations may be required, depending on your exact Kubernetes setup: +To deploy this chart on vanilla Kubernetes or any other non-OCP platform, apply the following changes. Note that further customizations might be required, depending on your exact Kubernetes setup: ```yaml # values.yaml diff --git a/charts/backstage/README.md.gotmpl b/charts/backstage/README.md.gotmpl index c68a7119..bb364cc8 100644 --- a/charts/backstage/README.md.gotmpl +++ b/charts/backstage/README.md.gotmpl @@ -234,9 +234,15 @@ upstream: origin: 'https://{{"{{"}}- include "janus-idp.hostname" . {{"}}"}}' ``` +### Catalog Index Configuration + +The chart supports automatic plugin discovery through a catalog index OCI image. This is configured via `global.catalogIndex.image` (with `registry`, `repository`, and `tag` fields) and lets you use a pre-defined set of dynamic plugins. + +For detailed information on configuring the catalog index, including how to override the default image or use a private registry, see the [Catalog Index Configuration documentation](../../docs/catalog-index-configuration.md). + ### Vanilla Kubernetes compatibility mode -In order to deploy this chart on vanilla Kubernetes or any other non-OCP platform, please make sure to apply the following changes. Note that further customizations may be required, depending on your exact Kubernetes setup: +To deploy this chart on vanilla Kubernetes or any other non-OCP platform, apply the following changes. Note that further customizations might be required, depending on your exact Kubernetes setup: ```yaml # values.yaml diff --git a/charts/backstage/values.schema.json b/charts/backstage/values.schema.json index c79a58b1..4a98733d 100644 --- a/charts/backstage/values.schema.json +++ b/charts/backstage/values.schema.json @@ -32,6 +32,35 @@ "title": "Enable service authentication within Backstage instance", "type": "object" }, + "catalogIndex": { + "additionalProperties": false, + "properties": { + "image": { + "additionalProperties": false, + "properties": { + "registry": { + "default": "quay.io", + "title": "Catalog index image registry", + "type": "string" + }, + "repository": { + "default": "rhdh/plugin-catalog-index", + "title": "Catalog index image repository", + "type": "string" + }, + "tag": { + "default": "1.9", + "title": "Catalog index image tag", + "type": "string" + } + }, + "title": "Catalog index image configuration", + "type": "object" + } + }, + "title": "Catalog index configuration for automatic plugin discovery. The `install-dynamic-plugins.py` script pulls this image if the `CATALOG_INDEX_IMAGE` environment variable is set. The `dynamic-plugins.default.yaml` file will be extracted and written to `dynamic-plugins-root` volume mount.", + "type": "object" + }, "clusterRouterBase": { "default": "apps.example.com", "title": "Shorthand for users who do not want to specify a custom HOSTNAME. Used ONLY with the DEFAULT upstream.backstage.appConfig value and with OCP Route enabled.", @@ -4619,6 +4648,10 @@ { "name": "MAX_ENTRY_SIZE", "value": "30000000" + }, + { + "name": "CATALOG_INDEX_IMAGE", + "value": "{{ .Values.global.catalogIndex.image.registry }}/{{ .Values.global.catalogIndex.image.repository }}:{{ .Values.global.catalogIndex.image.tag }}" } ], "image": "{{ include \"backstage.image\" . }}", diff --git a/charts/backstage/values.schema.tmpl.json b/charts/backstage/values.schema.tmpl.json index dd43885c..5e461a16 100644 --- a/charts/backstage/values.schema.tmpl.json +++ b/charts/backstage/values.schema.tmpl.json @@ -103,6 +103,35 @@ } } } + }, + "catalogIndex": { + "title": "Catalog index configuration for automatic plugin discovery. The `install-dynamic-plugins.py` script pulls this image if the `CATALOG_INDEX_IMAGE` environment variable is set. The `dynamic-plugins.default.yaml` file will be extracted and written to `dynamic-plugins-root` volume mount.", + "type": "object", + "additionalProperties": false, + "properties": { + "image": { + "title": "Catalog index image configuration", + "type": "object", + "additionalProperties": false, + "properties": { + "registry": { + "title": "Catalog index image registry", + "type": "string", + "default": "quay.io" + }, + "repository": { + "title": "Catalog index image repository", + "type": "string", + "default": "rhdh/plugin-catalog-index" + }, + "tag": { + "title": "Catalog index image tag", + "type": "string", + "default": "1.9" + } + } + } + } } } }, diff --git a/charts/backstage/values.yaml b/charts/backstage/values.yaml index f248b666..0456b8ae 100644 --- a/charts/backstage/values.yaml +++ b/charts/backstage/values.yaml @@ -1,4 +1,5 @@ nameOverride: developer-hub + global: dynamic: # -- Array of YAML files listing dynamic plugins to include with those listed in the `plugins` field. @@ -30,6 +31,15 @@ global: # -- Instead of generating a secret value, use the following value value: "" + # -- Catalog index configuration for automatic plugin discovery. + # The `install-dynamic-plugins.py` script pulls this image if the `CATALOG_INDEX_IMAGE` environment variable is set. + # The `dynamic-plugins.default.yaml` file will be extracted and written to `dynamic-plugins-root` volume mount. + catalogIndex: + image: + registry: quay.io + repository: rhdh/plugin-catalog-index + tag: "1.9" + # -- Upstream Backstage [chart configuration](https://github.com/backstage/charts/blob/main/charts/backstage/values.yaml) # @default -- Use Openshift compatible settings upstream: @@ -213,6 +223,8 @@ upstream: # This following variable is required for orchestrator to startup properly. - name: MAX_ENTRY_SIZE value: "30000000" + - name: CATALOG_INDEX_IMAGE + value: '{{ .Values.global.catalogIndex.image.registry }}/{{ .Values.global.catalogIndex.image.repository }}:{{ .Values.global.catalogIndex.image.tag }}' imagePullPolicy: "" volumeMounts: - mountPath: /dynamic-plugins-root diff --git a/docs/catalog-index-configuration.md b/docs/catalog-index-configuration.md new file mode 100644 index 00000000..e36411a5 --- /dev/null +++ b/docs/catalog-index-configuration.md @@ -0,0 +1,20 @@ +# 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). + +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: + +```yaml +global: + catalogIndex: + image: + registry: quay.io + repository: rhdh/plugin-catalog-index + tag: "1.9" +``` + +## Using a Private Registry + +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).