15.2. 为 Kubernetes 配置 Red Hat Advanced Cluster Security
使用 JIRA 服务器 URL 和用户凭证在 Red Hat Advanced Cluster Security for Kubernetes 中创建新集成。
流程
-
在 RHACS 门户网站中,进入 Platform Configuration
Integrations。 - 向下滚动到 Notifier Integrations 部分,然后选择 JIRA Software。
- 单击 New Integration。
- 输入 Integration Name 的名称。
- 在 Username 和 Password 或 API Token 框中输入用户凭证。
- 对于 Issue Type,请输入有效的 JIRA Issue Type,如 Task、sub-task 或 Bug。
- 在 JIRA URL 框中输入 JIRA 服务器 URL。
- 在 Default Project 框中输入您要在其中创建问题的项目密钥。
- 使用 注解键 For Project 在不同的 JIRA 项目中创建问题。
- 如果您在 JIRA 项目中使用自定义优先级,请使用 Priority Mapping 切换来配置自定义优先级。
如果您在 JIRA 项目中使用强制自定义字段,请在 Default Fields JSON (Necessary If Required Fields) 框中输入它们作为 JSON 值。例如:
{ "customfield_10004": 3, "customfield_20005": "Alerts", }
{ "customfield_10004": 3, "customfield_20005": "Alerts", }
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
选择 Test (
勾选标记
图标)来测试与 JIRA 的集成是否正常工作。 -
选择 Create (
save
icon)来创建配置。
15.2.1. 在不同的 JIRA 项目中创建问题 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
您可以配置 Red Hat Advanced Cluster Security for Kubernetes 在不同的 JIRA 项目中造成问题,以便直接进入正确的团队。
前提条件
- 您必须有一个有权访问将警报发送到的每个项目的帐户。
流程
在部署 YAML 文件中添加类似如下的注解:
jira/project-key: <jira_project_key>
jira/project-key: <jira_project_key>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
在配置 Red Hat Advanced Cluster Security for Kubernetes 时,在 Annotation Key For Project 字段中使用注解键
jira/project-key
。
配置完成后,如果部署在 YAML 文件中有一个注解,Red Hat Advanced Cluster Security for Kubernetes 会将警报发送到为该注解指定的项目。否则,警报将发送到 default 项目。
15.2.2. 在 JIRA 中配置自定义优先级 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
如果您在 JIRA 项目中使用自定义优先级,您可以在 Red Hat Advanced Cluster Security for Kubernetes 中配置它们。
流程
- 在 Red Hat Advanced Cluster Security for Kubernetes 中配置 JIRA 集成时,打开 优先级映射 切换。Red Hat Advanced Cluster Security for Kubernetes 获取 JIRA 项目模式,并自动填写 CRITICAL_SEVERITY, HIGH_SEVERITY, MEDIUM_SEVERITY, 和 LOW_SEVERITY 字段的值。
- 根据您的 JIRA 项目配置验证或更新优先级值。
-
选择 Test (
勾选标记
图标)来测试与 JIRA 的集成是否正常工作。 -
选择 Create (
save
icon)来创建配置。
注意
如果出现错误,请按照 故障排除 JIRA 集成 部分中的说明进行操作。