From d9914c8dbd637258f27ba7c3b0bd44b960280788 Mon Sep 17 00:00:00 2001 From: Lantao Liu Date: Thu, 24 Jan 2019 00:56:33 -0800 Subject: [PATCH] Always fallback to the new runtime options. Signed-off-by: Lantao Liu --- pkg/server/helpers.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/server/helpers.go b/pkg/server/helpers.go index 4b710b948..0727ba177 100644 --- a/pkg/server/helpers.go +++ b/pkg/server/helpers.go @@ -41,6 +41,7 @@ import ( "golang.org/x/net/context" runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" + runtimeoptions "github.com/containerd/cri/pkg/api/runtimeoptions/v1" criconfig "github.com/containerd/cri/pkg/config" "github.com/containerd/cri/pkg/store" imagestore "github.com/containerd/cri/pkg/store/image" @@ -481,8 +482,10 @@ func getRuntimeOptionsType(t string) interface{} { switch t { case runcRuntime: return &runcoptions.Options{} - default: + case linuxRuntime: return &runctypes.RuncOptions{} + default: + return &runtimeoptions.Options{} } }