зеркало из https://github.com/Azure/aks-engine.git
Accelerated networking for Windows (#3908)
This commit is contained in:
Родитель
a966de1515
Коммит
754452a788
|
@ -525,7 +525,8 @@ A cluster can have 0 to 12 agent pool profiles. Agent Pool Profiles are used for
|
|||
| imageReference.resourceGroup | no | Resource group that contains the Linux OS image. Needs to be used in conjunction with name, above |
|
||||
| osType | no | Specifies the agent pool's Operating System. Supported values are `Windows` and `Linux`. Defaults to `Linux` |
|
||||
| distro | no | Specifies the agent pool's Linux distribution. Supported values are `ubuntu`, `aks` and `coreos` (CoreOS support is currently experimental). Defaults to `aks` if undefined, unless `osType` is defined as `Windows` (in which case `distro` is unused). `aks` is a custom image based on `ubuntu` that comes with pre-installed software necessary for Kubernetes deployments (Azure Public Cloud only for now). Currently supported OS and orchestrator configurations -- `ubuntu`: DCOS, Docker Swarm, Kubernetes; `RHEL`: OpenShift; `coreos`: Kubernetes. [Example of CoreOS Master with Windows and Linux (CoreOS and Ubuntu) Agents](../examples/coreos/kubernetes-coreos-hybrid.json) |
|
||||
| acceleratedNetworkingEnabled | no | Use [Azure Accelerated Networking](https://azure.microsoft.com/en-us/blog/maximize-your-vm-s-performance-with-accelerated-networking-now-generally-available-for-both-windows-and-linux/) feature for agents (You must select a VM SKU that support Accelerated Networking) |
|
||||
| acceleratedNetworkingEnabled | no | Use [Azure Accelerated Networking](https://azure.microsoft.com/en-us/blog/maximize-your-vm-s-performance-with-accelerated-networking-now-generally-available-for-both-windows-and-linux/) feature for Linux agents (You must select a VM SKU that supports Accelerated Networking). Defaults to `true` if the VM SKU selected supports Accelerated Networking |
|
||||
| acceleratedNetworkingEnabledWindows | no | Use [Azure Accelerated Networking](https://azure.microsoft.com/en-us/blog/maximize-your-vm-s-performance-with-accelerated-networking-now-generally-available-for-both-windows-and-linux/) feature for Windows agents (You must select a VM SKU that supports Accelerated Networking). Defaults to `false` |
|
||||
|
||||
### linuxProfile
|
||||
|
||||
|
|
|
@ -16,7 +16,11 @@
|
|||
},
|
||||
{{end}}
|
||||
{
|
||||
{{if .AcceleratedNetworkingEnabled}}
|
||||
"apiVersion": "2018-04-01",
|
||||
{{else}}
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
{{end}}
|
||||
"copy": {
|
||||
"count": "[sub(variables('{{.Name}}Count'), variables('{{.Name}}Offset'))]",
|
||||
"name": "loop"
|
||||
|
@ -31,6 +35,7 @@
|
|||
"location": "[variables('location')]",
|
||||
"name": "[concat(variables('{{.Name}}VMNamePrefix'), 'nic-', copyIndex(variables('{{.Name}}Offset')))]",
|
||||
"properties": {
|
||||
"enableAcceleratedNetworking" : "{{.AcceleratedNetworkingEnabledWindows}}",
|
||||
{{if .IsCustomVNET}}
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
"name": "[variables('{{.Name}}VMNamePrefix')]",
|
||||
"properties": {
|
||||
"primary": true,
|
||||
"enableAcceleratedNetworking" : "{{.AcceleratedNetworkingEnabledWindows}}",
|
||||
{{if .IsCustomVNET}}
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
|
|
|
@ -442,6 +442,10 @@ func setAgentProfileDefaults(a *api.Properties, isUpgrade, isScale bool) {
|
|||
profile.AcceleratedNetworkingEnabled = helpers.PointerToBool(!isUpgrade && !isScale && helpers.AcceleratedNetworkingSupported(profile.VMSize))
|
||||
}
|
||||
|
||||
if profile.AcceleratedNetworkingEnabledWindows == nil {
|
||||
profile.AcceleratedNetworkingEnabledWindows = helpers.PointerToBool(api.DefaultAcceleratedNetworkingWindowsEnabled)
|
||||
}
|
||||
|
||||
if profile.Distro == "" {
|
||||
if a.OrchestratorProfile.IsKubernetes() {
|
||||
if profile.OSDiskSizeGB != 0 && profile.OSDiskSizeGB < api.VHDDiskSizeAKS {
|
||||
|
|
|
@ -189,6 +189,8 @@ const (
|
|||
ARMNetworkNamespace = "Microsoft.Networks"
|
||||
// ARMVirtualNetworksResourceType is the ARM resource type for virtual network resources of ARM.
|
||||
ARMVirtualNetworksResourceType = "virtualNetworks"
|
||||
// DefaultAcceleratedNetworkingWindowsEnabled determines the acs-engine provided default for enabling accelerated networking on Windows nodes
|
||||
DefaultAcceleratedNetworkingWindowsEnabled = false
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -1004,6 +1004,7 @@ func convertAgentPoolProfileToVLabs(api *AgentPoolProfile, p *vlabs.AgentPoolPro
|
|||
p.FQDN = api.FQDN
|
||||
p.CustomNodeLabels = map[string]string{}
|
||||
p.AcceleratedNetworkingEnabled = api.AcceleratedNetworkingEnabled
|
||||
p.AcceleratedNetworkingEnabledWindows = api.AcceleratedNetworkingEnabledWindows
|
||||
p.AvailabilityZones = api.AvailabilityZones
|
||||
p.SinglePlacementGroup = api.SinglePlacementGroup
|
||||
|
||||
|
|
|
@ -1018,6 +1018,7 @@ func convertVLabsAgentPoolProfile(vlabs *vlabs.AgentPoolProfile, api *AgentPoolP
|
|||
api.IPAddressCount = vlabs.IPAddressCount
|
||||
api.FQDN = vlabs.FQDN
|
||||
api.AcceleratedNetworkingEnabled = vlabs.AcceleratedNetworkingEnabled
|
||||
api.AcceleratedNetworkingEnabledWindows = vlabs.AcceleratedNetworkingEnabledWindows
|
||||
api.AvailabilityZones = vlabs.AvailabilityZones
|
||||
api.SinglePlacementGroup = vlabs.SinglePlacementGroup
|
||||
|
||||
|
|
|
@ -474,35 +474,36 @@ type Extension struct {
|
|||
|
||||
// AgentPoolProfile represents an agent pool definition
|
||||
type AgentPoolProfile struct {
|
||||
Name string `json:"name"`
|
||||
Count int `json:"count"`
|
||||
VMSize string `json:"vmSize"`
|
||||
OSDiskSizeGB int `json:"osDiskSizeGB,omitempty"`
|
||||
DNSPrefix string `json:"dnsPrefix,omitempty"`
|
||||
OSType OSType `json:"osType,omitempty"`
|
||||
Ports []int `json:"ports,omitempty"`
|
||||
AvailabilityProfile string `json:"availabilityProfile"`
|
||||
ScaleSetPriority string `json:"scaleSetPriority,omitempty"`
|
||||
ScaleSetEvictionPolicy string `json:"scaleSetEvictionPolicy,omitempty"`
|
||||
StorageProfile string `json:"storageProfile,omitempty"`
|
||||
DiskSizesGB []int `json:"diskSizesGB,omitempty"`
|
||||
VnetSubnetID string `json:"vnetSubnetID,omitempty"`
|
||||
Subnet string `json:"subnet"`
|
||||
IPAddressCount int `json:"ipAddressCount,omitempty"`
|
||||
Distro Distro `json:"distro,omitempty"`
|
||||
Role AgentPoolProfileRole `json:"role,omitempty"`
|
||||
AcceleratedNetworkingEnabled *bool `json:"acceleratedNetworkingEnabled,omitempty"`
|
||||
FQDN string `json:"fqdn,omitempty"`
|
||||
CustomNodeLabels map[string]string `json:"customNodeLabels,omitempty"`
|
||||
PreprovisionExtension *Extension `json:"preProvisionExtension"`
|
||||
Extensions []Extension `json:"extensions"`
|
||||
KubernetesConfig *KubernetesConfig `json:"kubernetesConfig,omitempty"`
|
||||
ImageRef *ImageReference `json:"imageReference,omitempty"`
|
||||
MaxCount *int `json:"maxCount,omitempty"`
|
||||
MinCount *int `json:"minCount,omitempty"`
|
||||
EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"`
|
||||
AvailabilityZones []string `json:"availabilityZones,omitempty"`
|
||||
SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Count int `json:"count"`
|
||||
VMSize string `json:"vmSize"`
|
||||
OSDiskSizeGB int `json:"osDiskSizeGB,omitempty"`
|
||||
DNSPrefix string `json:"dnsPrefix,omitempty"`
|
||||
OSType OSType `json:"osType,omitempty"`
|
||||
Ports []int `json:"ports,omitempty"`
|
||||
AvailabilityProfile string `json:"availabilityProfile"`
|
||||
ScaleSetPriority string `json:"scaleSetPriority,omitempty"`
|
||||
ScaleSetEvictionPolicy string `json:"scaleSetEvictionPolicy,omitempty"`
|
||||
StorageProfile string `json:"storageProfile,omitempty"`
|
||||
DiskSizesGB []int `json:"diskSizesGB,omitempty"`
|
||||
VnetSubnetID string `json:"vnetSubnetID,omitempty"`
|
||||
Subnet string `json:"subnet"`
|
||||
IPAddressCount int `json:"ipAddressCount,omitempty"`
|
||||
Distro Distro `json:"distro,omitempty"`
|
||||
Role AgentPoolProfileRole `json:"role,omitempty"`
|
||||
AcceleratedNetworkingEnabled *bool `json:"acceleratedNetworkingEnabled,omitempty"`
|
||||
AcceleratedNetworkingEnabledWindows *bool `json:"acceleratedNetworkingEnabledWindows,omitempty"`
|
||||
FQDN string `json:"fqdn,omitempty"`
|
||||
CustomNodeLabels map[string]string `json:"customNodeLabels,omitempty"`
|
||||
PreprovisionExtension *Extension `json:"preProvisionExtension"`
|
||||
Extensions []Extension `json:"extensions"`
|
||||
KubernetesConfig *KubernetesConfig `json:"kubernetesConfig,omitempty"`
|
||||
ImageRef *ImageReference `json:"imageReference,omitempty"`
|
||||
MaxCount *int `json:"maxCount,omitempty"`
|
||||
MinCount *int `json:"minCount,omitempty"`
|
||||
EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"`
|
||||
AvailabilityZones []string `json:"availabilityZones,omitempty"`
|
||||
SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
|
||||
}
|
||||
|
||||
// AgentPoolProfileRole represents an agent role
|
||||
|
|
|
@ -418,25 +418,26 @@ type Extension struct {
|
|||
|
||||
// AgentPoolProfile represents an agent pool definition
|
||||
type AgentPoolProfile struct {
|
||||
Name string `json:"name" validate:"required"`
|
||||
Count int `json:"count" validate:"required,min=1,max=100"`
|
||||
VMSize string `json:"vmSize" validate:"required"`
|
||||
OSDiskSizeGB int `json:"osDiskSizeGB,omitempty" validate:"min=0,max=1023"`
|
||||
DNSPrefix string `json:"dnsPrefix,omitempty"`
|
||||
OSType OSType `json:"osType,omitempty"`
|
||||
Ports []int `json:"ports,omitempty" validate:"dive,min=1,max=65535"`
|
||||
AvailabilityProfile string `json:"availabilityProfile"`
|
||||
ScaleSetPriority string `json:"scaleSetPriority,omitempty" validate:"eq=Regular|eq=Low|len=0"`
|
||||
ScaleSetEvictionPolicy string `json:"scaleSetEvictionPolicy,omitempty" validate:"eq=Delete|eq=Deallocate|len=0"`
|
||||
StorageProfile string `json:"storageProfile" validate:"eq=StorageAccount|eq=ManagedDisks|len=0"`
|
||||
DiskSizesGB []int `json:"diskSizesGB,omitempty" validate:"max=4,dive,min=1,max=1023"`
|
||||
VnetSubnetID string `json:"vnetSubnetID,omitempty"`
|
||||
IPAddressCount int `json:"ipAddressCount,omitempty" validate:"min=0,max=256"`
|
||||
Distro Distro `json:"distro,omitempty"`
|
||||
KubernetesConfig *KubernetesConfig `json:"kubernetesConfig,omitempty"`
|
||||
ImageRef *ImageReference `json:"imageReference,omitempty"`
|
||||
Role AgentPoolProfileRole `json:"role,omitempty"`
|
||||
AcceleratedNetworkingEnabled *bool `json:"acceleratedNetworkingEnabled,omitempty"`
|
||||
Name string `json:"name" validate:"required"`
|
||||
Count int `json:"count" validate:"required,min=1,max=100"`
|
||||
VMSize string `json:"vmSize" validate:"required"`
|
||||
OSDiskSizeGB int `json:"osDiskSizeGB,omitempty" validate:"min=0,max=1023"`
|
||||
DNSPrefix string `json:"dnsPrefix,omitempty"`
|
||||
OSType OSType `json:"osType,omitempty"`
|
||||
Ports []int `json:"ports,omitempty" validate:"dive,min=1,max=65535"`
|
||||
AvailabilityProfile string `json:"availabilityProfile"`
|
||||
ScaleSetPriority string `json:"scaleSetPriority,omitempty" validate:"eq=Regular|eq=Low|len=0"`
|
||||
ScaleSetEvictionPolicy string `json:"scaleSetEvictionPolicy,omitempty" validate:"eq=Delete|eq=Deallocate|len=0"`
|
||||
StorageProfile string `json:"storageProfile" validate:"eq=StorageAccount|eq=ManagedDisks|len=0"`
|
||||
DiskSizesGB []int `json:"diskSizesGB,omitempty" validate:"max=4,dive,min=1,max=1023"`
|
||||
VnetSubnetID string `json:"vnetSubnetID,omitempty"`
|
||||
IPAddressCount int `json:"ipAddressCount,omitempty" validate:"min=0,max=256"`
|
||||
Distro Distro `json:"distro,omitempty"`
|
||||
KubernetesConfig *KubernetesConfig `json:"kubernetesConfig,omitempty"`
|
||||
ImageRef *ImageReference `json:"imageReference,omitempty"`
|
||||
Role AgentPoolProfileRole `json:"role,omitempty"`
|
||||
AcceleratedNetworkingEnabled *bool `json:"acceleratedNetworkingEnabled,omitempty"`
|
||||
AcceleratedNetworkingEnabledWindows *bool `json:"acceleratedNetworkingEnabledWindows,omitempty"`
|
||||
|
||||
// subnet is internal
|
||||
subnet string
|
||||
|
|
|
@ -400,7 +400,7 @@ func (a *Properties) validateAgentPoolProfiles(isUpdate bool) error {
|
|||
return e
|
||||
}
|
||||
|
||||
if helpers.IsTrueBoolPointer(agentPoolProfile.AcceleratedNetworkingEnabled) {
|
||||
if helpers.IsTrueBoolPointer(agentPoolProfile.AcceleratedNetworkingEnabled) || helpers.IsTrueBoolPointer(agentPoolProfile.AcceleratedNetworkingEnabledWindows) {
|
||||
if e := validatePoolAcceleratedNetworking(agentPoolProfile.VMSize); e != nil {
|
||||
return e
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче