This documentation is for a release that is no longer maintained
See documentation for the latest supported version.第 5 章 在 Red Hat Developer Hub 中自定义 Tech Radar 页面
在 Red Hat Developer Hub 中,技术 Radar 页面由 tech-radar
动态插件提供,该插件默认为禁用。有关在 Red Hat Developer Hub 中启用动态插件的详情,请参考 在 Red Hat Developer Hub 中配置插件。
在 Red Hat Developer Hub 中,您可以通过将数据作为代理传递给 app-config.yaml
文件来配置学习路径。基础技术 Radar URL 必须包含 /developer-hub/tech-radar
代理。
由于将重叠的 pathRewrite
用于
和 tech-radar
homepage
快速访问代理,因此您必须在创建 主页
配置(^api/proxy/developer-hub/tech-radar
)前创建 tech-radar 配置(^/api/proxy/developer-hub
)。
有关在 Red Hat Developer Hub 中自定义 Home 页面的更多信息,请参阅 Red Hat Developer Hub 中的自定义 Home 页面。
您可以从以下源向 Tech Radar 页面提供数据:
- 托管在 GitHub 或 GitLab 上的 JSON 文件。
- 使用 API 以 JSON 格式提供 Tech Radar 数据的专用服务。
5.1. 使用托管 JSON 文件向 Tech Radar 页面提供数据
先决条件
已使用 Operator 或 Helm Chart 安装 Red Hat Developer Hub。如需更多信息,请参阅在 OpenShift Container Platform 上安装 Red Hat Developer Hub。
流程
要从 JSON 文件中访问数据,请完成以下步骤:
将以下代码添加到
app-config.yaml
文件中: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
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
Copy to Clipboard Copied!