Skip to content

Commit 3815c79

Browse files
authored
Dev containerservice microsoft.container service 2021 07 01: add SecurityProfile (#15035)
* Add SecurityProfile to ManagedClusters * spaces * Space * spaces * json formatting * move from params to defs * :) * just another * now with npm
1 parent bd44820 commit 3815c79

File tree

2 files changed

+258
-0
lines changed

2 files changed

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

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,9 @@
549549
},
550550
"Create Managed Cluster with HTTP proxy configured": {
551551
"$ref": "./examples/ManagedClustersCreate_HTTPProxy.json"
552+
},
553+
"Create Managed Cluster with Security Profile configured": {
554+
"$ref": "./examples/ManagedClustersCreate_SecurityProfile.json"
552555
}
553556
}
554557
},
@@ -3469,6 +3472,10 @@
34693472
"httpProxyConfig": {
34703473
"$ref": "#/definitions/ManagedClusterHTTPProxyConfig",
34713474
"description": "Configurations for provisioning the cluster with HTTP proxy servers."
3475+
},
3476+
"securityProfile": {
3477+
"$ref": "#/definitions/ManagedClusterSecurityProfile",
3478+
"description": "Security profile for the managed cluster."
34723479
}
34733480
},
34743481
"description": "Properties of the managed cluster."
@@ -4925,6 +4932,30 @@
49254932
"readOnly": true
49264933
}
49274934
}
4935+
},
4936+
"ManagedClusterSecurityProfile": {
4937+
"type": "object",
4938+
"properties": {
4939+
"azureDefender": {
4940+
"$ref": "#/definitions/ManagedClusterSecurityProfileAzureDefender",
4941+
"description": "Azure Defender settings for the Security Profile."
4942+
}
4943+
},
4944+
"description": "Security Profile for the container service cluster."
4945+
},
4946+
"ManagedClusterSecurityProfileAzureDefender": {
4947+
"type": "object",
4948+
"properties": {
4949+
"enabled": {
4950+
"type": "boolean",
4951+
"description": "Whether to enable Azure Defender"
4952+
},
4953+
"logAnalyticsWorkspaceResourceId": {
4954+
"type": "string",
4955+
"description": "Resource Id of the Log Analytics workspace for Azure Defender to be associated with. This field is required and must be valid workspace resource id in case the Azure Defender settings are enabled and must be empty or not exists in case it is disabled"
4956+
}
4957+
},
4958+
"description": "Azure Defender settings for the Security Profile."
49284959
}
49294960
},
49304961
"parameters": {

0 commit comments

Comments
 (0)