Skip to content

Commit e3572db

Browse files
tristanangharryli0108
authored andcommitted
Updating ContainerService event grid event schema to support new events (Azure#24105)
* update swagger definition to add new event types * add examples * better description * x-ms-examples * change to isOutOfSupport * update to enum * update to rollingProgressState * unroll events * examples * more examples * create base prop * fix object
1 parent c6b1de5 commit e3572db

File tree

11 files changed

+223
-0
lines changed

11 files changed

+223
-0
lines changed

specification/eventgrid/data-plane/Microsoft.ContainerService/stable/2018-01-01/ContainerService.json

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,114 @@
2727
"description": "The highest PATCH Kubernetes version considered preview for the ManagedCluster resource. There might not be any version in preview at the time of publishing the event",
2828
"type": "string"
2929
}
30+
},
31+
"x-ms-examples": {
32+
"newKubernetesVersionAvailableCloudEventsSchema": {
33+
"$ref": "./examples/cloud-events-schema/new_kubernetes_version_available.json"
34+
},
35+
"newKubernetesVersionAvailableEventGridSchema": {
36+
"$ref": "./examples/event-grid-schema/new_kubernetes_version_available.json"
37+
}
38+
}
39+
},
40+
"ContainerServiceClusterSupportEndedEventData": {
41+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ContainerService.ClusterSupportEnded event",
42+
"allOf": [
43+
{
44+
"$ref": "#/definitions/ContainerServiceClusterSupportBaseProperties"
45+
}
46+
],
47+
"x-ms-examples": {
48+
"clusterSupportEndedCloudEventsSchema": {
49+
"$ref": "./examples/cloud-events-schema/cluster_support_ended.json"
50+
},
51+
"clusterSupportEndedEventGridSchema": {
52+
"$ref": "./examples/event-grid-schema/cluster_support_ended.json"
53+
}
54+
}
55+
},
56+
"ContainerServiceClusterSupportEndingEventData": {
57+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ContainerService.ClusterSupportEnding event",
58+
"allOf": [
59+
{
60+
"$ref": "#/definitions/ContainerServiceClusterSupportBaseProperties"
61+
}
62+
],
63+
"x-ms-examples": {
64+
"clusterSupportEndingCloudEventsSchema": {
65+
"$ref": "./examples/cloud-events-schema/cluster_support_ending.json"
66+
},
67+
"clusterSupportEndingEventGridSchema": {
68+
"$ref": "./examples/event-grid-schema/cluster_support_ending.json"
69+
}
70+
}
71+
},
72+
"ContainerServiceNodePoolRollingStartedEventData": {
73+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ContainerService.NodePoolRollingStarted event",
74+
"allOf": [
75+
{
76+
"$ref": "#/definitions/ContainerServiceNodePoolRollingBaseProperties"
77+
}
78+
],
79+
"x-ms-examples": {
80+
"nodePoolRollingStartedCloudEventsSchema": {
81+
"$ref": "./examples/cloud-events-schema/node_pool_rolling_started.json"
82+
},
83+
"nodePoolRollingStartedEventGridSchema": {
84+
"$ref": "./examples/event-grid-schema/node_pool_rolling_started.json"
85+
}
86+
}
87+
},
88+
"ContainerServiceNodePoolRollingSucceededEventData": {
89+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ContainerService.NodePoolRollingSucceeded event",
90+
"allOf": [
91+
{
92+
"$ref": "#/definitions/ContainerServiceNodePoolRollingBaseProperties"
93+
}
94+
],
95+
"x-ms-examples": {
96+
"nodePoolRollingSucceededCloudEventsSchema": {
97+
"$ref": "./examples/cloud-events-schema/node_pool_rolling_succeeded.json"
98+
},
99+
"nodePoolRollingSucceededEventGridSchema": {
100+
"$ref": "./examples/event-grid-schema/node_pool_rolling_succeeded.json"
101+
}
102+
}
103+
},
104+
"ContainerServiceNodePoolRollingFailedEventData": {
105+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.ContainerService.NodePoolRollingFailed event",
106+
"allOf": [
107+
{
108+
"$ref": "#/definitions/ContainerServiceNodePoolRollingBaseProperties"
109+
}
110+
],
111+
"x-ms-examples": {
112+
"nodePoolRollingFailedCloudEventsSchema": {
113+
"$ref": "./examples/cloud-events-schema/node_pool_rolling_failed.json"
114+
},
115+
"nodePoolRollingFailedEventGridSchema": {
116+
"$ref": "./examples/event-grid-schema/node_pool_rolling_failed.json"
117+
}
118+
}
119+
},
120+
"ContainerServiceClusterSupportBaseProperties": {
121+
"description": "Schema of common properties of cluster support events",
122+
"type": "object",
123+
"properties": {
124+
"kubernetesVersion": {
125+
"description": "The Kubernetes version of the ManagedCluster resource",
126+
"type": "string"
127+
}
128+
}
129+
},
130+
"ContainerServiceNodePoolRollingBaseProperties": {
131+
"description": "Schema of common properties of node pool rolling events",
132+
"type": "object",
133+
"properties": {
134+
"nodePoolName": {
135+
"description": "The name of the node pool in the ManagedCluster resource",
136+
"type": "string"
137+
}
30138
}
31139
}
32140
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"source": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.ContainerService/managedClusters/{cluster}",
3+
"subject": "{cluster}",
4+
"type": "Microsoft.ContainerService.ClusterSupportEnded",
5+
"time": "2023-03-29T18:00:00.0000000Z",
6+
"id": "1234567890abcdef1234567890abcdef12345678",
7+
"data": {
8+
"kubernetesVersion": "1.23.15"
9+
},
10+
"specversion": "1.0"
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"source": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.ContainerService/managedClusters/{cluster}",
3+
"subject": "{cluster}",
4+
"type": "Microsoft.ContainerService.ClusterSupportEnding",
5+
"time": "2023-03-29T18:00:00.0000000Z",
6+
"id": "1234567890abcdef1234567890abcdef12345678",
7+
"data": {
8+
"kubernetesVersion": "1.24.10"
9+
},
10+
"specversion": "1.0"
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"source": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.ContainerService/managedClusters/{cluster}",
3+
"subject": "{cluster}",
4+
"type": "Microsoft.ContainerService.NodePoolRollingFailed",
5+
"time": "2023-03-29T18:00:00.0000000Z",
6+
"id": "1234567890abcdef1234567890abcdef12345678",
7+
"data": {
8+
"nodePoolName": "nodepool1"
9+
},
10+
"specversion": "1.0"
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"source": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.ContainerService/managedClusters/{cluster}",
3+
"subject": "{cluster}",
4+
"type": "Microsoft.ContainerService.NodePoolRollingStarted",
5+
"time": "2023-03-29T18:00:00.0000000Z",
6+
"id": "1234567890abcdef1234567890abcdef12345678",
7+
"data": {
8+
"nodePoolName": "nodepool1"
9+
},
10+
"specversion": "1.0"
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"source": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.ContainerService/managedClusters/{cluster}",
3+
"subject": "{cluster}",
4+
"type": "Microsoft.ContainerService.NodePoolRollingSucceeded",
5+
"time": "2023-03-29T18:00:00.0000000Z",
6+
"id": "1234567890abcdef1234567890abcdef12345678",
7+
"data": {
8+
"nodePoolName": "nodepool1"
9+
},
10+
"specversion": "1.0"
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"topic": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.ContainerService/managedClusters/{cluster}",
3+
"subject": "{cluster}",
4+
"eventType": "Microsoft.ContainerService.ClusterSupportEnded",
5+
"id": "1234567890abcdef1234567890abcdef12345678",
6+
"data": {
7+
"kubernetesVersion": "1.23.15"
8+
},
9+
"dataVersion": "1",
10+
"metadataVersion": "1",
11+
"eventTime": "2023-03-29T18:00:00.0000000Z"
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"topic": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.ContainerService/managedClusters/{cluster}",
3+
"subject": "{cluster}",
4+
"eventType": "Microsoft.ContainerService.ClusterSupportEnding",
5+
"id": "1234567890abcdef1234567890abcdef12345678",
6+
"data": {
7+
"kubernetesVersion": "1.24.10"
8+
},
9+
"dataVersion": "1",
10+
"metadataVersion": "1",
11+
"eventTime": "2023-03-29T18:00:00.0000000Z"
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"topic": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.ContainerService/managedClusters/{cluster}",
3+
"subject": "{cluster}",
4+
"eventType": "Microsoft.ContainerService.NodePoolRollingFailed",
5+
"id": "1234567890abcdef1234567890abcdef12345678",
6+
"data": {
7+
"nodePoolName": "nodepool1"
8+
},
9+
"dataVersion": "1",
10+
"metadataVersion": "1",
11+
"eventTime": "2023-03-29T18:00:00.0000000Z"
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"topic": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.ContainerService/managedClusters/{cluster}",
3+
"subject": "{cluster}",
4+
"eventType": "Microsoft.ContainerService.NodePoolRollingStarted",
5+
"id": "1234567890abcdef1234567890abcdef12345678",
6+
"data": {
7+
"nodePoolName": "nodepool1"
8+
},
9+
"dataVersion": "1",
10+
"metadataVersion": "1",
11+
"eventTime": "2023-03-29T18:00:00.0000000Z"
12+
}

0 commit comments

Comments
 (0)