* Detach NamespaceStore from KubeWatchApi, proper KubeObjectStore.loadAll (rebase of #2033)
Signed-off-by: Roman <ixrock@gmail.com>
* Watch-api requests optimization (#2066)
* subscribe for watching resources in single request when has admin-like access rights
Signed-off-by: Roman <ixrock@gmail.com>
* responding to comments
Signed-off-by: Roman <ixrock@gmail.com>
* fix unit-tests
Signed-off-by: Roman <ixrock@gmail.com>
* fix: reloading stores when preloading enabled and waitUntilLoaded=false
Signed-off-by: Roman <ixrock@gmail.com>
* mark Cluster.canUseWatchApi() and Cluster.refreshAccessibility() as private
Signed-off-by: Roman <ixrock@gmail.com>
* fix unit test: make public Cluster.canUseWatchApi()
Signed-off-by: Roman <ixrock@gmail.com>
* responding to comments in #2066
Signed-off-by: Roman <ixrock@gmail.com>
* loading k8s resources into stores per selected namespaces -- part 1
Signed-off-by: Roman <ixrock@gmail.com>
* loading k8s resources into stores per selected namespaces -- part 2
- fix: generating helm chart id
Signed-off-by: Roman <ixrock@gmail.com>
* loading k8s resources into stores per selected namespaces -- part 3
Signed-off-by: Roman <ixrock@gmail.com>
* fixes
Signed-off-by: Roman <ixrock@gmail.com>
* fixes / responding to comments
Signed-off-by: Roman <ixrock@gmail.com>
* chore / small fixes
Signed-off-by: Roman <ixrock@gmail.com>
* fixes & refactoring
Signed-off-by: Roman <ixrock@gmail.com>
* make lint happy
Signed-off-by: Roman <ixrock@gmail.com>
* reset store on loading error
Signed-off-by: Roman <ixrock@gmail.com>
* added new cluster method: cluster.isAllowedResource
Signed-off-by: Roman <ixrock@gmail.com>
* fix: loading namespaces optimizations
Signed-off-by: Roman <ixrock@gmail.com>
* fixes & refactoring
Signed-off-by: Roman <ixrock@gmail.com>
* Prevent initializing clusters multiple times
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Do not expose intializing to cluster state
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Convert initializing to observable and ensure it is set to false after init
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* optimise Cluster.getAllowedResources()
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* make it faster (max 5 concurrent requests)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* mark cluster & workspace as beta
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* back to public
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* performance fix when cluster has lots of namespaces
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* fix tests
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* add no-unused-vars and no-unused-imports
* added quotes: double, and remove ignore pattern
* move itif and describeif into utils
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Store prometheus metadata for clusters based on metrics requests
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Use ClusterMetadataKey.PROMETEHUS as key
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Update metadata only if it is changed
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Use structural comparer as default for store sync reaction
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* No need to compare metadata as json anymore
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Use structural comparer only in cluster-store
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Refactoring
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* React only prometeheus preference changes to re-initialise prometheus connection
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Add missing semicolons
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Fix imports
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Report metrics status in cluster-report (#1443)
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Apply suggestions from code review
Co-authored-by: Sebastian Malton <sebastian@malton.name>
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Fix logger reference
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
Co-authored-by: Sebastian Malton <sebastian@malton.name>
* Add mechanism for users to specify namespaces that are accessible to them. This is generally useful for when the user doesn't have permission to list the namespaces.
- Add new component "EditableList" which provides a simple way to
display a list of items that can be added too.
- Add the ClusterAccessibleNamespaces to the GeneralClusterSettings
- style editable list list of lists, switch to using <>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Sebastian Malton <smalton@mirantis.com>
* Add some basic unit tests for cluster, kube-auth-proxy, and kubeconfig-manager
- src/main/cluster.ts
- src/main/kube-auth-proxy.ts
- src/main/kubeconfig-manager.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Cluster dashboard not rendered, fix#811
Signed-off-by: Roman <ixrock@gmail.com>
* refactoring
Signed-off-by: Roman <ixrock@gmail.com>
* actual fix
Signed-off-by: Roman <ixrock@gmail.com>
* reverted back reconnect check in cluster.activate()
Signed-off-by: Roman <ixrock@gmail.com>
* fix: cluster.activate() should not start reconnect on init (if not accessible)
Signed-off-by: Roman <ixrock@gmail.com>
* add drag and drop capabilities for the order of cluster icons on the side bar
* add type annotations for better clarity
* fix clusters staying in previously icon reordered workspaces
* add some tests to cluster-store
Signed-off-by: Sebastian Malton <smalton@mirantis.com>
Co-authored-by: Sebastian Malton <smalton@mirantis.com>
Signed-off-by: Roman <ixrock@gmail.com>
Co-authored-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Sebastian Malton <smalton@mirantis.com>
Co-authored-by: Lauri Nevala <lauri.nevala@gmail.com>
Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Jussi Nummelin <jussi.nummelin@gmail.com>
Co-authored-by: Lauri Nevala <lauri.nevala@gmail.com>
Co-authored-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>