Skip to content

Commit

Permalink
go.mod: github.com/containerd/containerd/v2 v2.0.0-rc.0
Browse files Browse the repository at this point in the history
- github.com/containerd/containerd/{containers,images,...} -> github.com/containerd/containerd/v2/core/{containers,images,...}
- github.com/containerd/containerd/{errdefs,logs,platforms} -> github.com/containerd/{errdefs,logs,platforms}
- github.com/containerd/typeurl -> github.com/containerd/typeurl/v2
- github.com/urfave/cli -> github.com/urfave/cli/v2 (See containerd/containerd PR 9809)
- github.com/gogo/protobuf -> github.com/containerd/containerd/v2/protobuf

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
  • Loading branch information
AkihiroSuda committed Mar 27, 2024
1 parent a80d9b8 commit c6c0382
Show file tree
Hide file tree
Showing 2,056 changed files with 221,761 additions and 163,728 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ DESTDIR ?= /usr/local

VERSION=$(shell git describe --match 'v[0-9]*' --dirty='.m' --always)

CTR_LDFLAGS=-ldflags '-X github.com/containerd/containerd/version.Version=$(VERSION)'
CTR_LDFLAGS=-ldflags '-X github.com/containerd/containerd/v2/version.Version=$(VERSION)'
COMMANDS=ctd-decoder ctr-enc
RELEASE_COMMANDS=ctd-decoder

Expand Down
14 changes: 7 additions & 7 deletions cmd/ctd-decoder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import (

"github.com/containerd/imgcrypt"
"github.com/containerd/imgcrypt/images/encryption"
"github.com/containerd/typeurl"
"github.com/containerd/typeurl/v2"

"github.com/gogo/protobuf/proto"
"github.com/gogo/protobuf/types"
"github.com/urfave/cli"
"github.com/containerd/containerd/v2/protobuf/proto"
"github.com/containerd/containerd/v2/protobuf/types"
"github.com/urfave/cli/v2"
)

var (
Expand All @@ -40,7 +40,7 @@ func main() {
app.Usage = Usage
app.Action = run
app.Flags = []cli.Flag{
cli.StringFlag{
&cli.StringFlag{
Name: "decryption-keys-path",
Usage: "Path to load decryption keys from. (optional)",
},
Expand Down Expand Up @@ -69,8 +69,8 @@ func decrypt(ctx *cli.Context) error {
decCc := &payload.DecryptConfig

// TODO: If decryption key path is set, get additional keys to augment payload keys
if ctx.GlobalIsSet("decryption-keys-path") {
keyPathCc, err := getDecryptionKeys(ctx.GlobalString("decryption-keys-path"))
if ctx.IsSet("decryption-keys-path") {
keyPathCc, err := getDecryptionKeys(ctx.String("decryption-keys-path"))
if err != nil {
return fmt.Errorf("unable to get decryption keys in provided key path: %w", err)
}
Expand Down
62 changes: 31 additions & 31 deletions cmd/ctr/app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,29 @@ import (
"fmt"
"io"

"github.com/containerd/containerd/cmd/ctr/commands/content"
"github.com/containerd/containerd/cmd/ctr/commands/events"
"github.com/containerd/containerd/cmd/ctr/commands/install"
"github.com/containerd/containerd/cmd/ctr/commands/leases"
namespacesCmd "github.com/containerd/containerd/cmd/ctr/commands/namespaces"
ociCmd "github.com/containerd/containerd/cmd/ctr/commands/oci"
"github.com/containerd/containerd/cmd/ctr/commands/plugins"
"github.com/containerd/containerd/cmd/ctr/commands/pprof"
"github.com/containerd/containerd/cmd/ctr/commands/snapshots"
"github.com/containerd/containerd/cmd/ctr/commands/tasks"
versionCmd "github.com/containerd/containerd/cmd/ctr/commands/version"
"github.com/containerd/containerd/defaults"
"github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/version"
"github.com/containerd/containerd/v2/cmd/ctr/commands/content"
"github.com/containerd/containerd/v2/cmd/ctr/commands/events"
"github.com/containerd/containerd/v2/cmd/ctr/commands/install"
"github.com/containerd/containerd/v2/cmd/ctr/commands/leases"
namespacesCmd "github.com/containerd/containerd/v2/cmd/ctr/commands/namespaces"
ociCmd "github.com/containerd/containerd/v2/cmd/ctr/commands/oci"
"github.com/containerd/containerd/v2/cmd/ctr/commands/plugins"
"github.com/containerd/containerd/v2/cmd/ctr/commands/pprof"
"github.com/containerd/containerd/v2/cmd/ctr/commands/snapshots"
"github.com/containerd/containerd/v2/cmd/ctr/commands/tasks"
versionCmd "github.com/containerd/containerd/v2/cmd/ctr/commands/version"
"github.com/containerd/containerd/v2/defaults"
"github.com/containerd/containerd/v2/pkg/namespaces"
"github.com/containerd/containerd/v2/version"
"github.com/containerd/imgcrypt/cmd/ctr/commands/containers"
"github.com/containerd/imgcrypt/cmd/ctr/commands/images"
"github.com/containerd/imgcrypt/cmd/ctr/commands/run"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
"github.com/urfave/cli/v2"
"google.golang.org/grpc/grpclog"
)

var extraCmds = []cli.Command{}
var extraCmds = []*cli.Command{}

func init() {
// Discard grpc logs so that they don't mess with our stdio
Expand Down Expand Up @@ -74,32 +74,32 @@ containerd CLI
`
app.EnableBashCompletion = true
app.Flags = []cli.Flag{
cli.BoolFlag{
&cli.BoolFlag{
Name: "debug",
Usage: "enable debug output in logs",
},
cli.StringFlag{
Name: "address, a",
Usage: "address for containerd's GRPC server",
Value: defaults.DefaultAddress,
EnvVar: "CONTAINERD_ADDRESS",
&cli.StringFlag{
Name: "address, a",
Usage: "address for containerd's GRPC server",
Value: defaults.DefaultAddress,
EnvVars: []string{"CONTAINERD_ADDRESS"},
},
cli.DurationFlag{
&cli.DurationFlag{
Name: "timeout",
Usage: "total timeout for ctr commands",
},
cli.DurationFlag{
&cli.DurationFlag{
Name: "connect-timeout",
Usage: "timeout for connecting to containerd",
},
cli.StringFlag{
Name: "namespace, n",
Usage: "namespace to use with commands",
Value: namespaces.Default,
EnvVar: namespaces.NamespaceEnvVar,
&cli.StringFlag{
Name: "namespace, n",
Usage: "namespace to use with commands",
Value: namespaces.Default,
EnvVars: []string{namespaces.NamespaceEnvVar},
},
}
app.Commands = append([]cli.Command{
app.Commands = append([]*cli.Command{
plugins.Command,
versionCmd.Command,
containers.Command,
Expand All @@ -116,7 +116,7 @@ containerd CLI
ociCmd.Command,
}, extraCmds...)
app.Before = func(context *cli.Context) error {
if context.GlobalBool("debug") {
if context.Bool("debug") {
logrus.SetLevel(logrus.DebugLevel)
}
return nil
Expand Down
2 changes: 1 addition & 1 deletion cmd/ctr/app/main_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package app

import "github.com/containerd/containerd/cmd/ctr/commands/shim"
import "github.com/containerd/containerd/v2/cmd/ctr/commands/shim"

func init() {
extraCmds = append(extraCmds, shim.Command)
Expand Down

0 comments on commit c6c0382

Please sign in to comment.