Merge pull request #4963 from zhsj/move-runtimeopt

Move runtimeoptions out of cri package
This commit is contained in:
Derek McGowan 2021-01-22 11:43:08 -08:00 committed by GitHub
commit aae24ecbce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 26 deletions

View File

@ -31,7 +31,7 @@ import (
"github.com/containerd/containerd/contrib/nvidia"
"github.com/containerd/containerd/contrib/seccomp"
"github.com/containerd/containerd/oci"
crioptions "github.com/containerd/containerd/pkg/cri/runtimeoptions/v1"
runtimeoptions "github.com/containerd/containerd/pkg/runtimeoptions/v1"
"github.com/containerd/containerd/platforms"
"github.com/containerd/containerd/runtime/v2/runc/options"
"github.com/opencontainers/runtime-spec/specs-go"
@ -316,7 +316,7 @@ func getRuntimeOptions(context *cli.Context) (interface{}, error) {
}
if configPath := context.String("runtime-config-path"); configPath != "" {
return &crioptions.Options{
return &runtimeoptions.Options{
ConfigPath: configPath,
}, nil
}

View File

@ -38,11 +38,11 @@ import (
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
criconfig "github.com/containerd/containerd/pkg/cri/config"
runtimeoptions "github.com/containerd/containerd/pkg/cri/runtimeoptions/v1"
"github.com/containerd/containerd/pkg/cri/store"
containerstore "github.com/containerd/containerd/pkg/cri/store/container"
imagestore "github.com/containerd/containerd/pkg/cri/store/image"
sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox"
runtimeoptions "github.com/containerd/containerd/pkg/runtimeoptions/v1"
)
const (

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/pkg/cri/runtimeoptions/v1/api.proto
// source: github.com/containerd/containerd/pkg/runtimeoptions/v1/api.proto
package cri_runtimeoptions_v1
package runtimeoptions_v1
import (
fmt "fmt"
@ -38,7 +38,7 @@ type Options struct {
func (m *Options) Reset() { *m = Options{} }
func (*Options) ProtoMessage() {}
func (*Options) Descriptor() ([]byte, []int) {
return fileDescriptor_fe2c17d0693aba39, []int{0}
return fileDescriptor_7700dd27e3487aa6, []int{0}
}
func (m *Options) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -82,30 +82,29 @@ func (m *Options) GetConfigPath() string {
}
func init() {
proto.RegisterType((*Options)(nil), "cri.runtimeoptions.v1.Options")
proto.RegisterType((*Options)(nil), "runtimeoptions.v1.Options")
}
func init() {
proto.RegisterFile("github.com/containerd/containerd/pkg/cri/runtimeoptions/v1/api.proto", fileDescriptor_fe2c17d0693aba39)
proto.RegisterFile("github.com/containerd/containerd/pkg/runtimeoptions/v1/api.proto", fileDescriptor_7700dd27e3487aa6)
}
var fileDescriptor_fe2c17d0693aba39 = []byte{
// 226 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x49, 0xcf, 0x2c, 0xc9,
var fileDescriptor_7700dd27e3487aa6 = []byte{
// 214 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x48, 0xcf, 0x2c, 0xc9,
0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
0x4a, 0x41, 0x66, 0x16, 0x64, 0xa7, 0xeb, 0x27, 0x17, 0x65, 0xea, 0x17, 0x95, 0xe6, 0x95, 0x64,
0xe6, 0xa6, 0xe6, 0x17, 0x94, 0x64, 0xe6, 0xe7, 0x15, 0xeb, 0x97, 0x19, 0xea, 0x27, 0x16, 0x64,
0xea, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x89, 0x26, 0x17, 0x65, 0xea, 0xa1, 0x2a, 0xd0, 0x2b,
0x33, 0x94, 0xd2, 0x45, 0x32, 0x3c, 0x3d, 0x3f, 0x3d, 0x5f, 0x1f, 0xac, 0x3a, 0xa9, 0x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0xe6, 0x81, 0x39, 0x60, 0x16, 0xc4, 0x04, 0x25,
0x57, 0x2e, 0x76, 0x7f, 0x88, 0x66, 0x21, 0x49, 0x2e, 0x8e, 0x92, 0xca, 0x82, 0xd4, 0xf8, 0xd2,
0xa2, 0x1c, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x76, 0x10, 0x3f, 0xb4, 0x28, 0x47, 0x48,
0x9e, 0x8b, 0x3b, 0x39, 0x3f, 0x2f, 0x2d, 0x33, 0x3d, 0xbe, 0x20, 0xb1, 0x24, 0x43, 0x82, 0x09,
0x2c, 0xcb, 0x05, 0x11, 0x0a, 0x48, 0x2c, 0xc9, 0x70, 0x4a, 0x3b, 0xf1, 0x50, 0x8e, 0xf1, 0xc6,
0x43, 0x39, 0x86, 0x86, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8,
0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x51, 0x1e, 0xe4, 0x79, 0xd4, 0x1a, 0x55, 0x24,
0xbe, 0xcc, 0x30, 0x89, 0x0d, 0xec, 0x6a, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x91, 0x3c,
0x3e, 0x79, 0x3b, 0x01, 0x00, 0x00,
}
func (m *Options) Marshal() (dAtA []byte, err error) {

View File

@ -1,7 +1,7 @@
// To regenerate api.pb.go run `make protos`
syntax = "proto3";
package cri.runtimeoptions.v1;
package runtimeoptions.v1;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
@ -14,7 +14,7 @@ option (gogoproto.unmarshaler_all) = true;
option (gogoproto.goproto_unrecognized_all) = false;
option go_package = "github.com/containerd/containerd/pkg/cri/runtimeoptions/v1;cri_runtimeoptions_v1";
option go_package = "github.com/containerd/containerd/pkg/runtimeoptions/v1;runtimeoptions_v1";
message Options {
// TypeUrl specifies the type of the content inside the config file.