Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
floreks committed Sep 18, 2024
1 parent 2f4ca12 commit 4f54af5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions cmd/agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ func main() {
config := ctrl.GetConfigOrDie()
ctx := ctrl.LoggerInto(ctrl.SetupSignalHandler(), setupLog)

// supervisor := supervisor.New(ctx)
extConsoleClient := client.New(args.ConsoleUrl(), args.DeployToken())
discoveryClient := initDiscoveryClientOrDie(config)
kubeManager := initKubeManagerOrDie(config)
Expand All @@ -74,7 +73,6 @@ func main() {
cache.RunDiscoveryCacheInBackgroundOrDie(ctx, discoveryClient)

// Start the console manager in background.
// supervisor.AddFunc(runConsoleManagerInBackgroundOrDie(ctx, consoleManager))
runConsoleManagerInBackgroundOrDie(ctx, consoleManager)

// Start the standard kubernetes manager and block the main thread until context cancel.
Expand Down
4 changes: 4 additions & 0 deletions pkg/cache/gate_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ var (
)

func InitGateCache(expireAfter time.Duration, consoleClient client.Client) {
if gateCache != nil {
return
}

gateCache = client.NewCache[console.PipelineGateFragment](expireAfter, func(id string) (*console.PipelineGateFragment, error) {
return consoleClient.GetClusterGate(id)
})
Expand Down

0 comments on commit 4f54af5

Please sign in to comment.