From 71ec511ba079a2787b9d126a9d4fb00e5cb16da1 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Thu, 26 Apr 2018 18:22:24 +0100 Subject: [PATCH] Adding northeurope as valid region for Azure. (#176) Per the GA announcement of ACI, northerope is supported as well. https://azure.microsoft.com/en-us/updates/aci-ga/ --- providers/azure/aci.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/providers/azure/aci.go b/providers/azure/aci.go index 71b232cd1..ddcf52553 100644 --- a/providers/azure/aci.go +++ b/providers/azure/aci.go @@ -61,6 +61,7 @@ var validAciRegions = []string{ "eastus", "southeastasia", "westus2", + "northeurope", } // isValidACIRegion checks to make sure we're using a valid ACI region @@ -566,7 +567,7 @@ func (p *ACIProvider) getContainers(pod *v1.Pod) ([]aci.Container, error) { // NOTE(robbiezhang): ACI CPU limit must be times of 10m cpuLimit := 1.00 if _, ok := container.Resources.Limits[v1.ResourceCPU]; ok { - cpuLimit = float64(container.Resources.Limits.Cpu().MilliValue() / 10.00) / 100.00 + cpuLimit = float64(container.Resources.Limits.Cpu().MilliValue()/10.00) / 100.00 if cpuLimit < 0.01 { cpuLimit = 0.01 } @@ -575,7 +576,7 @@ func (p *ACIProvider) getContainers(pod *v1.Pod) ([]aci.Container, error) { // NOTE(robbiezhang): ACI Memory limit must be times of 0.1 GB memoryLimit := 1.50 if _, ok := container.Resources.Limits[v1.ResourceMemory]; ok { - memoryLimit = float64(container.Resources.Limits.Memory().Value() / 100000000.00) / 10.00 + memoryLimit = float64(container.Resources.Limits.Memory().Value()/100000000.00) / 10.00 if memoryLimit < 0.10 { memoryLimit = 0.10 } @@ -584,7 +585,7 @@ func (p *ACIProvider) getContainers(pod *v1.Pod) ([]aci.Container, error) { // NOTE(robbiezhang): ACI CPU request must be times of 10m cpuRequest := 1.00 if _, ok := container.Resources.Requests[v1.ResourceCPU]; ok { - cpuRequest = float64(container.Resources.Requests.Cpu().MilliValue() / 10.00) / 100.00 + cpuRequest = float64(container.Resources.Requests.Cpu().MilliValue()/10.00) / 100.00 if cpuRequest < 0.01 { cpuRequest = 0.01 } @@ -593,7 +594,7 @@ func (p *ACIProvider) getContainers(pod *v1.Pod) ([]aci.Container, error) { // NOTE(robbiezhang): ACI memory request must be times of 0.1 GB memoryRequest := 1.50 if _, ok := container.Resources.Requests[v1.ResourceMemory]; ok { - memoryRequest = float64(container.Resources.Requests.Memory().Value() / 100000000.00) / 10.00 + memoryRequest = float64(container.Resources.Requests.Memory().Value()/100000000.00) / 10.00 if memoryRequest < 0.10 { memoryRequest = 0.10 }