集群通知

Cluster Notification 为工作负载集群提供独立的通知能力,支持多种通道和灵活配置,以确保在分布式环境中稳定、高效地传递消息。

前提条件

  • version: >= v4.2
  • Plugin version: >= v1.0

安装

下载插件包

登录到软件包门户,并下载最新的 Cluster Notification 插件包。

使用 violet 将插件推送到平台

使用 violet 将 Cluster Notification 插件推送到平台:

violet push aiops-notification-business.ALL.vx.x.x.tgz \
  --platform-address https://<platform-address>/ \
  --platform-token "<platform_token>"

对于非交互式使用,建议优先使用 --platform-token,而不是用户名和密码。Identity Provider (IdP) 用户必须使用平台令牌。有关所有身份验证选项,请参见 Upload Packages

通过 Web 控制台安装

  1. 导航到 管理员 > Marketplace > 集群插件
  2. 搜索 Alauda Container Platform Cluster Notification,然后单击查看其详情
  3. 单击 安装
  4. 选择目标集群并确认安装

通过 YAML 安装

apiVersion: cluster.alauda.io/v1alpha1
kind: ModuleInfo
metadata:
  annotations:
    cpaas.io/display-name: aiops-notification-business
    cpaas.io/module-name: '{"en": "Alauda Container Platform Cluster Notification",
      "zh": "Alauda Container Platform Cluster Notification"}'
  labels:
    cpaas.io/cluster-name: <cluster-name>               # Target cluster name
    cpaas.io/module-name: aiops-notification-business
    cpaas.io/module-type: plugin
    cpaas.io/product: Platform-Center
  name: aiops-notification-<cluster-name>             # Resource name            
spec:
  version: v1.0.0                                       # Plugin version

配置 Email 服务

插件安装后,默认不包含任何通知配置。用户需要手动创建相关的 YAML 配置。该配置需要创建在与插件相同的集群中。

Email Server 配置

apiVersion: v1
kind: Secret
metadata:
  annotations:
  labels:
    cpaas.io/notification.server.category: Email
    cpaas.io/notification.server.type: Email
  name: platform-email-server
  namespace: cpaas-system
type: NotificationServer
data:
  displayNameEn: RW1haWw=
  displayNameZh: 6YKu5Lu2
  from: dGVzdEBleGFtcGxlLmNvbQo=
  host: bWFpbC5leGFtcGxlLmNvbQo=
  insecureSkipVerify: dHJ1ZQ==
  password: MTIzNDU2Cg==
  port: NDY1
  sslEnabled: dHJ1ZQ==
  username: dGVzdEBleGFtcGxlLmNvbQo=

字段说明

字段说明
displayNameEn英文显示名称
displayNameZh中文显示名称
from发件人邮箱地址(例如,test@example.com
hostEmail 服务地址(例如,mail.example.com)
portEmail 服务端口
username发件人用户名
password发件人密码
sslEnabled启用 SSL(true/false)
insecureSkipVerify跳过证书验证(默认值:true)

注意:secret data 中的所有字段值都必须使用 base64 编码。用户只需更新 data 部分中的信息。