第 4 章 管理仪表板中显示的应用程序
4.1. 将应用程序添加到仪表板中
如果您在 OpenShift 集群中安装了应用程序,您可以在 OpenShift AI 仪表板(Application
先决条件
- 具有集群管理员特权。
-
仪表板配置启用选项被设置为
true
(默认值)。请注意,集群管理员可以禁用此功能,如防止用户将应用程序添加到仪表板 中所述。
流程
- 以集群管理员身份登录 OpenShift 控制台。
-
在 Administrator 视角中,点 Home
API Explorer。 -
在 API Explorer 页面中,搜索
OdhApplication
kind。 -
点
OdhApplication
kind 打开资源详情页面。 -
在 OdhApplication details 页面中,从 Project 列表中选择
redhat-ods-applications
项目。 - 点 实例 选项卡。
- 单击 Create OdhApplication。
在 Create OdhApplication 页面中,复制以下代码并将其粘贴到 YAML 编辑器中。
apiVersion: dashboard.opendatahub.io/v1 kind: OdhApplication metadata: name: examplename namespace: redhat-ods-applications labels: app: odh-dashboard app.kubernetes.io/part-of: odh-dashboard spec: enable: validationConfigMap: examplename-enable img: >- <svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="path data" fill="#ee0000"/> </svg> getStartedLink: 'https://example.org/docs/quickstart.html' route: exampleroutename routeNamespace: examplenamespace displayName: Example Name kfdefApplications: [] support: third party support csvName: '' provider: example docsLink: 'https://example.org/docs/index.html' quickStart: '' getStartedMarkDown: >- # Example Enter text for the information panel. description: >- Enter summary text for the tile. category: Self-managed | Partner managed | {org-name} managed
修改应用程序代码中的参数。
提示要查看 YAML 文件示例,点 Home
API Explorer,选择 OdhApplication
,点 Instances 选项卡,选择一个实例,然后点击 YAML 选项卡。- 点 Create。此时会出现应用程序详情页面。
- 登录到 OpenShift AI。
-
在左侧菜单中,点击 Applications
Explore。 - 找到应用程序的新标题并点它。
- 在应用程序的信息窗格中,单击 启用。
验证
-
在 OpenShift AI 仪表板的左侧菜单中,点 Applications
Enabled 并验证您的应用程序是否可用。