后台港湾后端插件
此插件将显示有关您在港湾内嵌入图像的信息 .
这是一个分叉,没有向后兼容的承诺。 但已经在后台1.29.x(本插件0.4.2版)和1.37.x(0.6.0版)上进行了测试.
关于原始代码,请参见: GitHub 重传
开始
第一届 安装前端
启用后端
后端
yarn --cwd packages/backend add @digitalist-open-cloud/backstage-plugin-harbor-backend
添加为 packages/backend/src/index.ts数字 :
backend.add(import('@digitalist-open-cloud/backstage-plugin-harbor-backend'))
现在,跳到配置步骤.
配置
插件需要在后台的 App-config.yaml 中配置才能连接到港湾API.
harbor:
# This is the traditional way of configuring the Harbor plugin.
baseUrl: https://harbor.yourdomain.com
username: ${HARBOR_USERNAME}
password: ${HARBOR_PASSWORD}
# This is the way to go if you need to connect to multiple Harbor instances. You can also combine those approaches.
instances:
- host: harbor2.yourdomain.com
baseUrl: https://harbor2.yourdomain.com
username: ${HARBOR_USERNAME}
password: ${HARBOR_PASSWORD}
在您的组件文件中添加注释和值 .
apiVersion: backstage.io/v1alpha1
kind: System
metadata:
name: sample-system
description: "A sample system"
annotations:
# This will use harbor.baseUrl
goharbor.io/repository-slug: project/repository
# OR
# This will use harbor.instances[].baseUrl based on the matching host
goharbor.io/repository-slug: harbor.yourdomain.com/project/repository
# OR
# This will fetch the first image from harbor.baseUrl and the second image from harbor.instances[].baseUrl
goharbor.io/repository-slug: project/repository, harbor.yourdomain.com/project/repository
捐款
请回捐 原始还原,您可以自由使用任何代码 从这repo 回到原来的repo 不给我们信用.