Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
Stop using init package for logserver (#1946)
Browse files Browse the repository at this point in the history
Signed-off-by: Grant Linville <[email protected]>
  • Loading branch information
g-linville authored Jul 18, 2023
1 parent 7b1a325 commit 7f9a9d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pkg/cli/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cli
import (
minkserver "github.com/acorn-io/mink/pkg/server"
cli "github.com/acorn-io/runtime/pkg/cli/builder"
_ "github.com/acorn-io/runtime/pkg/logserver/init"
"github.com/acorn-io/runtime/pkg/logserver"
"github.com/acorn-io/runtime/pkg/server"
"github.com/spf13/cobra"
)
Expand Down Expand Up @@ -41,6 +41,8 @@ func (a *APIServer) Run(cmd *cobra.Command, args []string) error {
return err
}

logserver.StartServerWithDefaults()

<-cmd.Context().Done()
return cmd.Context().Err()
}
4 changes: 3 additions & 1 deletion pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/acorn-io/runtime/pkg/event"
"github.com/acorn-io/runtime/pkg/imagesystem"
"github.com/acorn-io/runtime/pkg/k8sclient"
_ "github.com/acorn-io/runtime/pkg/logserver/init"
"github.com/acorn-io/runtime/pkg/logserver"
"github.com/acorn-io/runtime/pkg/scheme"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/wait"
Expand Down Expand Up @@ -106,5 +106,7 @@ func (c *Controller) Start(ctx context.Context) error {
autoupgrade.StartSync(ctx, c.Router.Backend())
}()

logserver.StartServerWithDefaults()

return c.Router.Start(ctx)
}

0 comments on commit 7f9a9d5

Please sign in to comment.