Skip to content

Commit c82b05c

Browse files
TomerNewmank8s-ci-robot
authored andcommitted
Removing cache and image translation from Hub&Spoke
Now that we are using the cluster's container-runtime to pull images, maintaining our own cache is redundant since the container runtime is using its own cache on the nodes. In addition to that, we had some issue invalidating cache entries in some cases, therefore and since we don't need it anymore, removing it completely simplifies the flow. We should use the images as mentioned in the ManagedClusterModule. There is no need for additional manipulations to it.
1 parent b73e9f3 commit c82b05c

File tree

7 files changed

+7
-537
lines changed

7 files changed

+7
-537
lines changed

cmd/manager-hub/main.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ package main
1818

1919
import (
2020
"flag"
21-
"time"
22-
2321
"github.com/kubernetes-sigs/kernel-module-management/internal/config"
2422
"github.com/kubernetes-sigs/kernel-module-management/internal/controllers"
2523
"k8s.io/apimachinery/pkg/runtime"
@@ -38,7 +36,6 @@ import (
3836
"github.com/kubernetes-sigs/kernel-module-management/api-hub/v1beta1"
3937
"github.com/kubernetes-sigs/kernel-module-management/internal/build"
4038
"github.com/kubernetes-sigs/kernel-module-management/internal/build/pod"
41-
"github.com/kubernetes-sigs/kernel-module-management/internal/cache"
4239
"github.com/kubernetes-sigs/kernel-module-management/internal/cluster"
4340
"github.com/kubernetes-sigs/kernel-module-management/internal/cmd"
4441
"github.com/kubernetes-sigs/kernel-module-management/internal/constants"
@@ -135,14 +132,10 @@ func main() {
135132
ctrlLogger.Info("Adding controller")
136133

137134
operatorNamespace := cmd.GetEnvOrFatalError(constants.OperatorNamespaceEnvVar, setupLogger)
138-
139-
cache := cache.New[string](10 * time.Minute)
140135
ctx := ctrl.SetupSignalHandler()
141-
cache.StartCollecting(ctx, 10*time.Minute)
142-
143136
mcmr := hub.NewManagedClusterModuleReconciler(
144137
client,
145-
manifestwork.NewCreator(client, scheme, kernelAPI, registryAPI, cache, operatorNamespace),
138+
manifestwork.NewCreator(client, scheme, kernelAPI, registryAPI, operatorNamespace),
146139
cluster.NewClusterAPI(client, kernelAPI, buildAPI, signAPI, operatorNamespace),
147140
statusupdater.NewManagedClusterModuleStatusUpdater(client),
148141
filterAPI,
@@ -177,5 +170,4 @@ func main() {
177170
cmd.FatalError(setupLogger, err, "problem running manager")
178171
}
179172

180-
cache.WaitForTermination()
181173
}

internal/cache/cache.go

Lines changed: 0 additions & 102 deletions
This file was deleted.

internal/cache/cache_test.go

Lines changed: 0 additions & 162 deletions
This file was deleted.

0 commit comments

Comments
 (0)