Update apiversion to make it consistent in k8s templates (#3909)

This commit is contained in:
Cecile Robert-Michon 2018-10-12 14:33:49 -07:00 коммит произвёл Jack Francis
Родитель 8da5cc1897
Коммит 884e8b97cf
18 изменённых файлов: 117 добавлений и 170 удалений

Просмотреть файл

@ -32,7 +32,7 @@ The Azure Resource Manager template used to deploy this virtual network is:
"variables": { },
"resources": [
{
"apiVersion": "2016-03-30",
"apiVersion": "2018-06-01",
"location": "[resourceGroup().location]",
"name": "ExampleCustomVNET",
"properties": {

Просмотреть файл

@ -138,7 +138,7 @@ The following is an example of the template.json file.
"description": "Storage API Version"
}
},
"apiVersionDefault": {
"apiVersionCompute": {
"type": "string",
"minLength": 1,
"metadata": {
@ -183,7 +183,7 @@ The following is an example of the template.json file.
},
"type": "Microsoft.Storage/storageAccounts"
}, {
"apiVersion": "[parameters('apiVersionDefault')]",
"apiVersion": "[parameters('apiVersionCompute')]",
"dependsOn": [],
"location": "[resourceGroup().location]",
"type": "Microsoft.Compute/virtualMachines/extensions",
@ -222,7 +222,7 @@ Replace "**EXTENSION-NAME**" with the name of the extension.
{
"name": "EXTENSION-NAME",
"type": "Microsoft.Resources/deployments",
"apiVersion": "[variables('apiVersionLinkDefault')]",
"apiVersion": "[variables('apiVersionCompute')]",
"dependsOn": [
"vmLoopNode"
],
@ -233,11 +233,8 @@ Replace "**EXTENSION-NAME**" with the name of the extension.
"contentVersion": "1.0.0.0"
},
"parameters": {
"apiVersionStorage": {
"value": "[variables('apiVersionStorage')]"
},
"apiVersionDefault": {
"value": "[variables('apiVersionDefault')]"
"apiVersionCompute": {
"value": "[variables('apiVersionCompute')]"
},
"username": {
"value": "[parameters('linuxAdminUsername')]"

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "[concat(EXTENSION_TARGET_VM_NAME_PREFIX, copyIndex(EXTENSION_LOOP_OFFSET), 'Choco')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "[variables('apiVersionLinkDefault')]",
"apiVersion": "[variables('apiVersionCompute')]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', EXTENSION_TARGET_VM_NAME_PREFIX, copyIndex(EXTENSION_LOOP_OFFSET), '/extensions/cse', '-EXTENSION_TARGET_VM_TYPE-', copyIndex(EXTENSION_LOOP_OFFSET))]"
],
@ -20,7 +20,7 @@
"value": "EXTENSION_URL_REPLACE"
},
"apiVersionCompute": {
"value": "[variables('apiVersionDefault')]"
"value": "[variables('apiVersionCompute')]"
},
"targetVMName": {
"value": "[concat(EXTENSION_TARGET_VM_NAME_PREFIX, copyIndex(EXTENSION_LOOP_OFFSET))]"

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "[concat(EXTENSION_TARGET_VM_NAME_PREFIX, copyIndex(EXTENSION_LOOP_OFFSET), 'HelloWorldK8s')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "[variables('apiVersionLinkDefault')]",
"apiVersion": "[variables('apiVersionCompute')]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', EXTENSION_TARGET_VM_NAME_PREFIX, copyIndex(EXTENSION_LOOP_OFFSET), '/extensions/cse', '-EXTENSION_TARGET_VM_TYPE-', copyIndex(EXTENSION_LOOP_OFFSET))]"
],
@ -20,7 +20,7 @@
"value": "EXTENSION_URL_REPLACE"
},
"apiVersionCompute": {
"value": "[variables('apiVersionDefault')]"
"value": "[variables('apiVersionCompute')]"
},
"targetVMName": {
"value": "[concat(EXTENSION_TARGET_VM_NAME_PREFIX, copyIndex(EXTENSION_LOOP_OFFSET))]"

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "[concat(EXTENSION_TARGET_VM_NAME_PREFIX, copyIndex(EXTENSION_LOOP_OFFSET), 'MicrosoftOMSAgentk8s')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "[variables('apiVersionLinkDefault')]",
"apiVersion": "[variables('apiVersionCompute')]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', EXTENSION_TARGET_VM_NAME_PREFIX, copyIndex(EXTENSION_LOOP_OFFSET), '/extensions/cse', '-EXTENSION_TARGET_VM_TYPE-', copyIndex(EXTENSION_LOOP_OFFSET))]"
],
@ -19,8 +19,8 @@
"artifactsLocation": {
"value": "EXTENSION_URL_REPLACE"
},
"apiVersionDefault": {
"value": "[variables('apiVersionDefault')]"
"apiVersionCompute": {
"value": "[variables('apiVersionCompute')]"
},
"targetVMName": {
"value": "[concat(EXTENSION_TARGET_VM_NAME_PREFIX, copyIndex(EXTENSION_LOOP_OFFSET))]"

Просмотреть файл

@ -9,7 +9,7 @@
"description": "Artifacts Location - URL"
}
},
"apiVersionDefault": {
"apiVersionCompute": {
"type": "string",
"minLength": 1,
"metadata": {
@ -50,7 +50,7 @@
},
"resources": [
{
"apiVersion": "[parameters('apiVersionDefault')]",
"apiVersion": "[parameters('apiVersionCompute')]",
"dependsOn": [],
"location": "[resourceGroup().location]",
"type": "Microsoft.Compute/virtualMachines/extensions",

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "[concat(EXTENSION_TARGET_VM_NAME_PREFIX, copyIndex(EXTENSION_LOOP_OFFSET), 'PrometheusGrafanaK8s')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "[variables('apiVersionLinkDefault')]",
"apiVersion": "[variables('apiVersionComput')]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', EXTENSION_TARGET_VM_NAME_PREFIX, copyIndex(EXTENSION_LOOP_OFFSET), '/extensions/cse', '-EXTENSION_TARGET_VM_TYPE-', copyIndex(EXTENSION_LOOP_OFFSET))]"
],
@ -20,7 +20,7 @@
"value": "EXTENSION_URL_REPLACE"
},
"apiVersionCompute": {
"value": "[variables('apiVersionDefault')]"
"value": "[variables('apiVersionCompute')]"
},
"targetVMName": {
"value": "[concat(EXTENSION_TARGET_VM_NAME_PREFIX, copyIndex(EXTENSION_LOOP_OFFSET))]"

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "[concat(EXTENSION_TARGET_VM_NAME_PREFIX, copyIndex(EXTENSION_LOOP_OFFSET), 'windows-patches')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "[variables('apiVersionLinkDefault')]",
"apiVersion": "[variables('apiVersionCompute')]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', EXTENSION_TARGET_VM_NAME_PREFIX, copyIndex(EXTENSION_LOOP_OFFSET), '/extensions/cse', '-EXTENSION_TARGET_VM_TYPE-', copyIndex(EXTENSION_LOOP_OFFSET))]"
],
@ -20,7 +20,7 @@
"value": "EXTENSION_URL_REPLACE"
},
"apiVersionCompute": {
"value": "[variables('apiVersionDefault')]"
"value": "[variables('apiVersionCompute')]"
},
"targetVMName": {
"value": "[concat(EXTENSION_TARGET_VM_NAME_PREFIX, copyIndex(EXTENSION_LOOP_OFFSET))]"

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "[concat(EXTENSION_TARGET_VM_NAME_PREFIX, copyIndex(EXTENSION_LOOP_OFFSET), 'winrm')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "[variables('apiVersionLinkDefault')]",
"apiVersion": "[variables('apiVersionCompute')]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', EXTENSION_TARGET_VM_NAME_PREFIX, copyIndex(EXTENSION_LOOP_OFFSET), '/extensions/cse', '-EXTENSION_TARGET_VM_TYPE-', copyIndex(EXTENSION_LOOP_OFFSET))]"
],
@ -20,7 +20,7 @@
"value": "EXTENSION_URL_REPLACE"
},
"apiVersionCompute": {
"value": "[variables('apiVersionDefault')]"
"value": "[variables('apiVersionCompute')]"
},
"targetVMName": {
"value": "[concat(EXTENSION_TARGET_VM_NAME_PREFIX, copyIndex(EXTENSION_LOOP_OFFSET))]"

Просмотреть файл

@ -1,9 +1,5 @@
{
{{if .AcceleratedNetworkingEnabled}}
"apiVersion": "2018-04-01",
{{else}}
"apiVersion": "[variables('apiVersionDefault')]",
{{end}}
"apiVersion": "[variables('apiVersionNetwork')]",
"copy": {
"count": "[sub(variables('{{.Name}}Count'), variables('{{.Name}}Offset'))]",
"name": "loop"
@ -84,14 +80,15 @@
{
"location": "[variables('location')]",
"name": "[variables('{{.Name}}AvailabilitySet')]",
"apiVersion": "[variables('apiVersionStorageManagedDisks')]",
"apiVersion": "[variables('apiVersionCompute')]",
"properties":
{
"platformFaultDomainCount": 2,
"platformUpdateDomainCount": 3,
"managed" : "true"
"platformUpdateDomainCount": 3
},
"sku": {
"name": "Aligned"
},
"type": "Microsoft.Compute/availabilitySets"
},
{{else if .IsStorageAccount}}
@ -110,8 +107,8 @@
{{end}}
"location": "[variables('location')]",
"name": "[concat(variables('storageAccountPrefixes')[mod(add(copyIndex(),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(add(copyIndex(),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('{{.Name}}AccountName'))]",
"properties": {
"accountType": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
"sku": {
"name": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
},
"type": "Microsoft.Storage/storageAccounts"
},
@ -131,8 +128,8 @@
{{end}}
"location": "[variables('location')]",
"name": "[concat(variables('storageAccountPrefixes')[mod(add(copyIndex(variables('dataStorageAccountPrefixSeed')),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(add(copyIndex(variables('dataStorageAccountPrefixSeed')),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('{{.Name}}DataAccountName'))]",
"properties": {
"accountType": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
"sku": {
"name": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
},
"type": "Microsoft.Storage/storageAccounts"
},
@ -140,21 +137,13 @@
{
"location": "[variables('location')]",
"name": "[variables('{{.Name}}AvailabilitySet')]",
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionCompute')]",
"properties": {},
"type": "Microsoft.Compute/availabilitySets"
},
{{end}}
{
{{if UserAssignedIDEnabled}}
"apiVersion": "[variables('apiVersionUserMSI')]",
{{else}}
{{if .IsManagedDisks}}
"apiVersion": "[variables('apiVersionStorageManagedDisks')]",
{{else}}
"apiVersion": "[variables('apiVersionDefault')]",
{{end}}
{{end}}
"apiVersion": "[variables('apiVersionCompute')]",
"copy": {
"count": "[sub(variables('{{.Name}}Count'), variables('{{.Name}}Offset'))]",
"name": "vmLoopNode"
@ -271,7 +260,7 @@
{{if UseManagedIdentity}}
{{if (not UserAssignedIDEnabled)}}
{
"apiVersion": "2014-10-01-preview",
"apiVersion": "[variables('apiVersionCompute')]",
"copy": {
"count": "[sub(variables('{{.Name}}Count'), variables('{{.Name}}Offset'))]",
"name": "vmLoopNode"
@ -291,7 +280,7 @@
"count": "[sub(variables('{{.Name}}Count'), variables('{{.Name}}Offset'))]",
"name": "vmLoopNode"
},
"apiVersion": "2015-05-01-preview",
"apiVersion": "[variables('apiVersionCompute')]",
"location": "[resourceGroup().location]",
{{if UserAssignedIDEnabled}}
"dependsOn": [
@ -316,7 +305,7 @@
},
{{end}}
{
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionCompute')]",
"copy": {
"count": "[sub(variables('{{.Name}}Count'), variables('{{.Name}}Offset'))]",
"name": "vmLoopNode"
@ -350,7 +339,7 @@
,{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(variables('{{.Name}}VMNamePrefix'), copyIndex(variables('{{.Name}}Offset')), '/computeAksLinuxBilling')]",
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionCompute')]",
"copy": {
"count": "[sub(variables('{{.Name}}Count'), variables('{{.Name}}Offset'))]",
"name": "vmLoopNode"

Просмотреть файл

@ -1,6 +1,6 @@
{{if and UseManagedIdentity (not UserAssignedIDEnabled)}}
{
"apiVersion": "2014-10-01-preview",
"apiVersion": "[variables('apiVersionCompute')]",
"name": "[guid(concat('Microsoft.Compute/virtualMachineScaleSets/', variables('{{.Name}}VMNamePrefix'), 'vmidentity'))]",
"type": "Microsoft.Authorization/roleAssignments",
"properties": {
@ -10,7 +10,7 @@
},
{{end}}
{
"apiVersion": "[variables('apiVersionVirtualMachineScaleSets')]",
"apiVersion": "[variables('apiVersionCompute')]",
"dependsOn": [
{{if .IsCustomVNET}}
"[variables('nsgID')]"

Просмотреть файл

@ -60,7 +60,7 @@
{
"type": "Microsoft.ManagedIdentity/userAssignedIdentities",
"name": "[variables('userAssignedID')]",
"apiVersion": "2015-08-31-PREVIEW",
"apiVersion": "[variables('apiVersionCompute')]",
"location": "[variables('location')]"
},
{{end}}
@ -86,7 +86,7 @@
{{if IsHostedMaster}}
{{if not IsCustomVNET}}
,{
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionNetwork')]",
"dependsOn": [
"[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]"
{{if not IsAzureCNI}}
@ -125,14 +125,14 @@
{{end}}
{{if not IsAzureCNI}}
,{
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionNetwork')]",
"location": "[variables('location')]",
"name": "[variables('routeTableName')]",
"type": "Microsoft.Network/routeTables"
}
{{end}}
,{
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionNetwork')]",
"location": "[variables('location')]",
"name": "[variables('nsgName')]",
"properties": {

Просмотреть файл

@ -1,19 +1,21 @@
{{if .MasterProfile.IsManagedDisks}}
{
"apiVersion": "[variables('apiVersionStorageManagedDisks')]",
"apiVersion": "[variables('apiVersionCompute')]",
"location": "[variables('location')]",
"name": "[variables('masterAvailabilitySet')]",
"properties":
{
"platformFaultDomainCount": 2,
"platformUpdateDomainCount": 3,
"managed" : true
},
{
"platformFaultDomainCount": 2,
"platformUpdateDomainCount": 3
},
"sku": {
"name": "Aligned"
},
"type": "Microsoft.Compute/availabilitySets"
},
{{else if .MasterProfile.IsStorageAccount}}
{
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionCompute')]",
"location": "[variables('location')]",
"name": "[variables('masterAvailabilitySet')]",
"properties": {},
@ -28,15 +30,15 @@
{{end}}
"location": "[variables('location')]",
"name": "[variables('masterStorageAccountName')]",
"properties": {
"accountType": "[variables('vmSizesMap')[parameters('masterVMSize')].storageAccountType]"
"sku": {
"name": "[variables('vmSizesMap')[parameters('masterVMSize')].storageAccountType]"
},
"type": "Microsoft.Storage/storageAccounts"
},
{{end}}
{{if not .MasterProfile.IsCustomVNET}}
{
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionNetwork')]",
"dependsOn": [
{{if RequireRouteTable}}
"[concat('Microsoft.Network/routeTables/', variables('routeTableName'))]"{{if not IsOpenShift}},{{end}}
@ -78,7 +80,7 @@
},
{{end}}
{
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionNetwork')]",
"location": "[variables('location')]",
"name": "[variables('nsgName')]",
"properties": {
@ -133,7 +135,7 @@
},
{{if RequireRouteTable}}
{
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionNetwork')]",
"location": "[variables('location')]",
"name": "[variables('routeTableName')]",
"type": "Microsoft.Network/routeTables"
@ -141,7 +143,7 @@
{{end}}
{{if not IsPrivateCluster}}
{
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionNetwork')]",
"location": "[variables('location')]",
"name": "[variables('masterPublicIPAddressName')]",
"properties": {
@ -153,7 +155,7 @@
"type": "Microsoft.Network/publicIPAddresses"
},
{
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionNetwork')]",
"dependsOn": [
"[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]"
],
@ -212,7 +214,7 @@
"type": "Microsoft.Network/loadBalancers"
},
{
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionNetwork')]",
"copy": {
"count": "[sub(variables('masterCount'), variables('masterOffset'))]",
"name": "masterLbLoopNode"
@ -234,7 +236,7 @@
"type": "Microsoft.Network/loadBalancers/inboundNatRules"
},
{
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionNetwork')]",
"copy": {
"count": "[sub(variables('masterCount'), variables('masterOffset'))]",
"name": "nicLoopNode"
@ -325,7 +327,7 @@
},
{{else}}
{
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionCompute')]",
"copy": {
"count": "[sub(variables('masterCount'), variables('masterOffset'))]",
"name": "nicLoopNode"
@ -410,11 +412,7 @@
{
"type": "Microsoft.Compute/virtualMachines",
"name": "[parameters('jumpboxVMName')]",
{{if JumpboxIsManagedDisks}}
"apiVersion": "[variables('apiVersionStorageManagedDisks')]",
{{else}}
"apiVersion": "[variables('apiVersionDefault')]",
{{end}}
"apiVersion": "[variables('apiVersionCompute')]",
"location": "[variables('location')]",
"properties": {
"osProfile": {
@ -480,15 +478,15 @@
"name": "[variables('jumpboxStorageAccountName')]",
"apiVersion": "[variables('apiVersionStorage')]",
"location": "[variables('location')]",
"properties": {
"accountType": "[variables('vmSizesMap')[parameters('jumpboxVMSize')].storageAccountType]"
"sku": {
"name": "[variables('vmSizesMap')[parameters('jumpboxVMSize')].storageAccountType]"
}
},
{{end}}
{
"type": "Microsoft.Network/networkSecurityGroups",
"name": "[variables('jumpboxNetworkSecurityGroupName')]",
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionNetwork')]",
"location": "[variables('location')]",
"properties": {
"securityRules": [
@ -514,7 +512,7 @@
"name": "Basic"
},
"name": "[variables('jumpboxPublicIpAddressName')]",
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionNetwork')]",
"location": "[variables('location')]",
"properties": {
"dnsSettings": {
@ -526,7 +524,7 @@
{
"type": "Microsoft.Network/networkInterfaces",
"name": "[variables('jumpboxNetworkInterfaceName')]",
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionNetwork')]",
"location": "[variables('location')]",
"properties": {
"ipConfigurations": [
@ -560,7 +558,7 @@
{{end}}
{{if gt .MasterProfile.Count 1}}
{
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionNetwork')]",
"dependsOn": [
{{if .MasterProfile.IsCustomVNET}}
"[variables('nsgID')]"
@ -630,9 +628,9 @@
"name": "[variables('clusterKeyVaultName')]",
"apiVersion": "[variables('apiVersionStorage')]",
"location": "[variables('location')]",
"properties": {
"accountType": "Standard_LRS"
}
"sku": {
"name": "Standard_LRS"
}
},
{
"type": "Microsoft.KeyVault/vaults",
@ -720,15 +718,7 @@
},
{{end}}
{
{{if UserAssignedIDEnabled}}
"apiVersion": "[variables('apiVersionUserMSI')]",
{{else}}
{{if .MasterProfile.IsManagedDisks}}
"apiVersion": "[variables('apiVersionStorageManagedDisks')]",
{{else}}
"apiVersion": "[variables('apiVersionDefault')]",
{{end}}
{{end}}
"apiVersion": "[variables('apiVersionCompute')]",
"copy": {
"count": "[sub(variables('masterCount'), variables('masterOffset'))]",
"name": "vmLoopNode"
@ -854,7 +844,7 @@
{{if UseManagedIdentity}}
{{if (not UserAssignedIDEnabled)}}
{
"apiVersion": "2014-10-01-preview",
"apiVersion": "[variables('apiVersionCompute')]",
"copy": {
"count": "[variables('masterCount')]",
"name": "vmLoopNode"
@ -874,7 +864,7 @@
"count": "[variables('masterCount')]",
"name": "vmLoopNode"
},
"apiVersion": "2015-05-01-preview",
"apiVersion": "[variables('apiVersionCompute')]",
"location": "[resourceGroup().location]",
{{if (not UserAssignedIDEnabled)}}
"dependsOn": [
@ -899,7 +889,7 @@
},
{{end}}
{
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionCompute')]",
"copy": {
"count": "[sub(variables('masterCount'), variables('masterOffset'))]",
"name": "vmLoopNode"
@ -933,7 +923,7 @@
,{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(variables('masterVMNamePrefix'), copyIndex(variables('masterOffset')), '/computeAksLinuxBilling')]",
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionCompute')]",
"copy": {
"count": "[sub(variables('masterCount'), variables('masterOffset'))]",
"name": "vmLoopNode"

Просмотреть файл

@ -1,6 +1,6 @@
{{if and UseManagedIdentity (not UserAssignedIDEnabled)}}
{
"apiVersion": "2014-10-01-preview",
"apiVersion": "[variables('apiVersionCompute')]",
"name": "[guid(concat('Microsoft.Compute/virtualMachineScaleSets/', variables('masterVMNamePrefix'), 'vmidentity'))]",
"type": "Microsoft.Authorization/roleAssignments",
"properties": {
@ -15,8 +15,8 @@
"name": "[variables('clusterKeyVaultName')]",
"apiVersion": "[variables('apiVersionStorage')]",
"location": "[variables('location')]",
"properties": {
"accountType": "Standard_LRS"
"sku": {
"name": "Standard_LRS"
}
},
{
@ -73,7 +73,7 @@
},
{{end}}
{
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionNetwork')]",
"location": "[variables('location')]",
"name": "[variables('nsgName')]",
"properties": {
@ -128,7 +128,7 @@
},
{{if RequireRouteTable}}
{
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionNetwork')]",
"location": "[variables('location')]",
"name": "[variables('routeTableName')]",
"type": "Microsoft.Network/routeTables"
@ -136,7 +136,7 @@
{{end}}
{{if not .MasterProfile.IsCustomVNET}}
{
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionNetwork')]",
"dependsOn": [
{{if RequireRouteTable}}
"[concat('Microsoft.Network/routeTables/', variables('routeTableName'))]",
@ -186,7 +186,7 @@
},
{{end}}
{
"apiVersion": "2018-04-01",
"apiVersion": "[variables('apiVersionNetwork')]",
"location": "[variables('location')]",
"name": "[variables('masterPublicIPAddressName')]",
"properties": {
@ -208,7 +208,7 @@
"type": "Microsoft.Network/loadBalancers",
"name": "[variables('masterLbName')]",
"location": "[variables('location')]",
"apiVersion": "2018-04-01",
"apiVersion": "[variables('apiVersionNetwork')]",
"dependsOn": [
"[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]"
],
@ -282,7 +282,7 @@
}
},
{
"apiVersion": "[variables('apiVersionVirtualMachineScaleSets')]",
"apiVersion": "[variables('apiVersionCompute')]",
"dependsOn": [
{{if .MasterProfile.IsCustomVNET}}
"[variables('nsgID')]"

Просмотреть файл

@ -83,8 +83,10 @@
"masterCount": {{.MasterProfile.Count}},
"masterOffset": "[parameters('masterOffset')]",
{{end}}
"apiVersionDefault": "2016-03-30",
"apiVersionLinkDefault": "2015-01-01",
"apiVersionCompute": "2018-06-01",
"apiVersionStorage": "2018-07-01",
"apiVersionKeyVault": "2018-02-14",
"apiVersionNetwork": "2018-08-01",
"locations": [
"[resourceGroup().location]",
"[parameters('location')]"
@ -104,7 +106,6 @@
"sshKeyPath": "[concat('/home/',parameters('linuxAdminUsername'),'/.ssh/authorized_keys')]",
{{if .HasStorageAccountDisks}}
"apiVersionStorage": "2015-06-15",
"maxVMsPerStorageAccount": 20,
"maxStorageAccountsPerAgent": "[div(variables('maxVMsPerPool'),variables('maxVMsPerStorageAccount'))]",
"dataStorageAccountPrefixSeed": 97,
@ -117,15 +118,6 @@
"storageAccountPrefixes": [],
"storageAccountBaseName": "",
{{end}}
{{if UserAssignedIDEnabled}}
"apiVersionUserMSI": "2018-06-01",
{{end}}
{{if .HasManagedDisks}}
"apiVersionStorageManagedDisks": "2016-04-30-preview",
{{end}}
{{if .HasVMSSAgentPool}}
"apiVersionVirtualMachineScaleSets": "2017-12-01",
{{end}}
{{if not IsHostedMaster}}
{{if .MasterProfile.IsStorageAccount}}
"masterStorageAccountName": "[concat(variables('storageAccountBaseName'), 'mstr0')]",
@ -306,14 +298,10 @@
]
{{end}}
{{if .HasWindows}}
, "windowsCustomScriptSuffix": " $inputFile = '%SYSTEMDRIVE%\\AzureData\\CustomData.bin' ; $outputFile = '%SYSTEMDRIVE%\\AzureData\\CustomDataSetupScript.ps1' ; Copy-Item $inputFile $outputFile ; Invoke-Expression('{0} {1}' -f $outputFile, $arguments) ; "
,"windowsCustomScriptSuffix": " $inputFile = '%SYSTEMDRIVE%\\AzureData\\CustomData.bin' ; $outputFile = '%SYSTEMDRIVE%\\AzureData\\CustomDataSetupScript.ps1' ; Copy-Item $inputFile $outputFile ; Invoke-Expression('{0} {1}' -f $outputFile, $arguments) ; "
{{end}}
{{if EnableEncryptionWithExternalKms}}
,"apiVersionKeyVault": "2016-10-01",
{{if not .HasStorageAccountDisks}}
"apiVersionStorage": "2015-06-15",
{{end}}
"clusterKeyVaultName": "[take(concat('kv', tolower(uniqueString(concat(variables('masterFqdnPrefix'),variables('location'),parameters('nameSuffix'))))), 22)]"
,"clusterKeyVaultName": "[take(concat('kv', tolower(uniqueString(concat(variables('masterFqdnPrefix'),variables('location'),parameters('nameSuffix'))))), 22)]"
{{else}}
,"clusterKeyVaultName": ""
{{end}}

Просмотреть файл

@ -75,8 +75,10 @@
"masterOffset": "",
"masterIpAddressCount": {{.MasterProfile.IPAddressCount}},
{{end}}
"apiVersionDefault": "2016-03-30",
"apiVersionLinkDefault": "2015-01-01",
"apiVersionCompute": "2018-06-01",
"apiVersionStorage": "2018-07-01",
"apiVersionKeyVault": "2018-02-14",
"apiVersionNetwork": "2018-08-01",
"locations": [
"[resourceGroup().location]",
"[parameters('location')]"
@ -95,7 +97,6 @@
"sshKeyPath": "[concat('/home/',parameters('linuxAdminUsername'),'/.ssh/authorized_keys')]",
{{if .HasStorageAccountDisks}}
"apiVersionStorage": "2015-06-15",
"maxVMsPerStorageAccount": 20,
"maxStorageAccountsPerAgent": "[div(variables('maxVMsPerPool'),variables('maxVMsPerStorageAccount'))]",
"dataStorageAccountPrefixSeed": 97,
@ -108,13 +109,6 @@
"storageAccountPrefixes": [],
"storageAccountBaseName": "",
{{end}}
{{if UserAssignedIDEnabled}}
"apiVersionUserMSI": "2018-06-01",
{{end}}
{{if .HasManagedDisks}}
"apiVersionStorageManagedDisks": "2016-04-30-preview",
{{end}}
"apiVersionVirtualMachineScaleSets": "2017-12-01",
{{if not IsHostedMaster}}
{{if .MasterProfile.IsStorageAccount}}
"masterStorageAccountName": "[concat(variables('storageAccountBaseName'), 'mstr0')]",
@ -272,14 +266,10 @@
]
{{end}}
{{if .HasWindows}}
, "windowsCustomScriptSuffix": " $inputFile = '%SYSTEMDRIVE%\\AzureData\\CustomData.bin' ; $outputFile = '%SYSTEMDRIVE%\\AzureData\\CustomDataSetupScript.ps1' ; Copy-Item $inputFile $outputFile ; Invoke-Expression('{0} {1}' -f $outputFile, $arguments) ; "
,"windowsCustomScriptSuffix": " $inputFile = '%SYSTEMDRIVE%\\AzureData\\CustomData.bin' ; $outputFile = '%SYSTEMDRIVE%\\AzureData\\CustomDataSetupScript.ps1' ; Copy-Item $inputFile $outputFile ; Invoke-Expression('{0} {1}' -f $outputFile, $arguments) ; "
{{end}}
{{if EnableEncryptionWithExternalKms}}
,"apiVersionKeyVault": "2016-10-01",
{{if not .HasStorageAccountDisks}}
"apiVersionStorage": "2015-06-15",
{{end}}
"clusterKeyVaultName": "[take(concat('kv', tolower(uniqueString(concat(variables('masterFqdnPrefix'),variables('location'),parameters('nameSuffix'))))), 22)]"
,"clusterKeyVaultName": "[take(concat('kv', tolower(uniqueString(concat(variables('masterFqdnPrefix'),variables('location'),parameters('nameSuffix'))))), 22)]"
{{else}}
,"clusterKeyVaultName": ""
{{end}}

Просмотреть файл

@ -1,6 +1,6 @@
{{if HasWindowsCustomImage}}
{"type": "Microsoft.Compute/images",
"apiVersion": "2017-12-01",
"apiVersion": "[variables('apiVersionCompute')]",
"name": "{{.Name}}CustomWindowsImage",
"location": "[variables('location')]",
"properties": {
@ -16,11 +16,7 @@
},
{{end}}
{
{{if .AcceleratedNetworkingEnabled}}
"apiVersion": "2018-04-01",
{{else}}
"apiVersion": "[variables('apiVersionDefault')]",
{{end}}
"apiVersion": "[variables('apiVersionNetwork')]",
"copy": {
"count": "[sub(variables('{{.Name}}Count'), variables('{{.Name}}Offset'))]",
"name": "loop"
@ -69,14 +65,15 @@
{
"location": "[variables('location')]",
"name": "[variables('{{.Name}}AvailabilitySet')]",
"apiVersion": "[variables('apiVersionStorageManagedDisks')]",
"apiVersion": "[variables('apiVersionCompute')]",
"properties":
{
"platformFaultDomainCount": 2,
"platformUpdateDomainCount": 3,
"managed" : "true"
"platformUpdateDomainCount": 3
},
"sku": {
"name": "Aligned"
},
"type": "Microsoft.Compute/availabilitySets"
},
{{else if .IsStorageAccount}}
@ -95,8 +92,8 @@
{{end}}
"location": "[variables('location')]",
"name": "[concat(variables('storageAccountPrefixes')[mod(add(copyIndex(),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(add(copyIndex(),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('{{.Name}}AccountName'))]",
"properties": {
"accountType": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
"sku": {
"name": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
},
"type": "Microsoft.Storage/storageAccounts"
},
@ -116,8 +113,8 @@
{{end}}
"location": "[variables('location')]",
"name": "[concat(variables('storageAccountPrefixes')[mod(add(copyIndex(variables('dataStorageAccountPrefixSeed')),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(add(copyIndex(variables('dataStorageAccountPrefixSeed')),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('{{.Name}}DataAccountName'))]",
"properties": {
"accountType": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
"sku": {
"name": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
},
"type": "Microsoft.Storage/storageAccounts"
},
@ -125,17 +122,13 @@
{
"location": "[variables('location')]",
"name": "[variables('{{.Name}}AvailabilitySet')]",
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionCompute')]",
"properties": {},
"type": "Microsoft.Compute/availabilitySets"
},
{{end}}
{
{{if .IsManagedDisks}}
"apiVersion": "[variables('apiVersionStorageManagedDisks')]",
{{else}}
"apiVersion": "[variables('apiVersionDefault')]",
{{end}}
"apiVersion": "[variables('apiVersionCompute')]",
"copy": {
"count": "[sub(variables('{{.Name}}Count'), variables('{{.Name}}Offset'))]",
"name": "vmLoopNode"
@ -216,7 +209,7 @@
},
{{if UseManagedIdentity}}
{
"apiVersion": "2014-10-01-preview",
"apiVersion": "[variables('apiVersionCompute')]",
"copy": {
"count": "[sub(variables('{{.Name}}Count'), variables('{{.Name}}Offset'))]",
"name": "vmLoopNode"
@ -235,7 +228,7 @@
"count": "[sub(variables('{{.Name}}Count'), variables('{{.Name}}Offset'))]",
"name": "vmLoopNode"
},
"apiVersion": "2015-05-01-preview",
"apiVersion": "[variables('apiVersionCompute')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', variables('{{.Name}}VMNamePrefix'), copyIndex(variables('{{.Name}}Offset')))]",
@ -254,7 +247,7 @@
},
{{end}}
{
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionCompute')]",
"copy": {
"count": "[sub(variables('{{.Name}}Count'), variables('{{.Name}}Offset'))]",
"name": "vmLoopNode"
@ -284,7 +277,7 @@
,{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(variables('{{.Name}}VMNamePrefix'), copyIndex(variables('{{.Name}}Offset')), '/computeAksLinuxBilling')]",
"apiVersion": "[variables('apiVersionDefault')]",
"apiVersion": "[variables('apiVersionCompute')]",
"copy": {
"count": "[sub(variables('{{.Name}}Count'), variables('{{.Name}}Offset'))]",
"name": "vmLoopNode"

Просмотреть файл

@ -1,6 +1,6 @@
{{if UseManagedIdentity}}
{
"apiVersion": "2014-10-01-preview",
"apiVersion": "[variables('apiVersionCompute')]",
"name": "[guid(concat('Microsoft.Compute/virtualMachineScaleSets/', variables('{{.Name}}VMNamePrefix'), 'vmidentity'))]",
"type": "Microsoft.Authorization/roleAssignments",
"properties": {
@ -10,7 +10,7 @@
},
{{end}}
{
"apiVersion": "[variables('apiVersionVirtualMachineScaleSets')]",
"apiVersion": "[variables('apiVersionCompute')]",
"dependsOn": [
{{if .IsCustomVNET}}
"[variables('nsgID')]"