Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 5. Customizing the Tech Radar page in the Red Hat Developer Hub
In Red Hat Developer Hub, the Tech Radar page is not enabled using the dynamic plugin feature in the Helm Chart.
Similar to Home page customization, the base Tech Radar URL must include the /developer-hub/tech-radar
proxy. You can provide the Tech Radar page data using the following ways:
Using JSON files that are hosted or GitHub or GitLab. To access the data from the JSON files, you can add the following code in the
app-config.yaml
file:proxy: endpoints: # Other Proxies # customize developer hub instance '/developer-hub': target: <DOMAIN_URL> # i.e https://raw.githubusercontent.com/ pathRewrite: '^/api/proxy/developer-hub/tech-radar': <path to json file> # i.e /janus-idp/backstage-showcase/main/packages/app/public/tech-radar/data-default.json '^/api/proxy/developer-hub': <path to json file> # i.e /janus-idp/backstage-showcase/main/packages/app/public/homepage/data.json changeOrigin: true secure: true # Change to "false" in case of using self hosted cluster with a self-signed certificate headers: <HEADER_KEY>: <HEADER_VALUE> # optional and can be passed as needed i.e Authorization can be passed for private GitHub repo and PRIVATE-TOKEN can be passed for private GitLab repo
NoteAs overlapping exist between the
pathRewrites
that are used for thetech-radar
andhomepage
quick access proxies, the configuration for thetech-radar
(^api/proxy/developer-hub/tech-radar
) must exist before the configuration for thehomepage
(^/api/proxy/developer-hub
).For more information about customizing the Home page in Red Hat Developer Hub, see Chapter 4, Customizing the Home page in Red Hat Developer Hub.
- Using a separate service that provides the Tech Radar data in JSON format using an API.
Prerequisites
- You have installed the Red Hat Developer Hub using Helm Chart. For more information, see Chapter 2, Installing Red Hat Developer Hub.
Procedure
Add the following code to the
app-config-rhdh.yaml
file:proxy: endpoints: # Other Proxies '/developer-hub/tech-radar': target: ${TECHRADAR_DATA_URL} changeOrigin: true # Change to "false" in case of using self hosted cluster with a self-signed certificate secure: true
Ensure that the API request call returns the response in JSON format.
Define the
TECHRADAR_DATA_URL`
ashttp://<SERVICE_NAME>/tech-radar
, for examplehttp://rhdh-customization-provider/tech-radar
.NoteYou can define the
TECHRADAR_DATA_URL
either by adding it torhdh-secrets
or directly replacing it with its value in your custom ConfigMap.- Delete the Developer Hub Pod to pull in the changes.