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/
This commit is contained in:
Amit Kumar
2018-04-26 18:22:24 +01:00
committed by Robbie Zhang
parent 16299ec867
commit 71ec511ba0

View File

@@ -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
}