Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ec3e241

Browse files
authored
allow disabling of runcommand (#15092)
* allow disabling of runcommand * format error * format with example * change enable to disable
1 parent 4385826 commit ec3e241

File tree

2 files changed

+252
-0
lines changed

2 files changed

+252
-0
lines changed
Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-07-01",
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+
"agentPoolProfiles": [
21+
{
22+
"name": "nodepool1",
23+
"count": 3,
24+
"vmSize": "Standard_DS2_v2",
25+
"osType": "Linux",
26+
"type": "VirtualMachineScaleSets",
27+
"enableNodePublicIP": true,
28+
"mode": "System",
29+
"enableEncryptionAtHost": true
30+
}
31+
],
32+
"linuxProfile": {
33+
"adminUsername": "azureuser",
34+
"ssh": {
35+
"publicKeys": [
36+
{
37+
"keyData": "keydata"
38+
}
39+
]
40+
}
41+
},
42+
"networkProfile": {
43+
"loadBalancerSku": "standard",
44+
"outboundType": "loadBalancer",
45+
"loadBalancerProfile": {
46+
"managedOutboundIPs": {
47+
"count": 2
48+
}
49+
}
50+
},
51+
"autoScalerProfile": {
52+
"scan-interval": "20s",
53+
"scale-down-delay-after-add": "15m"
54+
},
55+
"windowsProfile": {
56+
"adminUsername": "azureuser",
57+
"adminPassword": "replacePassword1234$"
58+
},
59+
"servicePrincipalProfile": {
60+
"clientId": "clientid",
61+
"secret": "secret"
62+
},
63+
"apiServerAccessProfile": {
64+
"disableRunCommand": true
65+
},
66+
"addonProfiles": {},
67+
"enableRBAC": true,
68+
"enablePodSecurityPolicy": true
69+
}
70+
}
71+
},
72+
"responses": {
73+
"200": {
74+
"body": {
75+
"id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1",
76+
"location": "location1",
77+
"name": "clustername1",
78+
"tags": {
79+
"archv2": "",
80+
"tier": "production"
81+
},
82+
"type": "Microsoft.ContainerService/ManagedClusters",
83+
"properties": {
84+
"provisioningState": "Succeeded",
85+
"maxAgentPools": 1,
86+
"kubernetesVersion": "1.9.6",
87+
"dnsPrefix": "dnsprefix1",
88+
"agentPoolProfiles": [
89+
{
90+
"name": "nodepool1",
91+
"count": 3,
92+
"vmSize": "Standard_DS2_v2",
93+
"maxPods": 110,
94+
"osType": "Linux",
95+
"provisioningState": "Succeeded",
96+
"orchestratorVersion": "1.9.6",
97+
"type": "VirtualMachineScaleSets",
98+
"enableNodePublicIP": true,
99+
"mode": "System",
100+
"nodeImageVersion": "AKSUbuntu:1604:2020.03.11",
101+
"enableEncryptionAtHost": true
102+
}
103+
],
104+
"linuxProfile": {
105+
"adminUsername": "azureuser",
106+
"ssh": {
107+
"publicKeys": [
108+
{
109+
"keyData": "keydata"
110+
}
111+
]
112+
}
113+
},
114+
"windowsProfile": {
115+
"adminUsername": "azureuser"
116+
},
117+
"servicePrincipalProfile": {
118+
"clientId": "clientid"
119+
},
120+
"apiServerAccessProfile": {
121+
"disableRunCommand": true
122+
},
123+
"nodeResourceGroup": "MC_rg1_clustername1_location1",
124+
"enableRBAC": true,
125+
"enablePodSecurityPolicy": true,
126+
"fqdn": "dnsprefix1-ee788a1f.hcp.location1.azmk8s.io",
127+
"privateFQDN": "dnsprefix1-aae7e0f0.5cef6058-b6b5-414d-8cb1-4bd14eb0b15c.privatelink.location1.azmk8s.io",
128+
"networkProfile": {
129+
"loadBalancerSku": "basic",
130+
"networkPlugin": "kubenet",
131+
"podCidr": "10.244.0.0/16",
132+
"serviceCidr": "10.0.0.0/16",
133+
"dnsServiceIP": "10.0.0.10",
134+
"dockerBridgeCidr": "172.17.0.1/16",
135+
"outboundType": "loadBalancer",
136+
"loadBalancerProfile": {
137+
"allocatedOutboundPorts": 2000,
138+
"idleTimeoutInMinutes": 10,
139+
"managedOutboundIPs": {
140+
"count": 2
141+
},
142+
"effectiveOutboundIPs": [
143+
{
144+
"id": "/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"
145+
},
146+
{
147+
"id": "/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"
148+
}
149+
]
150+
}
151+
},
152+
"autoScalerProfile": {
153+
"scan-interval": "20s",
154+
"scale-down-delay-after-add": "15m"
155+
}
156+
}
157+
}
158+
},
159+
"201": {
160+
"body": {
161+
"id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1",
162+
"location": "location1",
163+
"name": "clustername1",
164+
"tags": {
165+
"archv2": "",
166+
"tier": "production"
167+
},
168+
"type": "Microsoft.ContainerService/ManagedClusters",
169+
"properties": {
170+
"provisioningState": "Creating",
171+
"maxAgentPools": 1,
172+
"kubernetesVersion": "1.9.6",
173+
"dnsPrefix": "dnsprefix1",
174+
"agentPoolProfiles": [
175+
{
176+
"name": "nodepool1",
177+
"count": 3,
178+
"vmSize": "Standard_DS2_v2",
179+
"maxPods": 110,
180+
"osType": "Linux",
181+
"provisioningState": "Creating",
182+
"orchestratorVersion": "1.9.6",
183+
"type": "VirtualMachineScaleSets",
184+
"enableNodePublicIP": true,
185+
"mode": "System",
186+
"enableEncryptionAtHost": true
187+
}
188+
],
189+
"linuxProfile": {
190+
"adminUsername": "azureuser",
191+
"ssh": {
192+
"publicKeys": [
193+
{
194+
"keyData": "keydata"
195+
}
196+
]
197+
}
198+
},
199+
"windowsProfile": {
200+
"adminUsername": "azureuser"
201+
},
202+
"servicePrincipalProfile": {
203+
"clientId": "clientid"
204+
},
205+
"apiServerAccessProfile": {
206+
"disableRunCommand": true
207+
},
208+
"nodeResourceGroup": "MC_rg1_clustername1_location1",
209+
"enableRBAC": true,
210+
"fqdn": "dnsprefix1-ee788a1f.hcp.location1.azmk8s.io",
211+
"privateFQDN": "dnsprefix1-aae7e0f0.5cef6058-b6b5-414d-8cb1-4bd14eb0b15c.privatelink.location1.azmk8s.io",
212+
"enablePodSecurityPolicy": true,
213+
"networkProfile": {
214+
"networkPlugin": "kubenet",
215+
"podCidr": "10.244.0.0/16",
216+
"serviceCidr": "10.0.0.0/16",
217+
"dnsServiceIP": "10.0.0.10",
218+
"dockerBridgeCidr": "172.17.0.1/16",
219+
"loadBalancerSku": "standard",
220+
"outboundType": "loadBalancer",
221+
"loadBalancerProfile": {
222+
"allocatedOutboundPorts": 2000,
223+
"idleTimeoutInMinutes": 10,
224+
"managedOutboundIPs": {
225+
"count": 2
226+
},
227+
"effectiveOutboundIPs": [
228+
{
229+
"id": "/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"
230+
},
231+
{
232+
"id": "/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"
233+
}
234+
]
235+
}
236+
},
237+
"autoScalerProfile": {
238+
"scan-interval": "20s",
239+
"scale-down-delay-after-add": "15m"
240+
}
241+
}
242+
}
243+
}
244+
}
245+
}

specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-07-01/managedClusters.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,9 @@
541541
"Create Managed Private Cluster with Public FQDN specified": {
542542
"$ref": "./examples/ManagedClustersCreate_PrivateClusterPublicFQDN.json"
543543
},
544+
"Create Managed Cluster with RunCommand disabled": {
545+
"$ref": "./examples/ManagedClustersCreate_DisableRunCommand.json"
546+
},
544547
"Create Managed Cluster with Node Public IP Prefix": {
545548
"$ref": "./examples/ManagedClustersCreate_NodePublicIPPrefix.json"
546549
},
@@ -3530,6 +3533,10 @@
35303533
"enablePrivateClusterPublicFQDN": {
35313534
"type": "boolean",
35323535
"description": "Whether to create additional public FQDN for private cluster or not."
3536+
},
3537+
"disableRunCommand": {
3538+
"type": "boolean",
3539+
"description": "Whether to disable run command for the cluster or not."
35333540
}
35343541
},
35353542
"description": "Access profile for managed cluster API server."

0 commit comments

Comments
 (0)