Skip to content

Commit 594cba3

Browse files
authored
catalogd: remove unused or unnecessary code (#1637)
Signed-off-by: Joe Lanford <[email protected]>
1 parent 96972f0 commit 594cba3

File tree

4 files changed

+4
-205
lines changed

4 files changed

+4
-205
lines changed

catalogd/internal/k8sutil/k8sutil.go

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

catalogd/internal/k8sutil/k8sutil_test.go

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

catalogd/internal/serverutil/serverutil.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import (
99

1010
ctrl "sigs.k8s.io/controller-runtime"
1111
"sigs.k8s.io/controller-runtime/pkg/certwatcher"
12+
"sigs.k8s.io/controller-runtime/pkg/manager"
1213

1314
catalogdmetrics "github.com/operator-framework/operator-controller/catalogd/internal/metrics"
1415
"github.com/operator-framework/operator-controller/catalogd/internal/storage"
15-
"github.com/operator-framework/operator-controller/catalogd/internal/third_party/server"
1616
)
1717

1818
type CatalogServerConfig struct {
@@ -40,8 +40,9 @@ func AddCatalogServerToManager(mgr ctrl.Manager, cfg CatalogServerConfig, tlsFil
4040

4141
shutdownTimeout := 30 * time.Second
4242

43-
catalogServer := server.Server{
44-
Kind: "catalogs",
43+
catalogServer := manager.Server{
44+
Name: "catalogs",
45+
OnlyServeWhenLeader: true,
4546
Server: &http.Server{
4647
Addr: cfg.CatalogAddr,
4748
Handler: catalogdmetrics.AddMetricsToHandler(cfg.LocalStorage.StorageServerHandler()),

catalogd/internal/third_party/server/server.go

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

0 commit comments

Comments
 (0)