Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/backstage/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: 5.8.1
version: 5.9.0
11 changes: 7 additions & 4 deletions charts/backstage/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# RHDH Backstage Helm Chart for OpenShift

![Version: 5.8.1](https://img.shields.io/badge/Version-5.8.1-informational?style=flat-square)
![Version: 5.9.0](https://img.shields.io/badge/Version-5.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.
Expand Down Expand Up @@ -29,7 +29,7 @@ For the **Generally Available** version of this chart, see:
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add redhat-developer https://redhat-developer.github.io/rhdh-chart

helm install my-backstage redhat-developer/backstage --version 5.8.1
helm install my-backstage redhat-developer/backstage --version 5.9.0
```

## Introduction
Expand Down Expand Up @@ -168,7 +168,8 @@ 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.10"}}` |
| 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 | `{"extraImages":[],"image":{"registry":"quay.io","repository":"rhdh/plugin-catalog-index","tag":"1.10"}}` |
| global.catalogIndex.extraImages | Extra catalog index images for additional plugin discovery in the Extensions UI. Each item must include `registry`, `repository`, and `tag` fields; `name` is optional. Only catalog entities are extracted from extra images (no `dynamic-plugins.default.yaml` handling). | list | `[]` |
| 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 `rhdh` container image, some of which are disabled by default. This file ONLY works with the `rhdh` container image. | string | `"dynamic-plugins.default.yaml"` |
Expand Down Expand Up @@ -331,7 +332,9 @@ upstream:

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).
You can also configure additional catalog index images via `global.catalogIndex.extraImages` to make plugins from other sources discoverable in the Extensions UI. Each extra image contributes catalog entities only (no `dynamic-plugins.default.yaml` handling).

For detailed information on configuring the catalog index, including how to override the default image, use a private registry, or add extra catalog index images, see the [Catalog Index Configuration documentation](../../docs/catalog-index-configuration.md).

### Lightspeed

Expand Down
4 changes: 3 additions & 1 deletion charts/backstage/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ upstream:

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).
You can also configure additional catalog index images via `global.catalogIndex.extraImages` to make plugins from other sources discoverable in the Extensions UI. Each extra image contributes catalog entities only (no `dynamic-plugins.default.yaml` handling).

For detailed information on configuring the catalog index, including how to override the default image, use a private registry, or add extra catalog index images, see the [Catalog Index Configuration documentation](../../docs/catalog-index-configuration.md).

### Lightspeed

Expand Down
22 changes: 22 additions & 0 deletions charts/backstage/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,28 @@ Return the Lightspeed ConfigMap volume name.
{{- printf "lightspeed-config-%s" .name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Return the computed EXTRA_CATALOG_INDEX_IMAGES env var value from
global.catalogIndex.extraImages. Returns an empty string when no extra
images are configured.
*/}}
{{- define "rhdh.catalogIndex.extraImagesEnvValue" -}}
{{- $root := . -}}
{{- $imgs := list -}}
{{- range (.Values.global.catalogIndex.extraImages | default list) -}}
{{- $item := include "common.tplvalues.render" (dict "value" . "context" $root) | fromYaml -}}
{{- $ref := printf "%s/%s:%s" $item.registry $item.repository $item.tag -}}
{{- if $item.name -}}
{{- if or (contains "," $item.name) (contains "=" $item.name) -}}
{{- fail (printf "global.catalogIndex.extraImages[].name %q must not contain ',' or '='" $item.name) -}}
{{- end -}}
{{- $ref = printf "%s=%s" $item.name $ref -}}
{{- end -}}
{{- $imgs = append $imgs $ref -}}
{{- end -}}
{{- join "," $imgs -}}
{{- end -}}

