Files
sql-server-samples/samples/features/sql-big-data-cluster/platform-ops/bdc-aks-ops/azure-cni/azuredeploy.json
T
2021-04-16 15:48:23 +01:00

250 lines
9.5 KiB
JSON

{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"resourceName": {
"type": "string",
"metadata": {
"description": "The name of the Managed Cluster resource."
}
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "The Azure location of the AKS resource."
}
},
"dnsPrefix": {
"type": "string",
"metadata": {
"description": "Optional DNS prefix to use with hosted Kubernetes API server FQDN."
}
},
"osDiskSizeGB": {
"defaultValue": 0,
"minValue": 0,
"maxValue": 1023,
"type": "int",
"metadata": {
"description": "Disk size (in GB) to provision for each of the agent pool nodes. This value ranges from 0 to 1023. Specifying 0 will apply the default disk size for that agentVMSize."
}
},
"agentCount": {
"defaultValue": 3,
"minValue": 1,
"maxValue": 50,
"type": "int",
"metadata": {
"description": "The number of agent nodes for the cluster. Production workloads have a recommended minimum of 3."
}
},
"agentVMSize": {
"defaultValue": "Standard_D2_v3",
"type": "string",
"metadata": {
"description": "The size of the Virtual Machine."
}
},
"existingServicePrincipalObjectId": {
"type": "string",
"metadata": {
"description": "Oject ID against which the Network Contributor roles will be assigned on the subnet"
}
},
"existingServicePrincipalClientId": {
"type": "string",
"metadata": {
"description": "Client ID (used by cloudprovider)"
}
},
"existingServicePrincipalClientSecret": {
"type": "securestring",
"metadata": {
"description": "The Service Principal Client Secret."
}
},
"osType": {
"defaultValue": "Linux",
"allowedValues": [
"Linux"
],
"type": "string",
"metadata": {
"description": "The type of operating system."
}
},
"kubernetesVersion": {
"defaultValue": "1.17.9",
"type": "string",
"metadata": {
"description": "The version of Kubernetes."
}
},
"enableHttpApplicationRouting": {
"defaultValue": false,
"type": "bool",
"metadata": {
"description": "boolean flag to turn on and off of http application routing"
}
},
"networkPlugin": {
"allowedValues": [
"azure",
"kubenet"
],
"defaultValue": "azure",
"type": "string",
"metadata": {
"description": "Network plugin used for building Kubernetes network."
}
},
"maxPods": {
"defaultValue": 30,
"type": "int",
"metadata": {
"description": "Maximum number of pods that can run on a node."
}
},
"enableRBAC": {
"defaultValue": true,
"type": "bool",
"metadata": {
"description": "boolean flag to turn on and off of RBAC"
}
},
"builtInRoleType": {
"type": "string",
"allowedValues": [
"Owner",
"Contributor",
"Reader"
],
"metadata": {
"description": "Built-in role to assign"
}
},
"existingVirtualNetworkName": {
"type": "string",
"metadata": {
"description": "Name of an existing VNET that will contain this AKS deployment."
}
},
"existingVirtualNetworkResourceGroup": {
"type": "string",
"metadata": {
"description": "Name of the existing VNET resource group"
}
},
"existingSubnetName": {
"type": "string",
"metadata": {
"description": "Subnet name that will contain the App Service Environment"
}
},
"serviceCidr": {
"type": "string",
"defaultValue": "10.0.0.0/16",
"metadata": {
"description": "A CIDR notation IP range from which to assign service cluster IPs."
}
},
"dnsServiceIP": {
"type": "string",
"defaultValue": "10.0.0.10",
"metadata": {
"description": "Containers DNS server IP address."
}
},
"dockerBridgeCidr": {
"type": "string",
"defaultValue": "172.17.0.1/16",
"metadata": {
"description": "A CIDR notation IP for Docker bridge."
}
}
},
"variables": {
"builtInRole":{
"Owner":"[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
"Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
"Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]"
},
"vnetSubnetId": "[resourceId(parameters('existingVirtualNetworkResourceGroup'),'Microsoft.Network/virtualNetworks/subnets',parameters('existingVirtualNetworkName'),parameters('existingSubnetName'))]"
},
"resources": [
{
"type": "Microsoft.Resources/deployments",
"name": "ClusterSubnetRoleAssignmentDeployment",
"apiVersion": "2019-10-01",
"resourceGroup": "[parameters('existingVirtualNetworkResourceGroup')]",
"properties": {
"mode": "Incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.Network/virtualNetworks/subnets/providers/roleAssignments",
"apiVersion": "2020-04-01-preview",
"name": "[concat(parameters('existingVirtualNetworkName'), '/', parameters('existingSubnetName'), '/Microsoft.Authorization/', guid(resourceGroup().id, deployment().name))]",
"properties": {
"roleDefinitionId": "[variables('builtInRole')[parameters('builtInRoleType')]]",
"principalId": "[parameters('existingServicePrincipalObjectId')]",
"scope": "[variables('vnetSubnetId')]"
}
}
]
}
}
},
{
"type": "Microsoft.ContainerService/managedClusters",
"name": "[parameters('resourceName')]",
"apiVersion": "2020-07-01",
"location": "[parameters('location')]",
"dependsOn": [
"ClusterSubnetRoleAssignmentDeployment"
],
"properties": {
"kubernetesVersion": "[parameters('kubernetesVersion')]",
"enableRBAC": "[parameters('enableRBAC')]",
"dnsPrefix": "[parameters('dnsPrefix')]",
"addonProfiles": {
"httpApplicationRouting": {
"enabled": "[parameters('enableHttpApplicationRouting')]"
}
},
"agentPoolProfiles": [
{
"name": "agentpool",
"osDiskSizeGB": "[parameters('osDiskSizeGB')]",
"count": "[parameters('agentCount')]",
"vmSize": "[parameters('agentVMSize')]",
"osType": "[parameters('osType')]",
"storageProfile": "ManagedDisks",
"vnetSubnetID": "[variables('vnetSubnetID')]",
"maxPods": "[parameters('maxPods')]",
"mode" : "System"
}
],
"servicePrincipalProfile": {
"clientId": "[parameters('existingServicePrincipalClientId')]",
"secret": "[parameters('existingServicePrincipalClientSecret')]"
},
"networkProfile": {
"networkPlugin": "[parameters('networkPlugin')]",
"serviceCidr": "[parameters('serviceCidr')]",
"dnsServiceIP": "[parameters('dnsServiceIP')]",
"dockerBridgeCidr": "[parameters('dockerBridgeCidr')]"
}
}
}
],
"outputs": {
"controlPlaneFQDN": {
"type": "string",
"value": "[reference(resourceId('Microsoft.ContainerService/managedClusters', parameters('resourceName'))).fqdn]"
}
}
}