Repository: kiali/kiali
Pull request #8414 (2025-05-13 18:11:57)

Cleanup controller and move cache out of kubernetes package
### Describe the change

Removes dead code in `controller/controller.go` and moves cache from `kubernetes/cache` to `cache` since the cache doesn't have anything `kubernetes` specific about it.

### Steps to test the PR

N/A just removing old code and moving things around.

### Automation testing

Covered.

### Issue reference

N/A


Patch:
diff --git a/business/controlplane_monitor.go b/business/controlplane_monitor.go
index 031720cca..1db806f07 100644
--- a/business/controlplane_monitor.go
+++ b/business/controlplane_monitor.go
@@ -13,10 +13,10 @@ import (
 
 	"k8s.io/apimachinery/pkg/util/wait"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/models"
 )
diff --git a/business/istio_config.go b/business/istio_config.go
index eedd7af80..a4773ea47 100644
--- a/business/istio_config.go
+++ b/business/istio_config.go
@@ -22,9 +22,9 @@ import (
 	k8s_networking_v1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
 	k8s_networking_v1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/observability"
diff --git a/business/istio_status.go b/business/istio_status.go
index 783d1be53..9e52b2736 100644
--- a/business/istio_status.go
+++ b/business/istio_status.go
@@ -7,10 +7,10 @@ import (
 
 	"k8s.io/apimachinery/pkg/labels"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/observability"
@@ -105,7 +105,7 @@ func (iss *IstioStatusService) getIstioComponentStatus(ctx context.Context, clus
 	}
 
 	var istiodStatus kubernetes.IstioComponentStatus
-	var isManaged = false
+	isManaged := false
 	for _, cp := range mesh.ControlPlanes {
 		if cp.Cluster.Name == cluster {
 			istiodStatus = append(istiodStatus, kubernetes.ComponentStatus{
diff --git a/business/istio_validations.go b/business/istio_validations.go
index 7e06ef512..3b1f5fdb8 100644
--- a/business/istio_validations.go
+++ b/business/istio_validations.go
@@ -16,9 +16,9 @@ import (
 
 	"github.com/kiali/kiali/business/checkers"
 	"github.com/kiali/kiali/business/references"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/observability"
@@ -310,7 +310,7 @@ func (in *IstioValidationsService) Validate(ctx context.Context, cluster string,
 	}
 	vInfo.clusterInfo.istioConfig = istioConfigList
 
-	//if change detection is enabled then decide if we need to run the checkers
+	// if change detection is enabled then decide if we need to run the checkers
 	if vInfo.changeDetectionEnabled() {
 		changeDetected := detectClusterConfigChange(vInfo)
 		if !changeDetected && !vInfo.forceCheckers() {
@@ -591,7 +591,8 @@ func (in *IstioValidationsService) ValidateIstioObject(ctx context.Context, clus
 		objectCheckers = []checkers.ObjectChecker{serviceEntryChecker}
 		referenceChecker = references.ServiceEntryReferences{Conf: conf, AuthorizationPolicies: rbacDetails.AuthorizationPolicies, Namespace: namespace, Namespaces: nsNames, DestinationRules: istioConfigList.DestinationRules, ServiceEntries: istioConfigList.ServiceEntries, Sidecars: istioConfigList.Sidecars, RegistryServices: registryServices}
 	case kubernetes.Sidecars:
-		sidecarsChecker := checkers.SidecarChecker{Conf: conf,
+		sidecarsChecker := checkers.SidecarChecker{
+			Conf:    conf,
 			Cluster: cluster, Sidecars: istioConfigList.Sidecars, Namespaces: namespaces,
 			WorkloadsPerNamespace: workloadsPerNamespace, ServiceEntries: istioConfigList.ServiceEntries, RegistryServices: registryServices,
 		}
diff --git a/business/layer.go b/business/layer.go
index 1779a0a75..7a3201358 100644
--- a/business/layer.go
+++ b/business/layer.go
@@ -3,11 +3,11 @@ package business
 import (
 	"k8s.io/client-go/tools/clientcmd/api"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/prometheus"
 	"github.com/kiali/kiali/tracing"
 )
diff --git a/business/namespaces.go b/business/namespaces.go
index fab114e62..523412f8c 100644
--- a/business/namespaces.go
+++ b/business/namespaces.go
@@ -8,10 +8,10 @@ import (
 	core_v1 "k8s.io/api/core/v1"
 	"k8s.io/apimachinery/pkg/api/errors"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/observability"
diff --git a/business/proxy_status.go b/business/proxy_status.go
index b0568798c..4e67226c1 100644
--- a/business/proxy_status.go
+++ b/business/proxy_status.go
@@ -4,9 +4,9 @@ import (
 	"context"
 	"fmt"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/models"
 )
 
diff --git a/business/registry_status.go b/business/registry_status.go
index 006386e9b..226bc4997 100644
--- a/business/registry_status.go
+++ b/business/registry_status.go
@@ -3,9 +3,9 @@ package business
 import (
 	"k8s.io/apimachinery/pkg/labels"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 )
 
diff --git a/business/services.go b/business/services.go
index c864bd186..2e09fc78b 100644
--- a/business/services.go
+++ b/business/services.go
@@ -15,9 +15,9 @@ import (
 	"sigs.k8s.io/controller-runtime/pkg/client"
 
 	"github.com/kiali/kiali/business/checkers"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/observability"
diff --git a/business/tls.go b/business/tls.go
index 8725ca7c9..baa159d09 100644
--- a/business/tls.go
+++ b/business/tls.go
@@ -7,10 +7,10 @@ import (
 
 	security_v1 "istio.io/client-go/pkg/apis/security/v1"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/observability"
 	"github.com/kiali/kiali/util/mtls"
diff --git a/business/workloads.go b/business/workloads.go
index c55534a9f..49a5b60f3 100644
--- a/business/workloads.go
+++ b/business/workloads.go
@@ -29,10 +29,10 @@ import (
 	ctrlclient "sigs.k8s.io/controller-runtime/pkg/client"
 
 	"github.com/kiali/kiali/business/checkers"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/observability"
diff --git a/kubernetes/cache/ztunnel_dump.go b/cache/ztunnel_dump.go
similarity index 100%
rename from kubernetes/cache/ztunnel_dump.go
rename to cache/ztunnel_dump.go
diff --git a/controller/controller.go b/controller/controller.go
deleted file mode 100644
index 5322075e1..000000000
--- a/controller/controller.go
+++ /dev/null
@@ -1,88 +0,0 @@
-package controller
-
-/*
-	The controllers manage long running tasks in Kiali that take too long
-	to be completed within a single request.
-
-	As an example, the validations controller handles validations across namespaces or meshes.
-	Namespace/mesh wide validations can take too long for a single request.
-*/
-
-import (
-	"context"
-	"fmt"
-
-	networkingv1 "istio.io/client-go/pkg/apis/networking/v1"
-	"k8s.io/apimachinery/pkg/runtime"
-	clientgoscheme "k8s.io/client-go/kubernetes/scheme"
-	ctrl "sigs.k8s.io/controller-runtime"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
-	metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
-
-	"github.com/kiali/kiali/business"
-	"github.com/kiali/kiali/config"
-	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
-	"github.com/kiali/kiali/log"
-)
-
-func NewScheme() (*runtime.Scheme, error) {
-	scheme := runtime.NewScheme()
-	addSchemeFuncs := []func(s *runtime.Scheme) error{
-		clientgoscheme.AddToScheme,
-		networkingv1.AddToScheme,
-	}
-
-	for _, addToScheme := range addSchemeFuncs {
-		if err := addToScheme(scheme); err != nil {
-			return nil, err
-		}
-	}
-
-	return scheme, nil
-}
-
-// Start creates and starts all the controllers. They'll get cancelled when the context is cancelled.
-func Start(ctx context.Context, conf *config.Config, cf kubernetes.ClientFactory, kialiCache cache.KialiCache, validationsService *business.IstioValidationsService) error {
-	// TODO: Replace with kiali logging but if this isn't set some errors are thrown.
-	ctrl.SetLogger(zap.New())
-
-	// Combine the istio scheme and the kube scheme.
-	log.Debug("Setting up Validations Contoller")
-	scheme, err := NewScheme()
-	if err != nil {
-		return fmt.Errorf("error setting up ValidationsController when creating scheme: %s", err)
-	}
-
-	// In the future this could be any cluster and not just home cluster.
-	homeClusterInfo := cf.GetSAHomeClusterClient().ClusterInfo()
-
-	// Create a new controller manager
-	mgr, err := ctrl.NewManager(homeClusterInfo.ClientConfig, ctrl.Options{
-		// Disable metrics server since Kiali has its own metrics server.
-		Metrics: metricsserver.Options{BindAddress: "0"},
-		Scheme:  scheme,
-	})
-	if err != nil {
-		return fmt.Errorf("error setting up ValidationsController when creating manager: %s", err)
-	}
-
-	var clusters []string
-	// We want one manager/reconciler for all clusters.
-	for _, client := range cf.GetSAClients() {
-		clusters = append(clusters, client.ClusterInfo().Name)
-	}
-
-	if err := NewValidationsController(ctx, clusters, conf, kialiCache, validationsService, mgr); err != nil {
-		return fmt.Errorf("error setting up ValidationsController: %s", err)
-	}
-
-	go func() {
-		if err := mgr.Start(ctx); err != nil {
-			log.Errorf("error starting Validations Controller: %s", err)
-		}
-		log.Debug("Stopped Validations Controller")
-	}()
-
-	return nil
-}
diff --git a/controller/validations.go b/controller/validations.go
index 0a8ebf6e9..6aa01d8e9 100644
--- a/controller/validations.go
+++ b/controller/validations.go
@@ -14,8 +14,8 @@ import (
 	ctrlsource "sigs.k8s.io/controller-runtime/pkg/source"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/models"
 )
diff --git a/handlers/apps.go b/handlers/apps.go
index 40fbee520..36249e9be 100644
--- a/handlers/apps.go
+++ b/handlers/apps.go
@@ -9,11 +9,11 @@ import (
 	"github.com/gorilla/mux"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/prometheus"
diff --git a/handlers/authentication/openid_auth_controller.go b/handlers/authentication/openid_auth_controller.go
index 9d1655a90..b91cae5d1 100644
--- a/handlers/authentication/openid_auth_controller.go
+++ b/handlers/authentication/openid_auth_controller.go
@@ -22,10 +22,10 @@ import (
 	"k8s.io/client-go/tools/clientcmd/api"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/util"
 	"github.com/kiali/kiali/util/httputil"
diff --git a/handlers/authentication/token_auth_controller.go b/handlers/authentication/token_auth_controller.go
index 2c2097401..cad4a6491 100644
--- a/handlers/authentication/token_auth_controller.go
+++ b/handlers/authentication/token_auth_controller.go
@@ -11,10 +11,10 @@ import (
 	"k8s.io/client-go/tools/clientcmd/api"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/util"
 )
diff --git a/handlers/config.go b/handlers/config.go
index af9a31c49..18af14702 100644
--- a/handlers/config.go
+++ b/handlers/config.go
@@ -10,10 +10,10 @@ import (
 	"github.com/rs/zerolog"
 	"gopkg.in/yaml.v2"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/prometheus"
diff --git a/handlers/graph.go b/handlers/graph.go
index 8190e2ab7..f701b49fc 100644
--- a/handlers/graph.go
+++ b/handlers/graph.go
@@ -36,13 +36,13 @@ import (
 	"runtime/debug"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/graph"
 	"github.com/kiali/kiali/graph/api"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/prometheus"
 	"github.com/kiali/kiali/tracing"
diff --git a/handlers/istio_config.go b/handlers/istio_config.go
index 15c826f71..4eef7270a 100644
--- a/handlers/istio_config.go
+++ b/handlers/istio_config.go
@@ -10,11 +10,11 @@ import (
 	"k8s.io/apimachinery/pkg/runtime/schema"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/prometheus"
diff --git a/handlers/istio_status.go b/handlers/istio_status.go
index c5dd00247..c4a329b09 100644
--- a/handlers/istio_status.go
+++ b/handlers/istio_status.go
@@ -4,11 +4,11 @@ import (
 	"net/http"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/prometheus"
 	"github.com/kiali/kiali/tracing"
 )
diff --git a/handlers/mesh.go b/handlers/mesh.go
index 3e8be804f..eee9f6f6c 100644
--- a/handlers/mesh.go
+++ b/handlers/mesh.go
@@ -7,11 +7,11 @@ import (
 	"k8s.io/apimachinery/pkg/api/errors"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/mesh"
 	"github.com/kiali/kiali/mesh/api"
 	"github.com/kiali/kiali/models"
diff --git a/handlers/namespaces.go b/handlers/namespaces.go
index 5ccfbe473..c265da441 100644
--- a/handlers/namespaces.go
+++ b/handlers/namespaces.go
@@ -7,11 +7,11 @@ import (
 	"github.com/gorilla/mux"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/prometheus"
diff --git a/handlers/proxy_logging.go b/handlers/proxy_logging.go
index 501da2a69..5728701df 100644
--- a/handlers/proxy_logging.go
+++ b/handlers/proxy_logging.go
@@ -8,11 +8,11 @@ import (
 	"github.com/gorilla/mux"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/prometheus"
 	"github.com/kiali/kiali/tracing"
 )
diff --git a/handlers/proxy_status.go b/handlers/proxy_status.go
index 3f3a8473c..35293213a 100644
--- a/handlers/proxy_status.go
+++ b/handlers/proxy_status.go
@@ -6,10 +6,10 @@ import (
 	"github.com/gorilla/mux"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 )
 
 func ConfigDump(conf *config.Config, kialiCache cache.KialiCache, clientFactory kubernetes.ClientFactory, discovery istio.MeshDiscovery) http.HandlerFunc {
diff --git a/handlers/root.go b/handlers/root.go
index 2eecd1d08..aa5b11b69 100644
--- a/handlers/root.go
+++ b/handlers/root.go
@@ -3,10 +3,10 @@ package handlers
 import (
 	"net/http"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/status"
 )
 
diff --git a/handlers/tls.go b/handlers/tls.go
index 5b37a9f2e..1a963dd7e 100644
--- a/handlers/tls.go
+++ b/handlers/tls.go
@@ -7,11 +7,11 @@ import (
 	"github.com/gorilla/mux"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/prometheus"
diff --git a/handlers/tracing.go b/handlers/tracing.go
index 158c4b842..efbd61dc1 100644
--- a/handlers/tracing.go
+++ b/handlers/tracing.go
@@ -11,11 +11,11 @@ import (
 	"github.com/gorilla/mux"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/prometheus"
 	"github.com/kiali/kiali/tracing"
diff --git a/handlers/utils.go b/handlers/utils.go
index ea011aaf5..de66e9af5 100644
--- a/handlers/utils.go
+++ b/handlers/utils.go
@@ -10,12 +10,12 @@ import (
 	"k8s.io/client-go/tools/clientcmd/api"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/handlers/authentication"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/prometheus"
diff --git a/handlers/workloads.go b/handlers/workloads.go
index e774f59c7..2dd308a72 100644
--- a/handlers/workloads.go
+++ b/handlers/workloads.go
@@ -14,11 +14,11 @@ import (
 	"github.com/gorilla/mux"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/prometheus"
diff --git a/istio/discovery.go b/istio/discovery.go
index 1437f33d2..1abaffe2c 100644
--- a/istio/discovery.go
+++ b/istio/discovery.go
@@ -17,9 +17,9 @@ import (
 	k8syaml "k8s.io/apimachinery/pkg/util/yaml"
 	ctrlclient "sigs.k8s.io/controller-runtime/pkg/client"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/observability"
diff --git a/kiali.go b/kiali.go
index 3f2f01178..623ac9d1d 100644
--- a/kiali.go
+++ b/kiali.go
@@ -62,12 +62,12 @@ import (
 	k8snetworkingv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/controller"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/prometheus"
diff --git a/mesh/api/api.go b/mesh/api/api.go
index 71e77930b..48b5ceda5 100644
--- a/mesh/api/api.go
+++ b/mesh/api/api.go
@@ -8,12 +8,12 @@ import (
 	"k8s.io/apimachinery/pkg/api/errors"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/graph"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/mesh"
 	"github.com/kiali/kiali/mesh/config/common"
diff --git a/mesh/appender.go b/mesh/appender.go
index f176e9701..8c105944e 100644
--- a/mesh/appender.go
+++ b/mesh/appender.go
@@ -4,11 +4,11 @@ import (
 	"context"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/prometheus"
 )
 
diff --git a/mesh/util.go b/mesh/util.go
index 32a497172..6b8344a48 100644
--- a/mesh/util.go
+++ b/mesh/util.go
@@ -4,10 +4,10 @@ import (
 	"context"
 	nethttp "net/http"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/status"
 )
 
diff --git a/routing/router.go b/routing/router.go
index ee056c8e2..e5d9cfba6 100644
--- a/routing/router.go
+++ b/routing/router.go
@@ -16,13 +16,13 @@ import (
 	zerolog "github.com/rs/zerolog/log"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/handlers"
 	"github.com/kiali/kiali/handlers/authentication"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	kialiprometheus "github.com/kiali/kiali/prometheus"
 	"github.com/kiali/kiali/prometheus/internalmetrics"
@@ -357,12 +357,14 @@ func (a alice) append(m func(http.Handler) http.Handler) alice {
 	a.m = append(a.m, m)
 	return a
 }
+
 func (a alice) then(h http.Handler) http.Handler {
 	for i := range a.m {
 		h = a.m[len(a.m)-1-i](h)
 	}
 	return h
 }
+
 func buildHttpHandlerLogger(route Route, handlerFunction http.Handler) http.Handler {
 	c := alice{}
 	c = c.append(hlog.NewHandler(zerolog.With().Str("route", route.Name).Logger()))
diff --git a/routing/routes.go b/routing/routes.go
index 9d79150fa..7e2a5123c 100644
--- a/routing/routes.go
+++ b/routing/routes.go
@@ -6,13 +6,13 @@ import (
 	"golang.org/x/exp/maps"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/handlers"
 	"github.com/kiali/kiali/handlers/authentication"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/prometheus"
 	"github.com/kiali/kiali/tracing"
 )
diff --git a/server/server.go b/server/server.go
index ed7bb87a1..6af82b046 100644
--- a/server/server.go
+++ b/server/server.go
@@ -12,11 +12,11 @@ import (
 	sdktrace "go.opentelemetry.io/otel/sdk/trace"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/log"
 	"github.com/kiali/kiali/observability"
 	"github.com/kiali/kiali/prometheus"
diff --git a/status/status.go b/status/status.go
index 513e7039d..92900113b 100644
--- a/status/status.go
+++ b/status/status.go
@@ -5,10 +5,10 @@ import (
 	"context"
 	"strings"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/models"
 )
 
diff --git a/util/intutil/convert.go b/util/intutil/convert.go
deleted file mode 100644
index abaa74675..000000000
--- a/util/intutil/convert.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package intutil
-
-import "errors"
-
-func Convert(subject interface{}) (int, error) {
-	var result int
-
-	switch typedSubject := subject.(type) {
-	case uint64:
-		result = int(typedSubject)
-	case int64:
-		result = int(typedSubject)
-	case int32:
-		result = int(typedSubject)
-	case uint32:
-		result = int(typedSubject)
-	case int:
-		result = typedSubject
-	default:
-		return 0, errors.New("it is not a numeric input")
-	}
-
-	return result, nil
-}


Test patch:
diff --git a/business/controlplane_monitor_test.go b/business/controlplane_monitor_test.go
index a73fb5831..c7285f2ff 100644
--- a/business/controlplane_monitor_test.go
+++ b/business/controlplane_monitor_test.go
@@ -15,10 +15,10 @@ import (
 	core_v1 "k8s.io/api/core/v1"
 	meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 )
 
diff --git a/business/health_test.go b/business/health_test.go
index 8f6eab59e..d6e67ce03 100644
--- a/business/health_test.go
+++ b/business/health_test.go
@@ -15,10 +15,10 @@ import (
 	meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/runtime"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/prometheus/prometheustest"
diff --git a/business/namespaces_test.go b/business/namespaces_test.go
index 1b3060dc1..4bb3c745e 100644
--- a/business/namespaces_test.go
+++ b/business/namespaces_test.go
@@ -16,10 +16,10 @@ import (
 	"k8s.io/apimachinery/pkg/runtime"
 	kubeclienttesting "k8s.io/client-go/testing"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/models"
 )
diff --git a/business/services_test.go b/business/services_test.go
index 211947c19..2e2e54fb0 100644
--- a/business/services_test.go
+++ b/business/services_test.go
@@ -18,10 +18,10 @@ import (
 	"k8s.io/apimachinery/pkg/runtime/schema"
 	"k8s.io/apimachinery/pkg/util/yaml"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/prometheus"
diff --git a/business/testing.go b/business/testing.go
index 69ffe6138..30a4d9f90 100644
--- a/business/testing.go
+++ b/business/testing.go
@@ -8,10 +8,10 @@ package business
 import (
 	"testing"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/prometheus"
 )
diff --git a/business/workloads_test.go b/business/workloads_test.go
index c2ab6b28e..9f44f7f3a 100644
--- a/business/workloads_test.go
+++ b/business/workloads_test.go
@@ -20,9 +20,9 @@ import (
 	"k8s.io/apimachinery/pkg/runtime/schema"
 	"k8s.io/apimachinery/pkg/types"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/prometheus/prometheustest"
diff --git a/kubernetes/cache/cache.go b/cache/cache.go
similarity index 100%
rename from kubernetes/cache/cache.go
rename to cache/cache.go
diff --git a/kubernetes/cache/cache_test.go b/cache/cache_test.go
similarity index 99%
rename from kubernetes/cache/cache_test.go
rename to cache/cache_test.go
index b8e904469..db68f8642 100644
--- a/kubernetes/cache/cache_test.go
+++ b/cache/cache_test.go
@@ -14,9 +14,9 @@ import (
 	"k8s.io/apimachinery/pkg/runtime"
 	ctrlclient "sigs.k8s.io/controller-runtime/pkg/client"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/models"
 )
@@ -303,7 +303,7 @@ func TestZtunnelDump(t *testing.T) {
 	initData := cache.GetZtunnelDump("cluster-default", "istio-system", "ztunnel-7hml8")
 	require.Nil(initData)
 
-	zTunnelData, err := os.Open("../testdata/ztunnel-config.json")
+	zTunnelData, err := os.Open("../kubernetes/testdata/ztunnel-config.json")
 	require.NoError(err)
 	defer zTunnelData.Close()
 
diff --git a/kubernetes/cache/proxy_status.go b/cache/proxy_status.go
similarity index 100%
rename from kubernetes/cache/proxy_status.go
rename to cache/proxy_status.go
diff --git a/kubernetes/cache/registry_status.go b/cache/registry_status.go
similarity index 100%
rename from kubernetes/cache/registry_status.go
rename to cache/registry_status.go
diff --git a/kubernetes/cache/testing.go b/cache/testing.go
similarity index 100%
rename from kubernetes/cache/testing.go
rename to cache/testing.go
diff --git a/kubernetes/cache/transform.go b/cache/transform.go
similarity index 100%
rename from kubernetes/cache/transform.go
rename to cache/transform.go
diff --git a/kubernetes/cache/transform_test.go b/cache/transform_test.go
similarity index 98%
rename from kubernetes/cache/transform_test.go
rename to cache/transform_test.go
index 235f63602..5e673d8bf 100644
--- a/kubernetes/cache/transform_test.go
+++ b/cache/transform_test.go
@@ -8,8 +8,8 @@ import (
 	corev1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 )
 
 func TestGetPodTrimmed(t *testing.T) {
diff --git a/controller/validations_test.go b/controller/validations_test.go
index f6c2c6f78..2fe0b2310 100644
--- a/controller/validations_test.go
+++ b/controller/validations_test.go
@@ -19,11 +19,11 @@ import (
 	"sigs.k8s.io/controller-runtime/pkg/reconcile"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/controller"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/store"
diff --git a/graph/api/api_test.go b/graph/api/api_test.go
index 8d586b07a..6569af1a2 100644
--- a/graph/api/api_test.go
+++ b/graph/api/api_test.go
@@ -22,11 +22,11 @@ import (
 	"k8s.io/client-go/tools/clientcmd/api"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/graph"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/prometheus"
 	"github.com/kiali/kiali/prometheus/prometheustest"
@@ -1200,7 +1200,7 @@ func respond(w http.ResponseWriter, code int, payload interface{}) {
 func assertObjectsEqual(t *testing.T, expected, actual []byte, expectedFileName string) {
 	if !assert.ObjectsAreEqual(expected, actual) {
 		// uncomment this if you are trying to create new versions of the expected files, in case of an impl change
-		//os.WriteFile(expectedFileName, actual, 0o644)
+		// os.WriteFile(expectedFileName, actual, 0o644)
 
 		t.Logf("Actual response does not equal expected golden copy [%s]. If you've updated the golden copy, ensure it ends with a newline.", expectedFileName)
 		t.Fail()
@@ -3871,45 +3871,53 @@ func ambientWorkloads(t *testing.T) *business.Layer {
 			Name:        "productpage-v1",
 			Namespace:   "bookinfo",
 			Labels:      map[string]string{"app": "productpage", "version": "v1"},
-			Annotations: map[string]string{"sidecar.istio.io/status": "{\"version\":\"\",\"initContainers\":[\"istio-init\",\"enable-core-dump\"],\"containers\":[\"istio-proxy\"],\"volumes\":[\"istio-envoy\",\"istio-certs\"]}"}},
+			Annotations: map[string]string{"sidecar.istio.io/status": "{\"version\":\"\",\"initContainers\":[\"istio-init\",\"enable-core-dump\"],\"containers\":[\"istio-proxy\"],\"volumes\":[\"istio-envoy\",\"istio-certs\"]}"},
+		},
 		Spec: core_v1.PodSpec{
 			Containers: []core_v1.Container{
 				{Name: "productpage-v1", Image: "whatever"},
 			},
-		}}
+		},
+	}
 	k8spod2 := &core_v1.Pod{
 		ObjectMeta: meta_v1.ObjectMeta{
 			Name:        "ratings-v1",
 			Namespace:   "bookinfo",
 			Labels:      map[string]string{"app": "ratings", "version": "v1"},
-			Annotations: map[string]string{"sidecar.istio.io/status": "{\"version\":\"\",\"initContainers\":[\"istio-init\",\"enable-core-dump\"],\"containers\":[\"istio-proxy\"],\"volumes\":[\"istio-envoy\",\"istio-certs\"]}"}},
+			Annotations: map[string]string{"sidecar.istio.io/status": "{\"version\":\"\",\"initContainers\":[\"istio-init\",\"enable-core-dump\"],\"containers\":[\"istio-proxy\"],\"volumes\":[\"istio-envoy\",\"istio-certs\"]}"},
+		},
 		Spec: core_v1.PodSpec{
 			Containers: []core_v1.Container{
 				{Name: "ratings-v1", Image: "whatever"},
 			},
-		}}
+		},
+	}
 	k8spod3 := &core_v1.Pod{
 		ObjectMeta: meta_v1.ObjectMeta{
 			Name:        "reviews-v1",
 			Namespace:   "bookinfo",
 			Labels:      map[string]string{"app": "reviews", "version": "v1"},
-			Annotations: map[string]string{"sidecar.istio.io/status": "{\"version\":\"\",\"initContainers\":[\"istio-init\",\"enable-core-dump\"],\"containers\":[\"istio-proxy\"],\"volumes\":[\"istio-envoy\",\"istio-certs\"]}"}},
+			Annotations: map[string]string{"sidecar.istio.io/status": "{\"version\":\"\",\"initContainers\":[\"istio-init\",\"enable-core-dump\"],\"containers\":[\"istio-proxy\"],\"volumes\":[\"istio-envoy\",\"istio-certs\"]}"},
+		},
 		Spec: core_v1.PodSpec{
 			Containers: []core_v1.Container{
 				{Name: "reviews-v1", Image: "whatever"},
 			},
-		}}
+		},
+	}
 	k8spod4 := &core_v1.Pod{
 		ObjectMeta: meta_v1.ObjectMeta{
 			Name:        "waypoint",
 			Namespace:   "bookinfo",
 			Labels:      map[string]string{"app": "waypoint", "version": "v1", config.WaypointLabel: config.WaypointLabelValue, config.GatewayLabel: "waypoint"},
-			Annotations: map[string]string{"sidecar.istio.io/status": "{\"version\":\"\",\"initContainers\":[\"istio-init\",\"enable-core-dump\"],\"containers\":[\"istio-proxy\"],\"volumes\":[\"istio-envoy\",\"istio-certs\"]}"}},
+			Annotations: map[string]string{"sidecar.istio.io/status": "{\"version\":\"\",\"initContainers\":[\"istio-init\",\"enable-core-dump\"],\"containers\":[\"istio-proxy\"],\"volumes\":[\"istio-envoy\",\"istio-certs\"]}"},
+		},
 		Spec: core_v1.PodSpec{
 			Containers: []core_v1.Container{
 				{Name: "istio-waypoint", Image: "whatever"},
 			},
-		}}
+		},
+	}
 
 	ns := kubetest.FakeNamespaceWithLabels("bookinfo", map[string]string{"istio.io/dataplane-mode": "ambient"})
 	k8s := kubetest.NewFakeK8sClient(k8spod1, k8spod2, k8spod3, k8spod4, ns)
@@ -3926,7 +3934,6 @@ func ambientWorkloads(t *testing.T) *business.Layer {
 }
 
 func ambientMockGraph(api *prometheustest.PromAPIMock) {
-
 	q0 := `round(sum(rate(istio_requests_total{reporter=~"waypoint|source",source_workload_namespace!="bookinfo",destination_workload_namespace="unknown",destination_workload="unknown",destination_service=~"^.+\\.bookinfo\\..+$"} [600s])) by (source_cluster,source_workload_namespace,source_workload,source_canonical_service,source_canonical_revision,destination_cluster,destination_service_namespace,destination_service,destination_service_name,destination_workload_namespace,destination_workload,destination_canonical_service,destination_canonical_revision,request_protocol,response_code,grpc_response_status,response_flags) > 0,0.001)`
 	v0 := model.Vector{}
 
diff --git a/graph/telemetry/istio/appender/extensions_test.go b/graph/telemetry/istio/appender/extensions_test.go
index d91dee8eb..7db0c48a5 100644
--- a/graph/telemetry/istio/appender/extensions_test.go
+++ b/graph/telemetry/istio/appender/extensions_test.go
@@ -13,11 +13,11 @@ import (
 	"k8s.io/client-go/tools/clientcmd/api"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/graph"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/prometheus"
 	"github.com/kiali/kiali/prometheus/prometheustest"
diff --git a/graph/telemetry/istio/appender/health_test.go b/graph/telemetry/istio/appender/health_test.go
index 0f2b07eaf..8fc7bddfa 100644
--- a/graph/telemetry/istio/appender/health_test.go
+++ b/graph/telemetry/istio/appender/health_test.go
@@ -17,11 +17,11 @@ import (
 	ctrlclient "sigs.k8s.io/controller-runtime/pkg/client"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/graph"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/prometheus/prometheustest"
diff --git a/graph/telemetry/istio/appender/service_entry_test.go b/graph/telemetry/istio/appender/service_entry_test.go
index 5bf647ffc..37b1af62e 100644
--- a/graph/telemetry/istio/appender/service_entry_test.go
+++ b/graph/telemetry/istio/appender/service_entry_test.go
@@ -11,12 +11,12 @@ import (
 	"k8s.io/apimachinery/pkg/runtime"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/graph"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/istio/istiotest"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/models"
 )
diff --git a/handlers/apps_test.go b/handlers/apps_test.go
index 6ef1647b2..9b835235b 100644
--- a/handlers/apps_test.go
+++ b/handlers/apps_test.go
@@ -22,11 +22,11 @@ import (
 	"k8s.io/client-go/tools/clientcmd/api"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/handlers/authentication"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/prometheus"
diff --git a/handlers/authentication/openid_auth_controller_test.go b/handlers/authentication/openid_auth_controller_test.go
index 3f686b5a2..9a1915014 100644
--- a/handlers/authentication/openid_auth_controller_test.go
+++ b/handlers/authentication/openid_auth_controller_test.go
@@ -20,10 +20,10 @@ import (
 	"github.com/stretchr/testify/require"
 	meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/util"
 )
diff --git a/handlers/authentication/token_auth_controller_test.go b/handlers/authentication/token_auth_controller_test.go
index faabc23ff..ced337366 100644
--- a/handlers/authentication/token_auth_controller_test.go
+++ b/handlers/authentication/token_auth_controller_test.go
@@ -14,10 +14,10 @@ import (
 	k8s_errors "k8s.io/apimachinery/pkg/api/errors"
 	"k8s.io/apimachinery/pkg/runtime/schema"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/util"
 )
diff --git a/handlers/authentication_test.go b/handlers/authentication_test.go
index 53ee9c40a..9ebf8e198 100644
--- a/handlers/authentication_test.go
+++ b/handlers/authentication_test.go
@@ -18,11 +18,11 @@ import (
 	meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/client-go/tools/clientcmd/api"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/handlers/authentication"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/util"
 )
diff --git a/handlers/config_test.go b/handlers/config_test.go
index a7e39168d..b62bc02f4 100644
--- a/handlers/config_test.go
+++ b/handlers/config_test.go
@@ -11,10 +11,10 @@ import (
 	prom_v1 "github.com/prometheus/client_golang/api/prometheus/v1"
 	"github.com/stretchr/testify/require"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/handlers"
 	"github.com/kiali/kiali/istio/istiotest"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/prometheus/prometheustest"
 )
diff --git a/handlers/mesh_test.go b/handlers/mesh_test.go
index aef4f27e7..332af96fc 100644
--- a/handlers/mesh_test.go
+++ b/handlers/mesh_test.go
@@ -14,13 +14,13 @@ import (
 	"k8s.io/client-go/tools/clientcmd/api"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/handlers"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/istio/istiotest"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/prometheus"
diff --git a/handlers/namespaces_test.go b/handlers/namespaces_test.go
index 795f62368..db5da552b 100644
--- a/handlers/namespaces_test.go
+++ b/handlers/namespaces_test.go
@@ -11,11 +11,11 @@ import (
 	"github.com/stretchr/testify/assert"
 	meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/handlers"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/prometheus"
 	"github.com/kiali/kiali/prometheus/prometheustest"
diff --git a/handlers/proxy_logging_test.go b/handlers/proxy_logging_test.go
index 5d15baa93..6983602c4 100644
--- a/handlers/proxy_logging_test.go
+++ b/handlers/proxy_logging_test.go
@@ -12,12 +12,12 @@ import (
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/handlers"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/prometheus/prometheustest"
 	"github.com/kiali/kiali/tracing"
diff --git a/handlers/workloads_test.go b/handlers/workloads_test.go
index 2156c45e5..42902dd32 100644
--- a/handlers/workloads_test.go
+++ b/handlers/workloads_test.go
@@ -11,11 +11,11 @@ import (
 	"k8s.io/apimachinery/pkg/runtime"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/prometheus/prometheustest"
 	"github.com/kiali/kiali/tracing"
diff --git a/istio/discovery_internal_test.go b/istio/discovery_internal_test.go
index c2b485688..b7fd2ded8 100644
--- a/istio/discovery_internal_test.go
+++ b/istio/discovery_internal_test.go
@@ -11,9 +11,9 @@ import (
 	corev1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/models"
 )
diff --git a/istio/discovery_test.go b/istio/discovery_test.go
index 3ee0dcfdb..2efc44cb0 100644
--- a/istio/discovery_test.go
+++ b/istio/discovery_test.go
@@ -24,10 +24,10 @@ import (
 	"k8s.io/client-go/rest"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/tests/testutils"
diff --git a/istio/version_test.go b/istio/version_test.go
index 316853304..298b1378f 100644
--- a/istio/version_test.go
+++ b/istio/version_test.go
@@ -12,9 +12,9 @@ import (
 	corev1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 )
 
diff --git a/mesh/api/api_test.go b/mesh/api/api_test.go
index a88d40512..d8960bea8 100644
--- a/mesh/api/api_test.go
+++ b/mesh/api/api_test.go
@@ -23,11 +23,11 @@ import (
 	"k8s.io/client-go/rest"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/grafana"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/kubernetes/kubetest"
 	"github.com/kiali/kiali/mesh"
 	"github.com/kiali/kiali/models"
@@ -163,7 +163,6 @@ V/InYncUvcXt0M4JJSUJi/u6VBKSYYDIHt3mk9Le2qlMQuHkOQ1ZcuEOM2CU/KtO
 	}
 
 	ztunnelObject := &apps_v1.DaemonSet{
-
 		TypeMeta: v1.TypeMeta{
 			APIVersion: kubernetes.DaemonSets.GroupVersion().String(),
 			Kind:       kubernetes.DaemonSets.Kind,
@@ -358,7 +357,7 @@ func TestMeshGraph(t *testing.T) {
 		// The diff is more readable using cmp
 		t.Logf("%s", cmp.Diff(string(expected), string(actual)))
 		// The dump is more useful for updating the .expected file
-		//t.Logf("%s", string(actual))
+		// t.Logf("%s", string(actual))
 	}
 	assert.Equal(t, 200, resp.StatusCode)
 }
diff --git a/server/server_test.go b/server/server_test.go
index 61c391d3d..9c3719069 100644
--- a/server/server_test.go
+++ b/server/server_test.go
@@ -22,10 +22,10 @@ import (
 	"github.com/stretchr/testify/assert"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/config/security"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/util"
 )
 
diff --git a/tests/integration/controller/validations_test.go b/tests/integration/controller/validations_test.go
index bc1a670dc..6081024de 100644
--- a/tests/integration/controller/validations_test.go
+++ b/tests/integration/controller/validations_test.go
@@ -13,11 +13,11 @@ import (
 	"sigs.k8s.io/controller-runtime/pkg/client"
 
 	"github.com/kiali/kiali/business"
+	"github.com/kiali/kiali/cache"
 	"github.com/kiali/kiali/config"
 	"github.com/kiali/kiali/controller"
 	"github.com/kiali/kiali/istio"
 	"github.com/kiali/kiali/kubernetes"
-	"github.com/kiali/kiali/kubernetes/cache"
 	"github.com/kiali/kiali/models"
 	"github.com/kiali/kiali/util"
 )