-
Notifications
You must be signed in to change notification settings - Fork 758
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update examples to use decorators (#1685)
- Loading branch information
Showing
93 changed files
with
7,136 additions
and
7,433 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 16 additions & 32 deletions
48
docs/examples/101/aks-vmss-systemassigned-identity/main.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
272 changes: 136 additions & 136 deletions
272
docs/examples/101/aks-vmss-systemassigned-identity/main.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,137 +1,137 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"dnsPrefix": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "The DNS prefix to use with hosted Kubernetes API server FQDN." | ||
}, | ||
"defaultValue": "cl01" | ||
}, | ||
"clusterName": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "The name of the Managed Cluster resource." | ||
}, | ||
"defaultValue": "aks101" | ||
}, | ||
"location": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "Specifies the Azure location where the key vault should be created." | ||
}, | ||
"defaultValue": "[resourceGroup().location]" | ||
}, | ||
"agentCount": { | ||
"type": "int", | ||
"minValue": 1, | ||
"maxValue": 50, | ||
"metadata": { | ||
"description": "The number of nodes for the cluster. 1 Node is enough for Dev/Test and minimum 3 nodes, is recommended for Production" | ||
}, | ||
"defaultValue": 1 | ||
}, | ||
"agentVMSize": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "The size of the Virtual Machine." | ||
}, | ||
"defaultValue": "Standard_D2_v3" | ||
} | ||
}, | ||
"functions": [], | ||
"variables": { | ||
"kubernetesVersion": "1.19.0", | ||
"subnetRef": "[format('{0}/subnets/{1}', resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName')), variables('subnetName'))]", | ||
"addressPrefix": "20.0.0.0/16", | ||
"subnetName": "Subnet01", | ||
"subnetPrefix": "20.0.0.0/24", | ||
"virtualNetworkName": "MyVNET01", | ||
"nodeResourceGroup": "[format('rg-{0}-{1}', parameters('dnsPrefix'), parameters('clusterName'))]", | ||
"tags": { | ||
"environment": "production", | ||
"projectCode": "xyz" | ||
}, | ||
"agentPoolName": "agentpool01" | ||
}, | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.Network/virtualNetworks", | ||
"apiVersion": "2020-06-01", | ||
"name": "[variables('virtualNetworkName')]", | ||
"location": "[parameters('location')]", | ||
"tags": "[variables('tags')]", | ||
"properties": { | ||
"addressSpace": { | ||
"addressPrefixes": [ | ||
"[variables('addressPrefix')]" | ||
] | ||
}, | ||
"subnets": [ | ||
{ | ||
"name": "[variables('subnetName')]", | ||
"properties": { | ||
"addressPrefix": "[variables('subnetPrefix')]" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"type": "Microsoft.ContainerService/managedClusters", | ||
"apiVersion": "2020-09-01", | ||
"name": "[parameters('clusterName')]", | ||
"location": "[parameters('location')]", | ||
"tags": "[variables('tags')]", | ||
"identity": { | ||
"type": "SystemAssigned" | ||
}, | ||
"properties": { | ||
"kubernetesVersion": "[variables('kubernetesVersion')]", | ||
"enableRBAC": true, | ||
"dnsPrefix": "[parameters('dnsPrefix')]", | ||
"agentPoolProfiles": [ | ||
{ | ||
"name": "[variables('agentPoolName')]", | ||
"count": "[parameters('agentCount')]", | ||
"mode": "System", | ||
"vmSize": "[parameters('agentVMSize')]", | ||
"type": "VirtualMachineScaleSets", | ||
"osType": "Linux", | ||
"enableAutoScaling": false, | ||
"vnetSubnetID": "[variables('subnetRef')]" | ||
} | ||
], | ||
"servicePrincipalProfile": { | ||
"clientId": "msi" | ||
}, | ||
"nodeResourceGroup": "[variables('nodeResourceGroup')]", | ||
"networkProfile": { | ||
"networkPlugin": "azure", | ||
"loadBalancerSku": "standard" | ||
} | ||
}, | ||
"dependsOn": [ | ||
"[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]" | ||
] | ||
} | ||
], | ||
"outputs": { | ||
"id": { | ||
"type": "string", | ||
"value": "[resourceId('Microsoft.ContainerService/managedClusters', parameters('clusterName'))]" | ||
}, | ||
"apiServerAddress": { | ||
"type": "string", | ||
"value": "[reference(resourceId('Microsoft.ContainerService/managedClusters', parameters('clusterName'))).fqdn]" | ||
} | ||
}, | ||
"metadata": { | ||
"_generator": { | ||
"name": "bicep", | ||
"version": "dev", | ||
"templateHash": "6792316880994491377" | ||
} | ||
} | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"dnsPrefix": { | ||
"type": "string", | ||
"defaultValue": "cl01", | ||
"metadata": { | ||
"description": "The DNS prefix to use with hosted Kubernetes API server FQDN." | ||
} | ||
}, | ||
"clusterName": { | ||
"type": "string", | ||
"defaultValue": "aks101", | ||
"metadata": { | ||
"description": "The name of the Managed Cluster resource." | ||
} | ||
}, | ||
"location": { | ||
"type": "string", | ||
"defaultValue": "[resourceGroup().location]", | ||
"metadata": { | ||
"description": "Specifies the Azure location where the key vault should be created." | ||
} | ||
}, | ||
"agentCount": { | ||
"type": "int", | ||
"defaultValue": 1, | ||
"metadata": { | ||
"description": "The number of nodes for the cluster. 1 Node is enough for Dev/Test and minimum 3 nodes, is recommended for Production" | ||
}, | ||
"maxValue": 50, | ||
"minValue": 1 | ||
}, | ||
"agentVMSize": { | ||
"type": "string", | ||
"defaultValue": "Standard_D2_v3", | ||
"metadata": { | ||
"description": "The size of the Virtual Machine." | ||
} | ||
} | ||
}, | ||
"functions": [], | ||
"variables": { | ||
"kubernetesVersion": "1.19.0", | ||
"subnetRef": "[format('{0}/subnets/{1}', resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName')), variables('subnetName'))]", | ||
"addressPrefix": "20.0.0.0/16", | ||
"subnetName": "Subnet01", | ||
"subnetPrefix": "20.0.0.0/24", | ||
"virtualNetworkName": "MyVNET01", | ||
"nodeResourceGroup": "[format('rg-{0}-{1}', parameters('dnsPrefix'), parameters('clusterName'))]", | ||
"tags": { | ||
"environment": "production", | ||
"projectCode": "xyz" | ||
}, | ||
"agentPoolName": "agentpool01" | ||
}, | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.Network/virtualNetworks", | ||
"apiVersion": "2020-06-01", | ||
"name": "[variables('virtualNetworkName')]", | ||
"location": "[parameters('location')]", | ||
"tags": "[variables('tags')]", | ||
"properties": { | ||
"addressSpace": { | ||
"addressPrefixes": [ | ||
"[variables('addressPrefix')]" | ||
] | ||
}, | ||
"subnets": [ | ||
{ | ||
"name": "[variables('subnetName')]", | ||
"properties": { | ||
"addressPrefix": "[variables('subnetPrefix')]" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"type": "Microsoft.ContainerService/managedClusters", | ||
"apiVersion": "2020-09-01", | ||
"name": "[parameters('clusterName')]", | ||
"location": "[parameters('location')]", | ||
"tags": "[variables('tags')]", | ||
"identity": { | ||
"type": "SystemAssigned" | ||
}, | ||
"properties": { | ||
"kubernetesVersion": "[variables('kubernetesVersion')]", | ||
"enableRBAC": true, | ||
"dnsPrefix": "[parameters('dnsPrefix')]", | ||
"agentPoolProfiles": [ | ||
{ | ||
"name": "[variables('agentPoolName')]", | ||
"count": "[parameters('agentCount')]", | ||
"mode": "System", | ||
"vmSize": "[parameters('agentVMSize')]", | ||
"type": "VirtualMachineScaleSets", | ||
"osType": "Linux", | ||
"enableAutoScaling": false, | ||
"vnetSubnetID": "[variables('subnetRef')]" | ||
} | ||
], | ||
"servicePrincipalProfile": { | ||
"clientId": "msi" | ||
}, | ||
"nodeResourceGroup": "[variables('nodeResourceGroup')]", | ||
"networkProfile": { | ||
"networkPlugin": "azure", | ||
"loadBalancerSku": "standard" | ||
} | ||
}, | ||
"dependsOn": [ | ||
"[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]" | ||
] | ||
} | ||
], | ||
"outputs": { | ||
"id": { | ||
"type": "string", | ||
"value": "[resourceId('Microsoft.ContainerService/managedClusters', parameters('clusterName'))]" | ||
}, | ||
"apiServerAddress": { | ||
"type": "string", | ||
"value": "[reference(resourceId('Microsoft.ContainerService/managedClusters', parameters('clusterName'))).fqdn]" | ||
} | ||
}, | ||
"metadata": { | ||
"_generator": { | ||
"name": "bicep", | ||
"version": "dev", | ||
"templateHash": "17474268025115212399" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.