Skip to content

Commit

Permalink
Restructure to run the logger inside of cri-dockerd
Browse files Browse the repository at this point in the history
  • Loading branch information
nwneisen committed Oct 11, 2023
1 parent f4d910e commit 243657b
Show file tree
Hide file tree
Showing 1,103 changed files with 1,392 additions and 311,920 deletions.
9 changes: 9 additions & 0 deletions cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"github.com/Mirantis/cri-dockerd/cmd/version"
"github.com/Mirantis/cri-dockerd/config"
"github.com/Mirantis/cri-dockerd/core"
"github.com/Mirantis/cri-dockerd/internal/criLogDriver"
"github.com/Mirantis/cri-dockerd/streaming"
"github.com/sirupsen/logrus"

Expand All @@ -35,6 +36,8 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/pflag"
runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1"

"github.com/docker/go-plugins-helpers/sdk"
)

const (
Expand Down Expand Up @@ -217,6 +220,12 @@ func RunCriDockerd(f *options.DockerCRIFlags, stopCh <-chan struct{}) error {
return err
}

h := sdk.NewHandler(`{"Implements": ["LoggingDriver"]}`)
criLogDriver.Handlers(&h, criLogDriver.NewDriver())
if err := h.ServeUnix("dualLoggingDriver", 0); err != nil {
panic(err)
}

logrus.Info("Starting the GRPC backend for the Docker CRI interface.")
server := backend.NewCriDockerServer(f.RemoteRuntimeEndpoint, ds)
if err := server.Start(); err != nil {
Expand Down
2 changes: 0 additions & 2 deletions driver/.gitignore

This file was deleted.

14 changes: 0 additions & 14 deletions driver/Makefile

This file was deleted.

37 changes: 0 additions & 37 deletions driver/cmd/dual-log-driver/main.go

This file was deleted.

17 changes: 0 additions & 17 deletions driver/configs/config.json

This file was deleted.

43 changes: 0 additions & 43 deletions driver/go.mod

This file was deleted.

156 changes: 0 additions & 156 deletions driver/go.sum

This file was deleted.

Loading

0 comments on commit 243657b

Please sign in to comment.