This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 560
Availability zone support for k8s #3453
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
47d4e60
Add availability zone support for agent pools
sozercan d2305a9
rm zones from master and vmas, add setVMSSDefaults, set default for z…
ritazh b0d60bd
Add validation and err check
ritazh b2258d7
Add e2e tests, example for zones
ritazh 397ff3f
Add validation for singlePlacementGroups
ritazh 02f8f79
Add unit test, doc, update validation
ritazh 14420bf
Add more unit tests
ritazh e6df391
Revert version
ritazh 4bfd386
Update 1.12.beta workaround
ritazh 619cdeb
Address review comments
ritazh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"apiVersion": "vlabs", | ||
"properties": { | ||
"orchestratorProfile": { | ||
"orchestratorType": "Kubernetes", | ||
"orchestratorRelease": "1.12" | ||
}, | ||
"masterProfile": { | ||
"count": 1, | ||
"dnsPrefix": "", | ||
"vmSize": "Standard_DS2_v2" | ||
}, | ||
"agentPoolProfiles": [ | ||
{ | ||
"name": "agentpool", | ||
"count": 4, | ||
"vmSize": "Standard_DS2_v2", | ||
"availabilityZones": [ | ||
"1", | ||
"2" | ||
] | ||
} | ||
], | ||
"linuxProfile": { | ||
"adminUsername": "azureuser", | ||
"ssh": { | ||
"publicKeys": [ | ||
{ | ||
"keyData": "" | ||
} | ||
] | ||
} | ||
}, | ||
"servicePrincipalProfile": { | ||
"clientId": "", | ||
"secret": "" | ||
} | ||
} | ||
} |
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
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
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
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
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
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
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 |
---|---|---|
|
@@ -436,6 +436,8 @@ type AgentPoolProfile struct { | |
CustomNodeLabels map[string]string `json:"customNodeLabels,omitempty"` | ||
PreProvisionExtension *Extension `json:"preProvisionExtension"` | ||
Extensions []Extension `json:"extensions"` | ||
SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` | ||
AvailabilityZones []string `json:"availabilityZones,omitempty"` | ||
} | ||
|
||
// AgentPoolProfileRole represents an agent role | ||
|
@@ -496,6 +498,16 @@ func (p *Properties) HasWindows() bool { | |
return false | ||
} | ||
|
||
// HasAvailabilityZones returns true if the cluster contains pools with zones | ||
func (p *Properties) HasAvailabilityZones() bool { | ||
This comment was marked as resolved.
Sorry, something went wrong. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This func could also potentially be generalized to us the func described above. |
||
for _, agentPoolProfile := range p.AgentPoolProfiles { | ||
if agentPoolProfile.HasAvailabilityZones() { | ||
return true | ||
} | ||
} | ||
return false | ||
} | ||
|
||
// IsCustomVNET returns true if the customer brought their own VNET | ||
func (m *MasterProfile) IsCustomVNET() bool { | ||
return len(m.VnetSubnetID) > 0 | ||
|
@@ -596,6 +608,11 @@ func (a *AgentPoolProfile) SetSubnet(subnet string) { | |
a.subnet = subnet | ||
} | ||
|
||
// HasAvailabilityZones returns true if the agent pool has availability zones | ||
func (a *AgentPoolProfile) HasAvailabilityZones() bool { | ||
return a.AvailabilityZones != nil && len(a.AvailabilityZones) > 0 | ||
} | ||
|
||
// HasSearchDomain returns true if the customer specified secrets to install | ||
func (l *LinuxProfile) HasSearchDomain() bool { | ||
if l.CustomSearchDomain != nil { | ||
|
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comment was marked as resolved.
Sorry, something went wrong.