{{/*
DEPRECATED: The following templates are deprecated. Please use the corresponding "rhdh.*" templates instead.
*/}}
Expand Down
33 changes: 33 additions & 0 deletions charts/backstage/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,39 @@
"catalogIndex": {
"additionalProperties": false,
"properties": {
"extraImages": {
"default": [],
"items": {
"additionalProperties": false,
"properties": {
"name": {
"pattern": "^[A-Za-z0-9._-]+$",
"title": "Optional name for the extra catalog index image. Produces cleaner extraction directory names (e.g., /extra/community/).",
"type": "string"
},
"registry": {
"title": "Extra catalog index image registry",
"type": "string"
},
"repository": {
"title": "Extra catalog index image repository",
"type": "string"
},
"tag": {
"title": "Extra catalog index image tag",
"type": "string"
}
},
"required": [
"registry",
"repository",
"tag"
],
"type": "object"
},
"title": "Extra catalog index images for additional plugin discovery in the Extensions UI. Only catalog entities are extracted from extra images (no dynamic-plugins.default.yaml handling).",
"type": "array"
},
"image": {
"additionalProperties": false,
"properties": {
Expand Down
33 changes: 33 additions & 0 deletions charts/backstage/values.schema.tmpl.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,39 @@
"default": "1.9"
}
}
},
"extraImages": {
"title": "Extra catalog index images for additional plugin discovery in the Extensions UI. Only catalog entities are extracted from extra images (no dynamic-plugins.default.yaml handling).",
"type": "array",
"default": [],
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"registry",
"repository",
"tag"
],
"properties": {
"name": {
"pattern": "^[A-Za-z0-9._-]+$",
"title": "Optional name for the extra catalog index image. Produces cleaner extraction directory names (e.g., /extra/community/).",
"type": "string"
},
"registry": {
"title": "Extra catalog index image registry",
"type": "string"
},
"repository": {
"title": "Extra catalog index image repository",
"type": "string"
},
"tag": {
"title": "Extra catalog index image tag",
"type": "string"
}
}
}
}
}
},
Expand Down
12 changes: 12 additions & 0 deletions charts/backstage/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ global:
registry: quay.io
repository: rhdh/plugin-catalog-index
tag: "1.10"
# -- Extra catalog index images for additional plugin discovery in the Extensions UI.
# Each item must include `registry`, `repository`, and `tag` fields; `name` is optional.
# Only catalog entities are extracted from extra images (no `dynamic-plugins.default.yaml` handling).
# @default -- `[]`
extraImages: []
# - name: community
# registry: ghcr.io
# repository: redhat-developer/rhdh-plugin-community-index
# tag: "1.10"
# - registry: my-registry.example.com
# repository: my-org/my-rhdh-internal-plugin-catalog
# tag: "1.2.3"
# -- Built-in Lightspeed feature configuration.
# @default -- Use Lightspeed compatible settings / configurations.
lightspeed:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{{- if $lightspeed.enabled -}}
{{- $lightspeedRuntimeVolumeType = include "rhdh.lightspeed.runtimeVolumeType" (dict "volume" $lightspeed.runtimeVolume "path" "global.lightspeed.runtimeVolume") -}}
{{- end -}}
{{- $extraCatalogImages := include "rhdh.catalogIndex.extraImagesEnvValue" . | trim -}}
---
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
Expand Down Expand Up @@ -114,7 +115,19 @@ spec:
{{- if or .Values.backstage.initContainers $lightspeed.enabled }}
initContainers:
{{- if .Values.backstage.initContainers }}
{{- include "common.tplvalues.render" ( dict "value" .Values.backstage.initContainers "context" $) | nindent 8 }}
{{- range .Values.backstage.initContainers }}
{{- $container := include "common.tplvalues.render" (dict "value" . "context" $) | fromYaml }}
{{- if and $extraCatalogImages (eq (index $container "name") "install-dynamic-plugins") }}
{{- $hasExisting := false }}
{{- range (default list (index $container "env")) }}
{{- if eq (default "" .name) "EXTRA_CATALOG_INDEX_IMAGES" }}{{ $hasExisting = true }}{{ end }}
{{- end }}
{{- if not $hasExisting }}
{{- $_ := set $container "env" (append (default list (index $container "env")) (dict "name" "EXTRA_CATALOG_INDEX_IMAGES" "value" $extraCatalogImages)) }}
{{- end }}
{{- end }}
- {{ $container | toYaml | nindent 10 | trim }}
{{- end }}
{{- end }}
{{- if $lightspeed.enabled }}
- name: {{ $lightspeed.initContainer.name }}
Expand Down
25 changes: 25 additions & 0 deletions docs/catalog-index-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,31 @@ global:
tag: "1.9"
```

## Extra catalog index images

You can configure additional catalog index images alongside the primary one using `global.catalogIndex.extraImages`. Each extra image contributes catalog entities only to the Extensions UI — only the primary `CATALOG_INDEX_IMAGE` is used for extracting and handling the `dynamic-plugins.default.yaml`.

```yaml
global:
catalogIndex:
image:
registry: quay.io
repository: rhdh/plugin-catalog-index
tag: "1.10"
extraImages:
- name: community
registry: ghcr.io
repository: redhat-developer/rhdh-plugin-community-index
tag: "1.10"
- registry: my-registry.example.com
repository: my-org/my-rhdh-internal-plugin-catalog
tag: "1.2.3"
```

Each entry requires `registry`, `repository`, and `tag` fields. The optional `name` field produces cleaner extraction directory names (e.g., `/extensions/extra/community/`); when omitted, the name is auto-derived from the image reference.

The chart constructs the `EXTRA_CATALOG_INDEX_IMAGES` environment variable for the `install-dynamic-plugins` init container as a comma-separated list. Named entries use the format `name=registry/repository:tag`, while unnamed entries use `registry/repository:tag`.

## Using a Private Registry

If your catalog index image is stored in a private registry that requires authentication, create a secret named `<release_name>-dynamic-plugins-registry-auth` containing an `auth.json` file with your registry credentials.
Expand Down
Loading