Skip to content

Commit

Permalink
Updated containerd to v1.1.0 and all deps
Browse files Browse the repository at this point in the history
  • Loading branch information
ernoaapa committed May 16, 2018
1 parent 485cc43 commit 2093e6e
Show file tree
Hide file tree
Showing 395 changed files with 13,412 additions and 6,440 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ nfpm:
- deb

dependencies:
- containerd (>= 1.0.3)
- containerd (>= 1.1.0)

files:
"build/etc/systemd/system/eliotd.service": "/etc/systemd/system/eliotd.service"
Expand Down
4 changes: 2 additions & 2 deletions deps/build-containerd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

set -eu

CONTAINERD_VERSION="v1.0.3"
RUNC_DEP_VERSION="1.0.0-rc4+9f9c9623"
CONTAINERD_VERSION="v1.1.0"
RUNC_DEP_VERSION="1.0.0-rc4+a618ab5a"
BUILD_DIR=/tmp/build
ELIOT_SRC_DIR=$(pwd)
TARGET_DIR=${ELIOT_SRC_DIR}/dist
Expand Down
15 changes: 10 additions & 5 deletions pkg/runtime/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ func (c *ContainerdClient) PullImage(namespace, ref string, progress *progress.I
return errors.Wrapf(err, "Error while resolving image [%s] supported platforms", ref)
}

if !platformExist(platforms.Default(), supported) {
if !platformExist(platforms.DefaultSpec(), supported) {
platformNames := []string{}
for _, platform := range supported {
platformNames = append(platformNames, platforms.Format(platform))
Expand All @@ -445,8 +445,8 @@ func (c *ContainerdClient) PullImage(namespace, ref string, progress *progress.I
return nil
}

func platformExist(platform string, supported []imagespecs.Platform) bool {
matcher, _ := platforms.Parse(platform)
func platformExist(platform imagespecs.Platform, supported []imagespecs.Platform) bool {
matcher := platforms.NewMatcher(platform)
for _, platform := range supported {
if matcher.Match(platform) {
return true
Expand Down Expand Up @@ -559,7 +559,10 @@ func (c *ContainerdClient) Exec(namespace, name, id string, args []string, tty b
pspec.Terminal = tty
pspec.Args = args

process, err := task.Exec(ctx, id, pspec, cio.NewIOWithTerminal(io.Stdin, io.Stdout, io.Stderr, tty))
process, err := task.Exec(ctx, id, pspec, cio.NewCreator(
cio.WithStreams(io.Stdin, io.Stdout, io.Stderr),
cio.WithTerminal,
))
if err != nil {
return err
}
Expand Down Expand Up @@ -593,7 +596,9 @@ func (c *ContainerdClient) Attach(namespace, name string, io AttachIO) error {
return errors.Wrapf(err, "Cannot attach to container [%s] in namespace [%s]", name, namespace)
}

task, taskErr := container.Task(ctx, cio.WithAttach(io.Stdin, io.Stdout, io.Stderr))
task, taskErr := container.Task(ctx, cio.NewAttach(
cio.WithStreams(io.Stdin, io.Stdout, io.Stderr),
))
if taskErr != nil {
return taskErr
}
Expand Down
8 changes: 6 additions & 2 deletions pkg/runtime/containerd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@ package runtime
import (
"testing"

"github.com/containerd/containerd/platforms"
imagespecs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/stretchr/testify/assert"
)

func TestPlatformExist(t *testing.T) {
assert.True(t, platformExist("linux/arm64", []imagespecs.Platform{
platform, err := platforms.Parse("linux/arm64")
assert.NoError(t, err)

assert.True(t, platformExist(platform, []imagespecs.Platform{
{OS: "linux", Architecture: "arm64"},
}))

assert.False(t, platformExist("linux/arm64", []imagespecs.Platform{
assert.False(t, platformExist(platform, []imagespecs.Platform{
{OS: "linux", Architecture: "amd64"},
}))
}
25 changes: 13 additions & 12 deletions vendor.conf
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
github.com/pkg/errors v0.8.0
github.com/urfave/cli v1.20.0
github.com/urfave/cli 7bc6a0acffa589f415f88aca16cc1de5ffd66f9c
github.com/stretchr/testify v1.1.4
github.com/davecgh/go-spew v1.1.0
github.com/pmezard/go-difflib v1.0.0
github.com/containerd/containerd v1.0.2+patch-1 https://github.com/ernoaapa/containerd.git
github.com/containerd/containerd v1.1.0
github.com/sirupsen/logrus v1.0.3
golang.org/x/crypto 81e90905daefcd6fd217b62423c0908922eadb30
golang.org/x/sys bb24a47a89eac6c1227fbcb2ae37a8b9ed323366
golang.org/x/crypto 49796115aa4b964c318aad4f3084fdb41e9aa067
golang.org/x/sys 314a259e304ff91bd6985da2a7149bbf91237993 https://github.com/golang/sys
github.com/Microsoft/go-winio v0.4.7
github.com/containerd/fifo fbfb6a11ec671efbe94ad1c12c2e98773f19e1e6
github.com/gogo/protobuf v0.5
github.com/containerd/fifo 3d5202aec260678c48179c56f40e6f38a095738c
github.com/gogo/protobuf v1.0.0
github.com/golang/protobuf 1643683e1b54a9e88ad26d98f81400c8c9d9f4f9
github.com/opencontainers/go-digest v1.0.0-rc1
github.com/opencontainers/image-spec v1.0.1
github.com/opencontainers/runc 9f9c96235cc97674e935002fc3d78361b696a69e
github.com/opencontainers/runc 69663f0bd4b60df09991c08812a60108003fa340
github.com/opencontainers/runtime-spec v1.0.1
golang.org/x/net 66aacef3dd8a676686c7ae3716979581e8b03c47
google.golang.org/grpc v1.7.1
google.golang.org/grpc v1.10.1
google.golang.org/genproto d80a6e20e776b0b17a324d0ba1ab50a39c8e8944
golang.org/x/text 19e51611da83d6be54ddafce4a4af510cb3e9ea4
github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9
golang.org/x/sync 450f422ab23cf9881c94e2db30cac0eb1b7cf80c
github.com/containerd/continuity cf279e6ac893682272b4479d4c67fd3abf878b4e
github.com/containerd/continuity 3e8f2ea4b190484acb976a5b378d373429639a1a
gopkg.in/go-playground/validator.v9 v9.9.4
github.com/go-playground/universal-translator v0.16.0
github.com/go-playground/locales v0.11.2
Expand All @@ -36,10 +36,11 @@ github.com/rs/xid v1.1
github.com/miekg/dns v1.0.4
github.com/cenkalti/backoff v1.1.0
github.com/containerd/typeurl f6943554a7e7e88b3c14aad190bf05932da84788
github.com/docker/docker v17.05.0-ce
k8s.io/kubernetes v1.9.0-alpha.2
github.com/docker/docker 86f080cff0914e9694068ed78d503701667c4c00
k8s.io/kubernetes v1.10.0
github.com/thejerf/suture v2.0.1
github.com/ghodss/yaml v1.0.0
github.com/syndtr/gocapability db04d3cc01c8b54962a58ec7e491717d06cfcc16
github.com/hako/durafmt 987f93c94e473e74aadc826871e61ae6b3360ebb
github.com/c2h5oh/datasize 4eba002a5eaea69cf8d235a388fc6b65ae68d2dd
github.com/c2h5oh/datasize 4eba002a5eaea69cf8d235a388fc6b65ae68d2dd
github.com/gogo/googleapis 08a7655d27152912db7aaf4f983275eaf8d128ef

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2093e6e

Please sign in to comment.