[Azure] Increase the Default Node Quota for ACI (#240)

* Increase the default quota for ACI provider

* VK update the node capcity

* VK update node IP addresses
This commit is contained in:
Robbie Zhang
2018-06-25 11:08:49 -07:00
committed by GitHub
parent d6e8b3daf7
commit e1fa5b03af
2 changed files with 22 additions and 3 deletions

View File

@@ -173,10 +173,22 @@ func NewACIProvider(config string, rm *manager.ResourceManager, nodeName, operat
}
// Set sane defaults for Capacity in case config is not supplied
p.cpu = "20"
p.memory = "100Gi"
p.pods = "20"
p.cpu = "1000"
p.memory = "4Ti"
p.pods = "1000"
if cpuQuota := os.Getenv("ACI_QUOTA_CPU"); cpuQuota != "" {
p.cpu = cpuQuota
}
if memoryQuota := os.Getenv("ACI_QUOTA_MEMORY"); memoryQuota != "" {
p.memory = memoryQuota
}
if podsQuota := os.Getenv("ACI_QUOTA_POD"); podsQuota != "" {
p.pods = podsQuota
}
p.operatingSystem = operatingSystem
p.nodeName = nodeName
p.internalIP = internalIP

View File

@@ -280,6 +280,13 @@ func (s *Server) updateNode() {
n.ResourceVersion = "" // Blank out resource version to prevent object has been modified error
n.Status.Conditions = s.provider.NodeConditions()
capacity := s.provider.Capacity()
n.Status.Capacity = capacity
n.Status.Allocatable = capacity
n.Status.Addresses = s.provider.NodeAddresses()
n, err = s.k8sClient.CoreV1().Nodes().UpdateStatus(n)
if err != nil {
log.Println("Failed to update node:", err)