Skip to content

Commit

Permalink
Add support for containerd 1.5
Browse files Browse the repository at this point in the history
"cri.runtimeoptions.v1" moved to "runtimeoptions.v1" and containerd
configuration format version 2 is required.

Updates #6449

PiperOrigin-RevId: 404671168
  • Loading branch information
fvoznika authored and gvisor-bot committed Oct 22, 2021
1 parent 14f4113 commit b3d3c07
Show file tree
Hide file tree
Showing 16 changed files with 697 additions and 118 deletions.
3 changes: 3 additions & 0 deletions .buildkite/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ steps:
- <<: *common
label: ":docker: Containerd 1.4.3 tests"
command: make containerd-test-1.4.3
- <<: *common
label: ":docker: Containerd 1.5.4 tests"
command: make containerd-test-1.5.4

# Check the website builds.
- <<: *common
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ containerd-test-%: load-basic_alpine load-basic_python load-basic_busybox load-b
containerd-tests: ## Runs all supported containerd version tests.
containerd-tests: containerd-test-1.3.9
containerd-tests: containerd-test-1.4.3
containerd-tests: containerd-test-1.5.4

##
## Benchmarks.
Expand Down
1 change: 1 addition & 0 deletions nogo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ global:
exclude:
# Generated: exempt all.
- pkg/shim/runtimeoptions/runtimeoptions_cri.go
- pkg/shim/runtimeoptions/v14/runtimeoptions_cri.go
analyzers:
asmdecl:
external: # Enabled.
Expand Down
1 change: 1 addition & 0 deletions pkg/shim/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ go_library(
"//pkg/shim/proc",
"//pkg/shim/runsc",
"//pkg/shim/runtimeoptions",
"//pkg/shim/runtimeoptions/v14",
"//pkg/shim/utils",
"//runsc/specutils",
"@com_github_burntsushi_toml//:go_default_library",
Expand Down
10 changes: 2 additions & 8 deletions pkg/shim/runtimeoptions/runtimeoptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package runtimeoptions contains the runtimeoptions proto.
// Package runtimeoptions contains the runtimeoptions proto for containerd 1.5
// and above.
package runtimeoptions

import proto "github.com/gogo/protobuf/proto"

func init() {
// TODO(gvisor.dev/issue/6449): Upgrade runtimeoptions.proto after upgrading to containerd 1.5
proto.RegisterType((*Options)(nil), "runtimeoptions.v1.Options")
}
6 changes: 5 additions & 1 deletion pkg/shim/runtimeoptions/runtimeoptions.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@

syntax = "proto3";

package cri.runtimeoptions.v1;
package runtimeoptions.v1;

// This is a version of the runtimeoptions CRI API that is vendored.
// Source: cri/pkg/api/runtimeoptions/v1/api.proto
//
// Importing the full CRI package is a nightmare.
message Options {
// TypeUrl specifies the type of the content inside the config file.
string type_url = 1;
// ConfigPath specifies the filesystem location of the config file
// used by the runtime.
string config_path = 2;
}
Loading

0 comments on commit b3d3c07

Please sign in to comment.