Skip to content

Commit aa2d645

Browse files
authored
Add high logs scale support for ARC (#1491)
* add high logs scale support for ARC * update add privatelink scope & high log scale
1 parent 388f83c commit aa2d645

File tree

1 file changed

+52
-2
lines changed

1 file changed

+52
-2
lines changed

scripts/onboarding/templates/arc-k8s-extension-msi-auth/existingClusterOnboarding.json

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@
128128
"dceName":"[if(greater(length(variables('dcrName')), 43), substring(variables('dcrName'), 0, 43), variables('dcrName'))]",
129129
"dceAssociationName": "configurationAccessEndpoint",
130130
"dataCollectionEndpointId": "[resourceId(variables('clusterSubscriptionId'), variables('clusterResourceGroup'), 'Microsoft.Insights/dataCollectionEndpoints', variables('dceName'))]",
131+
"enableHighLogScaleMode": "[if(contains(parameters('streams'),'Microsoft-ContainerLogV2-HighScale'), bool('true'), bool('false'))]",
132+
"ingestionDCENameFull": "[Concat('MSCI-ingest', '-', variables('workspaceLocation'), '-', variables('clusterName'))]",
133+
"ingestionDCEName": "[if(greater(length(variables('ingestionDCENameFull')), 43), substring(variables('ingestionDCENameFull'), 0, 43), variables('ingestionDCENameFull'))]",
134+
"ingestionDCE": "[if(endsWith(variables('ingestionDCEName'), '-'), substring(variables('ingestionDCEName'), 0, 42), variables('ingestionDCEName'))]",
135+
"ingestionDataCollectionEndpointId": "[resourceId(variables('clusterSubscriptionId'), variables('clusterResourceGroup'), 'Microsoft.Insights/dataCollectionEndpoints', variables('ingestionDCE'))]",
131136
"privateLinkScopeName": "[split(parameters('azureMonitorPrivateLinkScopeResourceId'),'/')[8]]",
132137
"privateLinkScopeResourceGroup": "[split(parameters('azureMonitorPrivateLinkScopeResourceId'),'/')[4]]",
133138
"privateLinkScopeSubscriptionId": "[split(parameters('azureMonitorPrivateLinkScopeResourceId'),'/')[2]]",
@@ -178,7 +183,7 @@
178183
]
179184
}
180185
],
181-
"dataCollectionEndpointId": "[if(parameters('useAzureMonitorPrivateLinkScope'), variables('dataCollectionEndpointId'), json('null'))]"
186+
"dataCollectionEndpointId": "[if(variables('enableHighLogScaleMode'), variables('ingestionDataCollectionEndpointId'), json('null'))]"
182187
}
183188
}
184189
]
@@ -248,7 +253,7 @@
248253
]
249254
}
250255
],
251-
"dataCollectionEndpointId": "[if(parameters('useAzureMonitorPrivateLinkScope'), variables('dataCollectionEndpointId'), json('null'))]"
256+
"dataCollectionEndpointId": "[if(variables('enableHighLogScaleMode'), variables('ingestionDataCollectionEndpointId'), json('null'))]"
252257
}
253258
}
254259
]
@@ -268,6 +273,20 @@
268273
}
269274
}
270275
},
276+
{
277+
"condition": "[variables('enableHighLogScaleMode')]",
278+
"type": "Microsoft.Insights/dataCollectionEndpoints",
279+
"apiVersion": "2022-06-01",
280+
"name": "[variables('ingestionDCE')]",
281+
"location": "[variables('workspaceLocation')]",
282+
"tags": "[parameters('resourceTagValues')]",
283+
"kind": "Linux",
284+
"properties": {
285+
"networkAcls": {
286+
"publicNetworkAccess": "[if(parameters('useAzureMonitorPrivateLinkScope'), 'Disabled', 'Enabled')]"
287+
}
288+
}
289+
},
271290
{
272291
"type": "Microsoft.Resources/deployments",
273292
"name": "[Concat('arc-k8s-monitoring-msi-dcr', '-', uniqueString(variables('dcrName')))]",
@@ -376,6 +395,37 @@
376395
"parameters": {}
377396
}
378397
},
398+
{
399+
"condition": "[and(parameters('useAzureMonitorPrivateLinkScope'), variables('enableHighLogScaleMode'))]",
400+
"type": "Microsoft.Resources/deployments",
401+
"name": "[Concat('aks-monitoring-msi-ampls-scope-ingest', '-', uniqueString(parameters('aksResourceId')))]",
402+
"apiVersion": "2017-05-10",
403+
"subscriptionId": "[variables('privateLinkScopeSubscriptionId')]",
404+
"resourceGroup": "[variables('privateLinkScopeResourceGroup')]",
405+
"dependsOn": [
406+
"[resourceId('Microsoft.Insights/dataCollectionEndpoints/', variables('ingestionDCE'))]"
407+
],
408+
"properties": {
409+
"mode": "Incremental",
410+
"template": {
411+
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
412+
"contentVersion": "1.0.0.0",
413+
"parameters": {},
414+
"variables": {},
415+
"resources": [
416+
{
417+
"type": "microsoft.insights/privatelinkscopes/scopedresources",
418+
"name": "[concat(variables('privateLinkScopeName'), '/', concat(variables('ingestionDCE'), '-connection'))]",
419+
"apiVersion": "2021-07-01-preview",
420+
"properties": {
421+
"linkedResourceId": "[variables('ingestionDataCollectionEndpointId')]"
422+
}
423+
}
424+
]
425+
},
426+
"parameters": {}
427+
}
428+
},
379429
{
380430
"condition": "[parameters('useAzureMonitorPrivateLinkScope')]",
381431
"type": "Microsoft.Resources/deployments",

0 commit comments

Comments
 (0)