Merge pull request #625 from erikwilson/update-cri-tools-v1.14.0-k3s1

Update cri-tools to v1.14.0-k3s1
pull/632/head
Erik Wilson 5 years ago committed by GitHub
commit 09cbfc0e80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -159,8 +159,8 @@ import:
- package: github.com/karrick/godirwalk
version: v1.7.5
- package: github.com/kubernetes-sigs/cri-tools
version: c465773e3ad8c941d1756c0a467d550b04a8f65b
repo: https://github.com/ibuildthecloud/cri-tools.git
version: v1.14.0-k3s1
repo: https://github.com/rancher/cri-tools.git
- package: github.com/lib/pq
version: v1.1.1
- package: github.com/liggitt/tabwriter

@ -90,7 +90,7 @@ github.com/google/go-cmp v0.1.0
go.etcd.io/bbolt v1.3.1-etcd.8
# crictl
github.com/kubernetes-sigs/cri-tools c465773e3ad8c941d1756c0a467d550b04a8f65b https://github.com/ibuildthecloud/cri-tools.git
github.com/kubernetes-sigs/cri-tools v1.14.0-k3s1 https://github.com/rancher/cri-tools.git
# cri dependencies
github.com/containerd/cri v1.2-k3s.2 https://github.com/rancher/cri.git

@ -1,9 +1,9 @@
language: go
sudo: required
dist: trusty
dist: xenial
go:
- 1.11.x
- 1.12.x
os:
- linux
@ -42,15 +42,15 @@ jobs:
os: linux
script:
- make
- hack/install-docker.sh
- hack/install-kubelet.sh
- travis_wait hack/install-docker.sh
- travis_wait hack/install-kubelet.sh
- sudo env PATH=$PATH GOPATH=$GOPATH hack/run-critest.sh
- stage: Test
os: windows
script:
- make windows
- powershell -c "Set-ExecutionPolicy Bypass -Scope CURRENTUSER -Force"
- powershell hack/install-kubelet.ps1
- travis_wait powershell hack/install-kubelet.ps1
# Skip hack/run-critest.sh temporarily.
stages:

