Observação
O acesso a essa página exige autorização. Você pode tentar entrar ou alterar diretórios.
O acesso a essa página exige autorização. Você pode tentar alterar os diretórios.
Azure Kubernetes Fleet Manager 旨在帮助客户以安全受控的方式升级多个 AKS 群集。 使用 Fleet Manager 服务可以创建工作流,以特定顺序升级 Kubernetes 群集。 由于升级存在重大风险,因此客户通常会在每个升级前后验证运行状况指标,以防止停机或回归。 为了增强此过程,Fleet Manager 支持使用 Gate 资源进行审批。 盖茨允许客户在工作流进行时批准升级,从而更好地控制多群集升级体验。 AKS 资源为 Azure Kubernetes 集群管理器更新操作门控提供 3 种事件类型:FleetGateCreated、FleetGateUpdated 和 FleetGateDeleted。
本文提供 Azure 资源通知 AKS 资源事件的属性和架构。 有关一般事件架构的简介,请参阅 Azure 事件网格事件架构。 此外,还可以找到生成的事件示例,以及有关如何为本主题类型创建系统主题的相关文章的链接。
事件类型
AKS 资源提供三种事件类型供使用:
| 事件类型 | Description |
|---|---|
Microsoft.ResourceNotifications.AKSResources.FleetGateCreated |
当 Azure Kubernetes Fleet Manager 的更新操作到达 Gate 资源的一个实例时触发。 |
Microsoft.ResourceNotifications.AKSResources.FleetGateUpdated |
当 Azure Kubernetes Fleet Manager 的更新运行门控资源状态从挂起变为已完成时触发。 |
Microsoft.ResourceNotifications.AKSResources.FleetGateDeleted |
删除包含 Gate 实例的 Azure Kubernetes Fleet Manager 更新运行时引发。 |
基于角色的访问控制
目前,这些事件仅在 Azure 订阅范围内发出。 这意味着为本主题类型创建事件订阅的实体会在此 Azure 订阅中接收通知。 出于安全原因,必须限制只有对整个 Azure 订阅具有读取访问权限的主体才能在本主题上创建事件订阅的功能。 若要通过此系统主题访问数据,除了事件网格所需的通用权限外,还需要以下 Azure 资源通知特定权限: Microsoft.ResourceNotifications/systemTopics/subscribeToAKSResources/action
事件架构
以下是架构:
{
"id": string,
"source": string,
"subject": string,
"type": string,
"time ": string,
"data": {
"resourceInfo": {
"id": string,
"name": string,
"type": string,
"properties": {
}
},
"operationalInfo":{
"resourceEventTime": date-time
},
"apiVersion": string
},
"specversion": string
}
事件具有以下顶级数据:
| 资产 | 类型 | Description |
|---|---|---|
id |
String | 事件的唯一标识符 |
source |
String | 为创建此系统主题的 Azure 订阅。 |
subject |
String | 发布者定义了发出该事件的基础资源路径。 |
type |
String | 此系统主题类型的已注册事件类型。 值为 Microsoft.ResourceNotifications.AKSResources.FleetGateCreated 或 Microsoft.ResourceNotifications.AKSResources.FleetGateUpdated 或 Microsoft.ResourceNotifications.AKSResources.FleetGateDeleted |
time |
字符串 格式: 2022-11-07T18:43:09.2894075Z |
根据提供程序的 UTC 时间生成事件的时间 |
data |
物体 | 包含特定于资源提供程序的事件数据。 有关详细信息,请参阅下表。 |
specversion |
String | CloudEvents 架构规范版本。 |
data 对象具有以下属性:
| 资产 | 类型 | Description |
|---|---|---|
resourceInfo |
物体 | 特定于资源的数据。 有关详细信息,请参阅下表。 |
apiVersion |
String | 资源属性的 API 版本。 |
operationalInfo |
物体 | 与资源相关的操作信息的详细信息。 |
resourceInfo 对象具有以下属性:
| 资产 | 类型 | Description |
|---|---|---|
id |
String | 发布者定义的事件主题路径 |
name |
String | 此字段指示事件 ID。它始终采用字段最后一部分 id 的值。 |
type |
String | 正在发出的事件的类型。 在此上下文中,要么是Microsoft.ResourceNotifications.AKSResources.FleetGateCreated,要么是Microsoft.ResourceNotifications.AKSResources.FleetGateUpdated,要么是Microsoft.ResourceNotifications.AKSResources.FleetGateDeleted |
properties |
物体 | 资源的有效负载。 有关详细信息,请参阅下表。 |
operationalInfo 对象具有以下属性:
| 资产 | 类型 | Description |
|---|---|---|
resourceEventTime |
日期时间 | 更新资源的日期和时间。 |
该 data 对象具有以下属性。
FleetGateCreated/FleetGateCreated/FleetGateDeleted 事件的属性
"properties": {
"displayName": string,
"gateType": string,
"provisioningState": string,
"state": string,
"target": object
}
properties 对象具有以下属性:
| 资产 | 类型 | Description |
|---|---|---|
displayName |
String | 在更新策略中定义审批关卡时提供的可选名称。 |
gateType |
String | Gate 的类型。 目前只有一个有效的“批准”选项。 |
provisioningState |
String | 网关资源的预配状态。 |
state |
String | 网关的状态。 “挂起”= 等待审批;“已完成”= 已批准。 |
target |
物体 | 门控制的目标。 |
该 target 对象具有以下属性。
target对象的属性
"target": {
"id": string,
"updateRunProperties": object,
}
对象中 target 属性的说明
| 资产 | 类型 | Description |
|---|---|---|
id |
String | 生成事件的更新运行的完整 Azure 资源标识符。 |
updateRunProperties |
物体 | 与更新运行相关的属性。 有关详细信息,请参阅下表 |
对象下 updateRunProperties 的属性
| 资产 | 类型 | Description |
|---|---|---|
group |
String | 应用 Gate 的更新组的名称。 仅适用于组。 |
name |
String | 生成事件的更新运行的名称。 |
stage |
String | 更新阶段的名称。 可以出现在阶段门和阶段内的组门。 |
timing |
String | 表示 Gate 是否在阶段或组之前或之后应用。 |
示例事件
FleetGateCreated 事件
以下示例显示了 FleetGateCreated 修改事件的架构:
{
"source": "/subscriptions/{subscription-id}",
"subject": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.ContainerService/fleets/{fleet-name}/gates/9i567df1-jh3a-281j-8eb8-123ac2el0t60",
"type": "Microsoft.ResourceNotifications.AksResources.FleetGateCreated",
"time": "2025-09-09T01:10:58.4955907Z",
"id": "m7m4mf0x-740g-4c2d-a0ab-a4r8h4uuf018",
"data": {
"resourceInfo": {
"id": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.ContainerService/fleets/{fleet-name}/gates/9i567df1-jh3a-281j-8eb8-123ac2el0t60",
"name": "9i567df1-jh3a-281j-8eb8-123ac2el0t60",
"type": "Microsoft.ContainerService/fleets/gates",
"properties": {
"displayName": "before-stage",
"gateType": "Approval",
"provisioningState": "Succeeded",
"state": "Pending",
"target": {
"id": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.ContainerService/fleets/{fleet-name}/updateRuns/run-1",
"updateRunProperties": {
"name": "run-1",
"stage": "stage-1",
"timing": "Before"
}
}
}
},
"operationalInfo": {
"resourceEventTime": "2025-09-08T18:10:58.4955907-07:00"
},
"apiVersion": "2025-04-01-preview"
},
"specVersion": "1.0"
}
FleetGateUpdated 事件
以下示例显示了 FleetGateUpdated 事件的架构:
{
"source": "/subscriptions/{subscription-id}",
"subject": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.ContainerService/fleets/{fleet-name}/gates/1k90uy67-e375-4xv6-z220-5197ekk1aka4",
"type": "Microsoft.ResourceNotifications.AksResources.FleetGateUpdated",
"time": "2025-09-09T01:12:25.8924289Z",
"id": "a9f8d51g-c114-4565-buee-5q1jb6fb0b08",
"data": {
"resourceInfo": {
"id": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.ContainerService/fleets/{fleet-name}/gates/1k90uy67-e375-4xv6-z220-5197ekk1aka4",
"name": "1k90uy67-e375-4xv6-z220-5197ekk1aka4",
"type": "Microsoft.ContainerService/fleets/gates",
"properties": {
"displayName": "before group",
"gateType": "Approval",
"provisioningState": "Succeeded",
"state": "Completed",
"target": {
"id": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.ContainerService/fleets/{fleet-name}/updateRuns/run-1",
"updateRunProperties": {
"group": "group-1",
"name": "run-1",
"stage": "stage-1",
"timing": "Before"
}
}
}
},
"operationalInfo": {
"resourceEventTime": "2025-09-08T18:12:25.8924289-07:00"
},
"apiVersion": "2025-04-01-preview"
},
"specVersion": "1.0"
}
FleetGateDeleted 事件
以下示例显示了已修改的 FleetGateDeleted 事件的架构:
{
"source": "/subscriptions/{subscription-id}",
"subject": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.ContainerService/fleets/{fleet-name}/gates/8a63212d-9dp1-4oa6-8135-14ghghg311ea6",
"type": "Microsoft.ResourceNotifications.AksResources.FleetGateDeleted",
"time": "2025-09-22T09:01:22.5495164Z",
"id": "48e92180-a34e-57b2-b989-7056ccd42c0b",
"data": {
"resourceInfo": {
"id": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.ContainerService/fleets/{fleet-name}/gates/8a63212d-9dp1-4oa6-8135-14ghghg311ea6",
"name": "8a63212d-9dp1-4oa6-8135-14ghghg311ea6",
"type": "Microsoft.ContainerService/fleets/gates",
"properties": {
"displayName": "stage-after",
"gateType": "Approval",
"provisioningState": "Succeeded",
"state": "Pending",
"target": {
"id": "/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.ContainerService/fleets/{fleet-name}/updateRuns/run-delete",
"updateRunProperties": {
"name": "run-delete",
"stage": "stage-1",
"timing": "After"
}
}
}
},
"operationalInfo": {
"resourceEventTime": "2025-09-22T02:01:22.5495164-07:00"
},
"apiVersion": "2025-04-01-preview"
},
"specVersion": "1.0"
}
联系我们
如果对此功能有任何疑问或反馈,请毫不犹豫地通过此 stackoverflow 链接联系我们
为了更好地帮助你提供有关特定事件的特定反馈,请提供以下信息:
对于缺少的事件:
- 系统主题类型名称
- 执行操作时的近似时间戳(UTC)
- 生成通知的基准资源 ID
- 导航到 Azure 门户中的资源,然后选择最右侧的 JSON 视图。 资源 ID 是 JSON 视图页上的第一个字段。
- 预期事件类型
- 已执行的操作(例如:VM 已启动或停止、创建了存储帐户等)
- 遇到问题的说明(例如,VM 已启动且未生成 Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged 事件)
- 如果可能,请提供所执行操作的相关 ID。
对于延迟或包含意外内容的事件
- 系统主题类型名称
- 整个通知内容(不包括 data.resourceInfo.properties)
- 遇到问题的说明和受影响的字段值
请确保在共享此数据时未提供任何最终用户身份信息。