Skip to content

Commit 217b039

Browse files
authored
add creationData to mc data (#18414)
* add creationData to mc data * fix test * fix format
1 parent e8f0fe9 commit 217b039

File tree

2 files changed

+231
-0
lines changed

2 files changed

+231
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-03-02-preview",
4+
"subscriptionId": "subid1",
5+
"resourceGroupName": "rg1",
6+
"resourceName": "clustername1",
7+
"parameters": {
8+
"location": "location1",
9+
"tags": {
10+
"tier": "production",
11+
"archv2": ""
12+
},
13+
"sku": {
14+
"name": "Basic",
15+
"tier": "Free"
16+
},
17+
"properties": {
18+
"kubernetesVersion": "",
19+
"dnsPrefix": "dnsprefix1",
20+
"creationData": {
21+
"sourceResourceId": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1"
22+
},
23+
"agentPoolProfiles": [
24+
{
25+
"name": "nodepool1",
26+
"count": 3,
27+
"vmSize": "Standard_DS2_v2",
28+
"osType": "Linux",
29+
"type": "VirtualMachineScaleSets",
30+
"enableNodePublicIP": true,
31+
"mode": "System",
32+
"enableFIPS": true
33+
}
34+
],
35+
"linuxProfile": {
36+
"adminUsername": "azureuser",
37+
"ssh": {
38+
"publicKeys": [
39+
{
40+
"keyData": "keydata"
41+
}
42+
]
43+
}
44+
},
45+
"servicePrincipalProfile": {
46+
"clientId": "clientid",
47+
"secret": "secret"
48+
}
49+
}
50+
}
51+
},
52+
"responses": {
53+
"200": {
54+
"body": {
55+
"id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1",
56+
"location": "location1",
57+
"name": "clustername1",
58+
"tags": {
59+
"archv2": "",
60+
"tier": "production"
61+
},
62+
"type": "Microsoft.ContainerService/ManagedClusters",
63+
"properties": {
64+
"provisioningState": "Succeeded",
65+
"creationData": {
66+
"sourceResourceId": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1"
67+
},
68+
"maxAgentPools": 1,
69+
"kubernetesVersion": "1.9.6",
70+
"dnsPrefix": "dnsprefix1",
71+
"agentPoolProfiles": [
72+
{
73+
"name": "nodepool1",
74+
"count": 3,
75+
"vmSize": "Standard_DS2_v2",
76+
"maxPods": 110,
77+
"osType": "Linux",
78+
"provisioningState": "Succeeded",
79+
"orchestratorVersion": "1.9.6",
80+
"type": "VirtualMachineScaleSets",
81+
"enableNodePublicIP": true,
82+
"mode": "System",
83+
"nodeImageVersion": "AKSUbuntu:1604:2020.03.11",
84+
"enableFIPS": true
85+
}
86+
],
87+
"linuxProfile": {
88+
"adminUsername": "azureuser",
89+
"ssh": {
90+
"publicKeys": [
91+
{
92+
"keyData": "keydata"
93+
}
94+
]
95+
}
96+
},
97+
"servicePrincipalProfile": {
98+
"clientId": "clientid"
99+
},
100+
"nodeResourceGroup": "MC_rg1_clustername1_location1",
101+
"enableRBAC": true,
102+
"fqdn": "dnsprefix1-abcd1234.hcp.eastus.azmk8s.io",
103+
"networkProfile": {
104+
"loadBalancerSku": "basic",
105+
"networkPlugin": "kubenet",
106+
"podCidr": "10.244.0.0/16",
107+
"serviceCidr": "10.0.0.0/16",
108+
"dnsServiceIP": "10.0.0.10",
109+
"dockerBridgeCidr": "172.17.0.1/16",
110+
"outboundType": "loadBalancer",
111+
"podCidrs": [
112+
"10.244.0.0/16"
113+
],
114+
"serviceCidrs": [
115+
"10.0.0.0/16"
116+
],
117+
"ipFamilies": [
118+
"IPv4"
119+
],
120+
"loadBalancerProfile": {
121+
"allocatedOutboundPorts": 2000,
122+
"idleTimeoutInMinutes": 10,
123+
"managedOutboundIPs": {
124+
"count": 2
125+
},
126+
"effectiveOutboundIPs": [
127+
{
128+
"id": "/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"
129+
},
130+
{
131+
"id": "/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"
132+
}
133+
]
134+
}
135+
}
136+
}
137+
}
138+
},
139+
"201": {
140+
"body": {
141+
"id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1",
142+
"location": "location1",
143+
"name": "clustername1",
144+
"tags": {
145+
"archv2": "",
146+
"tier": "production"
147+
},
148+
"type": "Microsoft.ContainerService/ManagedClusters",
149+
"properties": {
150+
"provisioningState": "Creating",
151+
"creationData": {
152+
"sourceResourceId": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1"
153+
},
154+
"maxAgentPools": 1,
155+
"kubernetesVersion": "1.9.6",
156+
"dnsPrefix": "dnsprefix1",
157+
"agentPoolProfiles": [
158+
{
159+
"name": "nodepool1",
160+
"count": 3,
161+
"vmSize": "Standard_DS2_v2",
162+
"maxPods": 110,
163+
"osType": "Linux",
164+
"provisioningState": "Creating",
165+
"orchestratorVersion": "1.9.6",
166+
"type": "VirtualMachineScaleSets",
167+
"enableNodePublicIP": true,
168+
"mode": "System",
169+
"enableFIPS": true
170+
}
171+
],
172+
"linuxProfile": {
173+
"adminUsername": "azureuser",
174+
"ssh": {
175+
"publicKeys": [
176+
{
177+
"keyData": "keydata"
178+
}
179+
]
180+
}
181+
},
182+
"servicePrincipalProfile": {
183+
"clientId": "clientid"
184+
},
185+
"nodeResourceGroup": "MC_rg1_clustername1_location1",
186+
"enableRBAC": true,
187+
"networkProfile": {
188+
"networkPlugin": "kubenet",
189+
"podCidr": "10.244.0.0/16",
190+
"serviceCidr": "10.0.0.0/16",
191+
"dnsServiceIP": "10.0.0.10",
192+
"dockerBridgeCidr": "172.17.0.1/16",
193+
"loadBalancerSku": "standard",
194+
"outboundType": "loadBalancer",
195+
"podCidrs": [
196+
"10.244.0.0/16"
197+
],
198+
"serviceCidrs": [
199+
"10.0.0.0/16"
200+
],
201+
"ipFamilies": [
202+
"IPv4"
203+
],
204+
"loadBalancerProfile": {
205+
"allocatedOutboundPorts": 2000,
206+
"idleTimeoutInMinutes": 10,
207+
"managedOutboundIPs": {
208+
"count": 2
209+
},
210+
"effectiveOutboundIPs": [
211+
{
212+
"id": "/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"
213+
},
214+
{
215+
"id": "/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"
216+
}
217+
]
218+
}
219+
}
220+
}
221+
}
222+
}
223+
}
224+
}

specification/containerservice/resource-manager/Microsoft.ContainerService/preview/2022-03-02-preview/managedClusters.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,9 @@
576576
"Create Managed Cluster using an agent pool snapshot": {
577577
"$ref": "./examples/ManagedClustersCreate_Snapshot.json"
578578
},
579+
"Create Managed Cluster using a managed cluster snapshot": {
580+
"$ref": "./examples/ManagedClustersCreate_MCSnapshot.json"
581+
},
579582
"Create/Update Managed Cluster with Windows gMSA enabled": {
580583
"$ref": "./examples/ManagedClustersCreate_UpdateWindowsGmsa.json"
581584
},
@@ -3984,6 +3987,10 @@
39843987
"description": "The Power State of the cluster.",
39853988
"readOnly": true
39863989
},
3990+
"creationData": {
3991+
"$ref": "#/definitions/CreationData",
3992+
"description": "CreationData to be used to specify the source Snapshot ID if the cluster will be created/upgraded using a snapshot."
3993+
},
39873994
"maxAgentPools": {
39883995
"readOnly": true,
39893996
"type": "integer",

0 commit comments

Comments
 (0)