@ -23,4 +23,6 @@ Follow either of the two links above to access the appropriate CLA and instructi
### Adding dependencies
If your patch depends on new packages, add that package with [`godep`](https://github.com/tools/godep). Follow the [instructions to add a dependency](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md#godep-and-dependency-management).
If your patch depends on new packages, add that package using the provided [hack/update-vendor.sh](hack/update-vendor.sh) script, which is a wrapper around [vndr](https://github.com/LK4D4/vndr).
To restore package versions with `godep`, refer to the Kubernetes Community docs for [restoring dependencies](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/godep.md#restoring-deps).

@ -23,7 +23,8 @@ Version matrix:
| Kubernetes Version | cri-tools Version | cri-tools branch |
|--------------------|-------------------|------------------|
| 1.13.X | v1.13.0 | master |
| 1.14.X | N/A | master |
| 1.13.X | v1.13.0 | release-1.13 |
| 1.12.X | v1.12.0 | release-1.12 |
| 1.11.X | v1.11.1 | release-1.11 |
| 1.10.X | v1.0.0-beta.2 | release-1.10 |

@ -34,33 +34,94 @@ var bashCompletionTemplate = `_cli_bash_autocomplete() {
complete -F _cli_bash_autocomplete crictl`
func bashCompletion(c *cli.Context) error {
subcommands := []string{}
for _, command := range c.App.Commands {
if command.Hidden {
continue
}
for _, name := range command.Names() {
subcommands = append(subcommands, name)
}
}
for _, flag := range c.App.Flags {
// only includes full flag name.
subcommands = append(subcommands, "--"+strings.Split(flag.GetName(), ",")[0])
}
fmt.Fprintln(c.App.Writer, fmt.Sprintf(bashCompletionTemplate, strings.Join(subcommands, "\n")))
return nil
}
var zshCompletionTemplate = `_cli_zsh_autocomplete() {
local -a cmds
cmds=('%s')
_describe 'commands' cmds
local -a opts
opts=('%s')
_describe 'global options' opts
return
}
compdef _cli_zsh_autocomplete crictl`
func zshCompletion(c *cli.Context) error {
subcommands := []string{}
for _, command := range c.App.Commands {
if command.Hidden {
continue
}
for _, name := range command.Names() {
subcommands = append(subcommands, name+":"+command.Usage)
}
}
opts := []string{}
for _, flag := range c.App.Flags {
// only includes full flag name.
opts = append(opts, "--"+strings.Split(flag.GetName(), ",")[0])
}
fmt.Fprintln(c.App.Writer, fmt.Sprintf(zshCompletionTemplate, strings.Join(subcommands, "' '"), strings.Join(opts, "' '")))
return nil
}
var completionCommand = cli.Command{
Name: "completion",
Usage: "Output bash shell completion code",
Description: `Output bash shell completion code.
Name: "completion",
Usage: "Output shell completion code",
ArgsUsage: "SHELL",
Description: `Output shell completion code for bash or zsh.
Examples:
# Installing bash completion on Linux
source <(crictl completion)
source <(crictl completion bash)
# Installing zsh completion on Linux
source <(crictl completion zsh)
`,
Action: func(c *cli.Context) error {
subcommands := []string{}
for _, command := range c.App.Commands {
if command.Hidden {
continue
}
for _, name := range command.Names() {
subcommands = append(subcommands, name)
}
// select bash by default for backwards compatibility
if c.NArg() == 0 {
return bashCompletion(c)
}
for _, flag := range c.App.Flags {
// only includes full flag name.
subcommands = append(subcommands, "--"+strings.Split(flag.GetName(), ",")[0])
if c.NArg() != 1 {
return cli.ShowSubcommandHelp(c)
}
fmt.Fprintln(c.App.Writer, fmt.Sprintf(bashCompletionTemplate, strings.Join(subcommands, "\n")))
return nil
switch c.Args().First() {
case "bash":
return bashCompletion(c)
case "zsh":
return zshCompletion(c)
default:
return fmt.Errorf("only bash and zsh supported")
}
},
}

@ -209,7 +209,7 @@ var removeContainerCommand = cli.Command{
containerID := context.Args().Get(i)
err := RemoveContainer(runtimeClient, containerID)
if err != nil {
return fmt.Errorf("Removing the container %q failed: %v", containerID, err)
fmt.Printf("Removing the container %q failed: %v\n", containerID, err)
}
}
return nil

@ -78,10 +78,13 @@ var runtimeExecCommand = cli.Command{
cmd: context.Args()[1:],
}
if context.Bool("sync") {
err := ExecSync(runtimeClient, opts)
exitCode, err := ExecSync(runtimeClient, opts)
if err != nil {
return fmt.Errorf("execing command in container synchronously failed: %v", err)
}
if exitCode != 0 {
return cli.NewExitError("non-zero exit code", exitCode)
}
return nil
}
err := Exec(runtimeClient, opts)
@ -94,8 +97,9 @@ var runtimeExecCommand = cli.Command{
}
// ExecSync sends an ExecSyncRequest to the server, and parses
// the returned ExecSyncResponse.
func ExecSync(client pb.RuntimeServiceClient, opts execOptions) error {
// the returned ExecSyncResponse. The function returns the corresponding exit
// code beside an general error.
func ExecSync(client pb.RuntimeServiceClient, opts execOptions) (int, error) {
request := &pb.ExecSyncRequest{
ContainerId: opts.id,
Cmd: opts.cmd,
@ -105,15 +109,11 @@ func ExecSync(client pb.RuntimeServiceClient, opts execOptions) error {
r, err := client.ExecSync(context.Background(), request)
logrus.Debugf("ExecSyncResponse: %v", r)
if err != nil {
return err
return 1, err
}
fmt.Println(string(r.Stdout))
fmt.Println(string(r.Stderr))
if r.ExitCode != 0 {
fmt.Printf("Exit code: %v\n", r.ExitCode)
}
return nil
return int(r.ExitCode), nil
}
// Exec sends an ExecRequest to server, and parses the returned ExecResponse

@ -37,6 +37,10 @@ var runtimeStatusCommand = cli.Command{
Value: "json",
Usage: "Output format, One of: json|yaml",
},
cli.BoolFlag{
Name: "quiet, q",
Usage: "Do not show verbose information",
},
},
Action: func(context *cli.Context) error {
err := Info(context, runtimeClient)
@ -51,7 +55,7 @@ var runtimeStatusCommand = cli.Command{
// Info sends a StatusRequest to the server, and parses the returned StatusResponse.
func Info(cliContext *cli.Context, client pb.RuntimeServiceClient) error {
request := &pb.StatusRequest{Verbose: true}
request := &pb.StatusRequest{Verbose: !cliContext.Bool("quiet")}
logrus.Debugf("StatusRequest: %v", request)
r, err := client.Status(context.Background(), request)
logrus.Debugf("StatusResponse: %v", r)

@ -33,7 +33,7 @@ import (
)
const (
defaultTimeout = 10 * time.Second
defaultTimeout = 2 * time.Second
)
var (

@ -7,22 +7,22 @@ github.com/ghodss/yaml c7ce16629ff4cd059ed96ed06419dd3856fd3577
github.com/gogo/protobuf 342cbe0a04158f6dcb03ca0079991a51a4248c02
github.com/golang/glog 44145f04b68cf362d9c4df2182967c2275eaefed
github.com/golang/protobuf b4deda0973fb4c70b50d226b1af49f3da59f5265
github.com/google/gofuzz 44d81051d367757e1c7c6a5a86423ece9afcf63c
github.com/google/gofuzz 24818f796faf91cd76ec7bddd72458fbced7a6c1
github.com/json-iterator/go ab8a2e0c74be9d3be70b3184d9acc634935ded82
github.com/Microsoft/go-winio v0.4.11
github.com/mitchellh/go-wordwrap ad45545899c7b13c020ea92b2072220eefad42b8
github.com/modern-go/concurrent bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94
github.com/modern-go/reflect2 94122c33edd36123c84d5368cfb2b69df93a0ec8
github.com/onsi/ginkgo 67b9df7f55fe1165fd9ad49aca7754cce01a42b8
github.com/onsi/gomega d59fa0ac68bb5dd932ee8d24eed631cdd519efc3
github.com/onsi/gomega 5533ce8a0da374da682cd53d70ddcc54adf1a710
github.com/opencontainers/go-digest a6d0ee40d4207ea02364bd3b9e8e77b9159ba1eb
github.com/opencontainers/selinux 4a2974bf1ee960774ffd517717f1f45325af0206
github.com/pborman/uuid ca53cad383cad2479bbba7f7a1a05797ec1386e4
github.com/pkg/errors v0.8.0
github.com/sirupsen/logrus 89742aefa4b206dcf400792f3bd35b542998eb3b
github.com/urfave/cli 934abfb2f102315b5794e15ebc7949e4ca253920
golang.org/x/crypto 49796115aa4b964c318aad4f3084fdb41e9aa067
golang.org/x/net 1c05540f6879653db88113bc4a2b70aec4bd491f
golang.org/x/crypto de0752318171da717af4ce24d0a2e8626afaeb11
golang.org/x/net 65e2d4e15006aab9813ff8769e768bbf4bb667a0
golang.org/x/oauth2 a6bd8cefa1811bd24b86f8902872e4e8225f74c4
golang.org/x/sys 95c6576299259db960f6c5b9b69ea52422860fce
golang.org/x/text b19bf474d317b857955b12035d2c5acb57ce8b01
@ -31,10 +31,10 @@ google.golang.org/genproto 09f6ed296fc66555a25fe4ce95173148778dfa85
google.golang.org/grpc v1.13.0
gopkg.in/inf.v0 v0.9.0
gopkg.in/yaml.v2 5420a8b6744d3b0345ab293f6fcba19c978f1183
k8s.io/api d04500c8c3dda9c980b668c57abc2ca61efcf5c4
k8s.io/apimachinery 57dc7e687b5426ecb5df4cabdcdce30fddb74f22
k8s.io/api 3c12c96769cc4f6df2245f283ee74992c94fa4ee
k8s.io/apimachinery c9defaaddf6f05ecb2dd115c1bed600265501daf
k8s.io/client-go v10.0.0
k8s.io/klog 8139d8cb77af419532b33dfa7dd09fbc5f1d344f
k8s.io/kubernetes v1.13.0
k8s.io/utils 66066c83e385e385ccc3c964b44fd7dcd413d0ed
k8s.io/klog 291f19f84ceb3e47785d3b4bda653cfcd58622a1
k8s.io/kubernetes f5ee25e22987e51192b32b0c727458809e1a767c
k8s.io/utils 21c4ce38f2a793ec01e925ddc31216500183b773
sigs.k8s.io/yaml fd68e9863619f6ec2fdd8625fe1f02e7c877e480

Loading…
Cancel
Save