Closes#18929
Helps with #18500
Use iterate hierarchy v2 to have a roughly linear performance for getting the resource tree instead of up to quadratic.
Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
* fix: controller should load application related nodes from target cluster
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
* fix: make sure node capasity and pod requests are in same unit, improve unit formatting
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
* fix: application hosts should include info about resources requested by app neighbors
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
* apply reviewer notes
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
* Move utils packages that are required for gitops engine under engine/pkg/utils package.
Following changes were implemented:
* util/health package is split into two parts: resource health assessement & resource health assessement and moved into engine/pkg/utils
* utils packages moved: Closer and Close method of util package moved into engine/pkg/utils/io package
* packages diff, errors, exec, json, kube and tracing moved into engine/pkg/utils
* Move single cluster caching into engine/kube/cache package
* move sync functionality to engine/kube/sync package
* remove dependency on metrics package from engine/pkg/utils/kube/cache
* move annotation label definitions into engine/pkg/utils/kube/sync
* make sure engine/pkg has no dependencies on other argo-cd packages
* allow importing engine as a go module
* implement a high-level interface that might be consumed by flux
* fix deadlock caused by cluster cache event handler
* ClusterCache should return error if requested group kind not found
* remove obsolete tests
* apply reviewer notes
* Make injected application instance label configurable from default
Stop removing ksonnet.io/component label, unless using legacy label
* Fix applying of resources when namespace is empty