Skip to content

Commit 69d5ec8

Browse files
authored
RHIDP-4862 - Update Tech Radar to 1.0 (redhat-developer#708)
* Incorporated changes * incorporated kashish's comment * comments
1 parent 70f0ee4 commit 69d5ec8

File tree

1 file changed

+21
-44
lines changed

1 file changed

+21
-44
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
[id='proc-customize-rhdh-tech-radar-page_{context}']
22
= Customizing the Tech Radar page in {product}
33

4-
In {product}, the Tech Radar page is provided by the `tech-radar` dynamic plugin, which is disabled by default. For information about enabling dynamic plugins in {product} see link:{LinkPluginsGuide}[Configuring plugins in {product}].
5-
6-
In {product}, you can configure Learning Paths by passing the data into the `app-config.yaml` file as a proxy. The base Tech Radar URL must include the `/developer-hub/tech-radar` proxy.
7-
8-
[NOTE]
9-
====
10-
Due to the use of overlapping `pathRewrites` for both the `tech-radar` and `homepage` quick access proxies, you must create the `tech-radar` configuration (`^api/proxy/developer-hub/tech-radar`) before you create the `homepage` configuration (`^/api/proxy/developer-hub`).
11-
12-
For more information about customizing the Home page in {product}, see xref:proc-customize-rhdh-homepage_rhdh-getting-started[Customizing the Home page in {product}].
13-
====
4+
In {product}, the Tech Radar page is provided by the `tech-radar` and `tech-radar-backend` dynamic plugins, which are disabled by default.
5+
For information about enabling dynamic plugins in {product} see link:{LinkPluginsGuide}[Configuring plugins in {product}].
146

157
You can provide data to the Tech Radar page from the following sources:
168

@@ -21,33 +13,22 @@ You can provide data to the Tech Radar page from the following sources:
2113

2214
.Prerequisites
2315

24-
You have installed {product} by using either the Operator or Helm chart.
25-
For more information, see xref:{installing-on-ocp-book-url}#assembly-install-rhdh-ocp[{installing-on-ocp-book-title}].
16+
* You have installed {product} by using either the Operator or Helm chart. For more information, see link:{installing-on-ocp-book-url}[{installing-on-ocp-book-title}].
17+
* You have specified the data sources for the Tech Radar plugin in the `integrations` section of the `app-config.yaml` file. For example, to configure GitHub as an authentication provider, see link:{authentication-book-url}#authenticating-with-github[Authenticating with GitHub].
2618

2719
.Procedure
2820

2921
To access the data from the JSON files, complete the following step:
3022

31-
* Add the following code to the `app-config.yaml` file:
23+
. Enable the `./dynamic-plugins/dist/backstage-community-plugin-tech-radar` and `/dynamic-plugins/dist/backstage-community-plugin-tech-radar-backend-dynamic` plugins.
24+
. Add the following code to the `app-config.yaml` file:
3225
+
3326
[source,yaml]
3427
----
35-
proxy:
36-
endpoints:
37-
# Other Proxies
38-
# customize developer hub instance
39-
'/developer-hub':
40-
target: <DOMAIN_URL> # i.e https://raw.githubusercontent.com/
41-
pathRewrite:
42-
'^/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
43-
'^/api/proxy/developer-hub': <path to json file> # i.e /janus-idp/backstage-showcase/main/packages/app/public/homepage/data.json
44-
changeOrigin: true
45-
secure: true
46-
47-
# Change to "false" in case of using self hosted cluster with a self-signed certificate
48-
headers:
49-
<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
28+
techRadar:
29+
url: ${TECH_RADAR_DATA_URL} <1>
5030
----
31+
<1> `TECH_RADAR_DATA_URL` is the URL from which the JSON data is loaded.
5132

5233
== Using a dedicated service to provide data to the Tech Radar page
5334

@@ -66,24 +47,20 @@ For more information, see xref:{installing-on-ocp-book-url}#assembly-install-rhd
6647

6748
To use a separate service to provide the Tech Radar data, complete the following steps:
6849

69-
. Add the following code to the `app-config-rhdh.yaml` file:
50+
. Add the dedicated service as an allowed host by adding the following code to the `app-config.yaml` file:
7051
+
7152
[source,yaml]
7253
----
73-
proxy:
74-
endpoints:
75-
# Other Proxies
76-
'/developer-hub/tech-radar':
77-
target: ${TECHRADAR_DATA_URL}
78-
changeOrigin: true
79-
# Change to "false" in case of using self hosted cluster with a self-signed certificate
80-
secure: true
54+
backend:
55+
reading:
56+
allow:
57+
- host: 'hostname'
8158
----
82-
where the `TECHRADAR_DATA_URL` is defined as `pass:c[http://<SERVICE_NAME>/tech-radar]`, for example, `pass:c[http://rhdh-customization-provider/tech-radar]`.
83-
+
84-
[NOTE]
85-
====
86-
You can define the `TECHRADAR_DATA_URL` by adding it to `rhdh-secrets` or by directly replacing it with its value in your custom ConfigMap.
87-
====
59+
. Add the following to the `app-config.yaml` file:
8860
+
89-
. Delete the {product-short} pod to ensure that the new configurations are loaded correctly.
61+
[source,yaml]
62+
----
63+
techRadar:
64+
url: ${TECH_RADAR_DATA_URL} <1>
65+
----
66+
<1> `TECH_RADAR_DATA_URL` is the URL from which the JSON data is loaded.

0 commit comments

Comments
 (0)