Use containerd plugin config.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
@@ -30,7 +30,6 @@ import (
|
||||
"github.com/containerd/cgroups"
|
||||
"github.com/containerd/containerd/sys"
|
||||
runtimespec "github.com/opencontainers/runtime-spec/specs-go"
|
||||
"github.com/opencontainers/selinux/go-selinux"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
"k8s.io/kubernetes/pkg/util/interrupt"
|
||||
@@ -90,7 +89,6 @@ func main() {
|
||||
if err := o.InitFlags(cmd.Flags()); err != nil {
|
||||
return fmt.Errorf("failed to init CRI containerd flags: %v", err)
|
||||
}
|
||||
validateConfig(o)
|
||||
|
||||
if err := setLogLevel(o.LogLevel); err != nil {
|
||||
return fmt.Errorf("failed to set log level: %v", err)
|
||||
@@ -118,7 +116,7 @@ func main() {
|
||||
}
|
||||
|
||||
logrus.Infof("Run cri-containerd grpc server on socket %q", o.SocketPath)
|
||||
s, err := server.NewCRIContainerdService(o.Config)
|
||||
s, err := server.NewCRIContainerdService(o.CRIConfig)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create CRI containerd service: %v", err)
|
||||
}
|
||||
@@ -138,16 +136,6 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
func validateConfig(o *options.CRIContainerdOptions) {
|
||||
if o.EnableSelinux {
|
||||
if !selinux.GetEnabled() {
|
||||
logrus.Warn("Selinux is not supported")
|
||||
}
|
||||
} else {
|
||||
selinux.SetDisabled()
|
||||
}
|
||||
}
|
||||
|
||||
func setupDumpStacksTrap() {
|
||||
c := make(chan os.Signal, 1)
|
||||
signal.Notify(c, syscall.SIGUSR1)
|
||||
|
||||
Reference in New Issue
Block a user