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

Commit

Permalink
Additional CSEs no longer depend on billing agent
Browse files Browse the repository at this point in the history
  • Loading branch information
marosset committed Dec 17, 2019
1 parent cfecd27 commit 8565110
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions pkg/engine/vmextensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,9 @@ func CreateCustomExtensions(properties *api.Properties) []DeploymentARM {
var extensionsARM []DeploymentARM

if properties.MasterProfile != nil {
// The first extension needs to depend on the billing extension created for all pools
// The first extension needs to depend on the master cse created for all nodes
// Each proceeding extension needs to depend on the previous one to avoid ARM conflicts in the Compute RP
nextDependsOn := "[concat('Microsoft.Compute/virtualMachines/', variables('masterVMNamePrefix'), copyIndex(variables('masterOffset')), '/extensions/computeAksLinuxBilling')]"
nextDependsOn := "[concat('Microsoft.Compute/virtualMachines/', variables('masterVMNamePrefix'), copyIndex(variables('masterOffset')), '/extensions/cse-master-', copyIndex(variables('masterOffset')))]"

for _, extensionProfile := range properties.ExtensionProfiles {
masterOptedForExtension, singleOrAll := validateProfileOptedForExtension(extensionProfile.Name, properties.MasterProfile.Extensions)
Expand All @@ -259,9 +259,9 @@ func CreateCustomExtensions(properties *api.Properties) []DeploymentARM {
}

for _, agentPoolProfile := range properties.AgentPoolProfiles {
// The first extension needs to depend on the billing extension created for all pools
// The first extension needs to depend on the agent cse created for all nodes
// Each proceeding extension needs to depend on the previous one to avoid ARM conflicts in the Compute RP
nextDependsOn := fmt.Sprintf("[concat('Microsoft.Compute/virtualMachines/', variables('%[1]sVMNamePrefix'), copyIndex(variables('%[1]sOffset')), '/extensions/computeAksLinuxBilling')]", agentPoolProfile.Name)
nextDependsOn := fmt.Sprintf("[concat('Microsoft.Compute/virtualMachines/', variables('%[1]sVMNamePrefix'), copyIndex(variables('%[1]sOffset')), '/extensions/cse-agent-', copyIndex(variables('%[1]sOffset')))]", agentPoolProfile.Name)

for _, extensionProfile := range properties.ExtensionProfiles {
poolOptedForExtension, singleOrAll := validateProfileOptedForExtension(extensionProfile.Name, agentPoolProfile.Extensions)
Expand Down
6 changes: 3 additions & 3 deletions pkg/engine/vmextensions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ func TestCreateCustomExtensions(t *testing.T) {
"count": "[sub(variables('windowspool1Count'), variables('windowspool1Offset'))]",
"name": "winrmExtensionLoop",
},
DependsOn: []string{"[concat('Microsoft.Compute/virtualMachines/', variables('windowspool1VMNamePrefix'), copyIndex(variables('windowspool1Offset')), '/extensions/computeAksLinuxBilling')]"},
DependsOn: []string{"[concat('Microsoft.Compute/virtualMachines/', variables('windowspool1VMNamePrefix'), copyIndex(variables('windowspool1Offset')), '/extensions/cse-agent-', copyIndex(variables('windowspool1Offset')))]"},
},
DeploymentExtended: resources.DeploymentExtended{
Name: to.StringPtr("[concat(variables('windowspool1VMNamePrefix'), copyIndex(variables('windowspool1Offset')), 'winrm')]"),
Expand Down Expand Up @@ -553,7 +553,7 @@ func TestCreateCustomExtensions(t *testing.T) {
"count": "[sub(variables('windowspool2Count'), variables('windowspool2Offset'))]",
"name": "winrmExtensionLoop",
},
DependsOn: []string{"[concat('Microsoft.Compute/virtualMachines/', variables('windowspool2VMNamePrefix'), copyIndex(variables('windowspool2Offset')), '/extensions/computeAksLinuxBilling')]"},
DependsOn: []string{"[concat('Microsoft.Compute/virtualMachines/', variables('windowspool2VMNamePrefix'), copyIndex(variables('windowspool2Offset')), '/extensions/cse-agent-', copyIndex(variables('windowspool2Offset')))]"},
},
DeploymentExtended: resources.DeploymentExtended{
Name: to.StringPtr("[concat(variables('windowspool2VMNamePrefix'), copyIndex(variables('windowspool2Offset')), 'winrm')]"),
Expand Down Expand Up @@ -645,7 +645,7 @@ func TestCreateCustomExtensions(t *testing.T) {
"count": "[sub(variables('masterCount'), variables('masterOffset'))]",
"name": "helloWorldExtensionLoop",
},
DependsOn: []string{"[concat('Microsoft.Compute/virtualMachines/', variables('masterVMNamePrefix'), copyIndex(variables('masterOffset')), '/extensions/computeAksLinuxBilling')]"},
DependsOn: []string{"[concat('Microsoft.Compute/virtualMachines/', variables('masterVMNamePrefix'), copyIndex(variables('masterOffset')), '/extensions/cse-master-', copyIndex(variables('masterOffset')))]"},
},
DeploymentExtended: resources.DeploymentExtended{
Name: to.StringPtr("[concat(variables('masterVMNamePrefix'), copyIndex(variables('masterOffset')), 'HelloWorldK8s')]"),
Expand Down

0 comments on commit 8565110

Please sign in to comment.