From d41c23e31df837872a00d8281ed3ef586696fb90 Mon Sep 17 00:00:00 2001 From: Lantao Liu Date: Mon, 21 Aug 2017 22:29:36 +0000 Subject: [PATCH] Update code to make it build Signed-off-by: Lantao Liu --- pkg/server/container_update_resources.go | 30 ++++++++++++++++++++++++ pkg/server/streaming.go | 3 +-- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 pkg/server/container_update_resources.go diff --git a/pkg/server/container_update_resources.go b/pkg/server/container_update_resources.go new file mode 100644 index 000000000..a6d7079d4 --- /dev/null +++ b/pkg/server/container_update_resources.go @@ -0,0 +1,30 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +import ( + "errors" + + "golang.org/x/net/context" + + "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime" +) + +// UpdateContainerResources updates ContainerConfig of the container. +func (c *criContainerdService) UpdateContainerResources(ctx context.Context, r *runtime.UpdateContainerResourcesRequest) (*runtime.UpdateContainerResourcesResponse, error) { + return nil, errors.New("not implemented") +} diff --git a/pkg/server/streaming.go b/pkg/server/streaming.go index cf58cc685..9cdd36ab1 100644 --- a/pkg/server/streaming.go +++ b/pkg/server/streaming.go @@ -28,8 +28,7 @@ import ( "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/tools/remotecommand" "k8s.io/kubernetes/pkg/kubelet/server/streaming" - // TODO(random-liu): k8s.io/utils/exec after bump up kubernetes version. - "k8s.io/kubernetes/pkg/util/exec" + "k8s.io/utils/exec" ) func newStreamServer(c *criContainerdService, addr, port string) (streaming.Server, error) {