diff --git a/src/cm/container_manager_linux.go b/src/cm/container_manager_linux.go index ba3471d90..2cfcde38f 100644 --- a/src/cm/container_manager_linux.go +++ b/src/cm/container_manager_linux.go @@ -73,7 +73,6 @@ type containerManager struct { } func (m *containerManager) Start() error { - // TODO: check if the required cgroups are mounted. if len(m.cgroupsName) != 0 { manager, err := createCgroupManager(m.cgroupsName) if err != nil { diff --git a/src/core/docker_service.go b/src/core/docker_service.go index c0940b65c..a01434e3b 100644 --- a/src/core/docker_service.go +++ b/src/core/docker_service.go @@ -65,8 +65,6 @@ const ( // Internal docker labels used to identify whether a container is a sandbox // or a regular container. - // TODO: This is not backward compatible with older containers. We will - // need to add filtering based on names. containerTypeLabelKey = "io.kubernetes.docker.type" containerTypeLabelSandbox = "podsandbox" containerTypeLabelContainer = "container" @@ -321,8 +319,6 @@ type dockerService struct { cleanupInfosLock sync.RWMutex } -// TODO: handle context. - // Version returns the runtime name, runtime version and runtime API version func (ds *dockerService) Version(_ context.Context, r *runtimeapi.VersionRequest) (*runtimeapi.VersionResponse, error) { v, err := ds.getDockerVersion() diff --git a/src/pkg/app/config/types.go b/src/pkg/app/config/types.go index c7626dde3..b2644cbae 100644 --- a/src/pkg/app/config/types.go +++ b/src/pkg/app/config/types.go @@ -47,7 +47,7 @@ type ContainerRuntimeOptions struct { // the image pulling will be cancelled. Defaults to 1m0s. // +optional ImagePullProgressDeadline metav1.Duration - // runtimeRequestTimeout is the timeout for all runtime requests except long running + // runtimeRequestTimeout is the timeout for all runtime requests except long-running // requests - pull, logs, exec and attach. RuntimeRequestTimeout metav1.Duration // streamingConnectionIdleTimeout is the maximum time a streaming connection diff --git a/src/pkg/app/options/container_runtime.go b/src/pkg/app/options/container_runtime.go index 94c858eca..a78cd72ae 100644 --- a/src/pkg/app/options/container_runtime.go +++ b/src/pkg/app/options/container_runtime.go @@ -25,7 +25,6 @@ import ( ) const ( - // When these values are updated, also update test/e2e/framework/util.go defaultPodSandboxImageName = "k8s.gcr.io/pause" defaultPodSandboxImageVersion = "3.1" ) diff --git a/src/pkg/app/options/globalflags.go b/src/pkg/app/options/globalflags.go index 864d313d6..2502d0f36 100644 --- a/src/pkg/app/options/globalflags.go +++ b/src/pkg/app/options/globalflags.go @@ -30,7 +30,7 @@ import ( // AddGlobalFlags explicitly registers flags that libraries (glog, etc.) register // against the global flagsets from "flag" and "github.com/spf13/pflag". -// We do this in order to prevent unwanted flags from leaking into the cri-dockerd's flagset. +// We do this in order to prevent unwanted flags from leaking into cri-dockerd's flagset. func AddGlobalFlags(fs *pflag.FlagSet) { addGlogFlags(fs) logs.AddFlags(fs) diff --git a/src/pkg/app/options/options.go b/src/pkg/app/options/options.go index 55fbbc1b5..12fa51e7a 100644 --- a/src/pkg/app/options/options.go +++ b/src/pkg/app/options/options.go @@ -25,7 +25,7 @@ import ( "github.com/spf13/pflag" ) -// DockerCRIFlags contains configuration flags for the cri-dockerd. +// DockerCRIFlags contains configuration flags for cri-dockerd type DockerCRIFlags struct { // Container-runtime-specific options. config.ContainerRuntimeOptions @@ -66,8 +66,8 @@ func (s *DockerCRIServer) AddFlags(fs *pflag.FlagSet) { func (f *DockerCRIFlags) AddFlags(mainfs *pflag.FlagSet) { fs := pflag.NewFlagSet("", pflag.ExitOnError) defer func() { - // Unhide deprecated flags. We want deprecated flags to show in cri-dockerd's help. - // We have some hidden flags, but we might as well unhide these when they are deprecated, + // Un-hide deprecated flags. We want deprecated flags to show in cri-dockerd's help. + // We have some hidden flags, but we may as well un-hide these when they are deprecated, // as silently deprecating and removing (even hidden) things is unkind to people who use them. fs.VisitAll(func(f *pflag.Flag) { if len(f.Deprecated) > 0 { diff --git a/src/pkg/app/server.go b/src/pkg/app/server.go index 6117dd13a..37467b678 100644 --- a/src/pkg/app/server.go +++ b/src/pkg/app/server.go @@ -45,10 +45,10 @@ func NewDockerCRICommand(stopCh <-chan struct{}) *cobra.Command { cmd := &cobra.Command{ Use: componentDockerCRI, - Long: `CRI that connects to Docker Daemon`, - // The cri-dockerd has special flag parsing requirements to enforce flag precedence rules, + Long: `CRI that connects to the Docker Daemon`, + // cri-dockerd has special flag parsing requirements to enforce flag precedence rules, // so we do all our parsing manually in Run, below. - // DisableFlagParsing=true provides the full set of flags passed to the cri-dockerd in the + // DisableFlagParsing=true provides the full set of flags passed to cri-dockerd in the // `args` arg to Run, without Cobra's interference. DisableFlagParsing: true, Run: func(cmd *cobra.Command, args []string) { @@ -62,13 +62,13 @@ func NewDockerCRICommand(stopCh <-chan struct{}) *cobra.Command { cmds := cleanFlagSet.Args() if len(cmds) > 0 { cmd.Usage() - klog.Fatalf("unknown command: %s", cmds[0]) + klog.Fatalf("Unknown command: %s", cmds[0]) } // short-circuit on help help, err := cleanFlagSet.GetBool("help") if err != nil { - klog.Fatal(`"help" flag is non-bool, programmer error, please correct`) + klog.Fatal(`"help" flag is non-bool`) } if help { cmd.Help() @@ -93,8 +93,8 @@ func NewDockerCRICommand(stopCh <-chan struct{}) *cobra.Command { // keep cleanFlagSet separate, so Cobra doesn't pollute it with the global flags kubeletFlags.AddFlags(cleanFlagSet) options.AddGlobalFlags(cleanFlagSet) - cleanFlagSet.BoolP("help", "h", false, fmt.Sprintf("help for %s", cmd.Name())) - cleanFlagSet.Bool("version", false, "prints the version of cri-dockerd") + cleanFlagSet.BoolP("help", "h", false, fmt.Sprintf("Help for %s", cmd.Name())) + cleanFlagSet.Bool("version", false, "Prints the version of cri-dockerd") // ugly, but necessary, because Cobra's default UsageFunc and HelpFunc pollute the flagset with global flags const usageFmt = "Usage:\n %s\n\nFlags:\n%s" @@ -157,7 +157,7 @@ func RunCriDockerd(f *options.DockerCRIFlags, stopCh <-chan struct{}) error { return err } - klog.V(2).Infof("Starting the GRPC server for the docker CRI shim.") + klog.V(2).Infof("Starting the GRPC server for the Docker CRI interface.") server := dockerremote.NewDockerServer(f.RemoteRuntimeEndpoint, ds) if err := server.Start(); err != nil { return err diff --git a/src/version/version.go b/src/version/version.go index 0cf64e9d7..4eafeed93 100644 --- a/src/version/version.go +++ b/src/version/version.go @@ -2,7 +2,7 @@ package version var ( // Version of the product - Version = "0.1.0" + Version = "0.2.0" // PreRelease is set during the build PreRelease = "" // GitCommit is set during the build