Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
minor template optimization in kubernetesmastervarsvmss.t (#4112)
Browse files Browse the repository at this point in the history
  • Loading branch information
tariq1890 authored and jackfrancis committed Oct 24, 2018
1 parent bb4a637 commit 4e8c8b5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions parts/k8s/kubernetesmastervarsvmss.t
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,14 @@
{{else}}
"allocateNodeCidrs": true,
{{end}}
"subnetNameResourceSegmentIndex": 10,
"vnetNameResourceSegmentIndex": 8,
"vnetResourceGroupNameResourceSegmentIndex": 4,
{{if IsHostedMaster}}
{{if IsCustomVNET}}
"vnetSubnetID": "[parameters('{{ (index .AgentPoolProfiles 0).Name }}VnetSubnetID')]",
"subnetNameResourceSegmentIndex": 10,
"subnetName": "[split(variables('vnetSubnetID'), '/')[variables('subnetNameResourceSegmentIndex')]]",
"vnetNameResourceSegmentIndex": 8,
"virtualNetworkName": "[split(variables('vnetSubnetID'), '/')[variables('vnetNameResourceSegmentIndex')]]",
"vnetResourceGroupNameResourceSegmentIndex": 4,
"virtualNetworkResourceGroupName": "[split(variables('vnetSubnetID'), '/')[variables('vnetResourceGroupNameResourceSegmentIndex')]]",
{{else}}
"subnetName": "[concat(parameters('orchestratorName'), '-subnet')]",
Expand All @@ -158,11 +158,8 @@
{{if .MasterProfile.IsCustomVNET}}
"vnetSubnetID": "[parameters('agentVnetSubnetID')]",
"vnetSubnetIDMaster": "[parameters('masterVnetSubnetID')]",
"subnetNameResourceSegmentIndex": 10,
"subnetName": "[split(parameters('masterVnetSubnetID'), '/')[variables('subnetNameResourceSegmentIndex')]]",
"vnetNameResourceSegmentIndex": 8,
"virtualNetworkName": "[split(parameters('masterVnetSubnetID'), '/')[variables('vnetNameResourceSegmentIndex')]]",
"vnetResourceGroupNameResourceSegmentIndex": 4,
"virtualNetworkResourceGroupName": "[split(parameters('masterVnetSubnetID'), '/')[variables('vnetResourceGroupNameResourceSegmentIndex')]]",
{{else}}
"subnetName": "subnetmaster",
Expand Down

0 comments on commit 4e8c8b5

Please sign in to comment.