diff --git a/providers/azure/aci.go b/providers/azure/aci.go index 6bdf5d55a..f01c4188f 100644 --- a/providers/azure/aci.go +++ b/providers/azure/aci.go @@ -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 diff --git a/vkubelet/vkubelet.go b/vkubelet/vkubelet.go index f3d9d976a..3808ca469 100644 --- a/vkubelet/vkubelet.go +++ b/vkubelet/vkubelet.go @@ -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)