Bumping k8s dependencies to 1.13

This commit is contained in:
Cheng Xing
2018-11-16 14:08:25 -08:00
parent 305407125c
commit b4c0b68ec7
8002 changed files with 884099 additions and 276228 deletions

View File

@@ -11,44 +11,11 @@ go_library(
name = "go_default_library",
srcs = [
"doc.go",
"endpoint.go",
"endpoint_windows.go",
"fake_image_service.go",
"fake_runtime.go",
] + select({
"@io_bazel_rules_go//go/platform:android": [
"endpoint.go",
],
"@io_bazel_rules_go//go/platform:darwin": [
"endpoint.go",
],
"@io_bazel_rules_go//go/platform:dragonfly": [
"endpoint.go",
],
"@io_bazel_rules_go//go/platform:freebsd": [
"endpoint.go",
],
"@io_bazel_rules_go//go/platform:linux": [
"endpoint.go",
],
"@io_bazel_rules_go//go/platform:nacl": [
"endpoint.go",
],
"@io_bazel_rules_go//go/platform:netbsd": [
"endpoint.go",
],
"@io_bazel_rules_go//go/platform:openbsd": [
"endpoint.go",
],
"@io_bazel_rules_go//go/platform:plan9": [
"endpoint.go",
],
"@io_bazel_rules_go//go/platform:solaris": [
"endpoint.go",
],
"@io_bazel_rules_go//go/platform:windows": [
"endpoint_windows.go",
],
"//conditions:default": [],
}),
],
importpath = "k8s.io/kubernetes/pkg/kubelet/remote/fake",
tags = ["automanaged"],
deps = [

View File

@@ -77,7 +77,7 @@ func (f *RemoteRuntime) Version(ctx context.Context, req *kubeapi.VersionRequest
// RunPodSandbox creates and starts a pod-level sandbox. Runtimes must ensure
// the sandbox is in the ready state on success.
func (f *RemoteRuntime) RunPodSandbox(ctx context.Context, req *kubeapi.RunPodSandboxRequest) (*kubeapi.RunPodSandboxResponse, error) {
sandboxID, err := f.RuntimeService.RunPodSandbox(req.Config)
sandboxID, err := f.RuntimeService.RunPodSandbox(req.Config, req.RuntimeHandler)
if err != nil {
return nil, err
}

View File

@@ -17,6 +17,7 @@ limitations under the License.
package remote
import (
"context"
"errors"
"fmt"
"time"
@@ -43,7 +44,10 @@ func NewRemoteImageService(endpoint string, connectionTimeout time.Duration) (in
return nil, err
}
conn, err := grpc.Dial(addr, grpc.WithInsecure(), grpc.WithTimeout(connectionTimeout), grpc.WithDialer(dailer), grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxMsgSize)))
ctx, cancel := context.WithTimeout(context.Background(), connectionTimeout)
defer cancel()
conn, err := grpc.DialContext(ctx, addr, grpc.WithInsecure(), grpc.WithDialer(dailer), grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxMsgSize)))
if err != nil {
glog.Errorf("Connect remote image service %s failed: %v", addr, err)
return nil, err

View File

@@ -45,7 +45,10 @@ func NewRemoteRuntimeService(endpoint string, connectionTimeout time.Duration) (
if err != nil {
return nil, err
}
conn, err := grpc.Dial(addr, grpc.WithInsecure(), grpc.WithTimeout(connectionTimeout), grpc.WithDialer(dailer), grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxMsgSize)))
ctx, cancel := context.WithTimeout(context.Background(), connectionTimeout)
defer cancel()
conn, err := grpc.DialContext(ctx, addr, grpc.WithInsecure(), grpc.WithDialer(dailer), grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxMsgSize)))
if err != nil {
glog.Errorf("Connect remote runtime %s failed: %v", addr, err)
return nil, err
@@ -79,14 +82,15 @@ func (r *RemoteRuntimeService) Version(apiVersion string) (*runtimeapi.VersionRe
// RunPodSandbox creates and starts a pod-level sandbox. Runtimes should ensure
// the sandbox is in ready state.
func (r *RemoteRuntimeService) RunPodSandbox(config *runtimeapi.PodSandboxConfig) (string, error) {
func (r *RemoteRuntimeService) RunPodSandbox(config *runtimeapi.PodSandboxConfig, runtimeHandler string) (string, error) {
// Use 2 times longer timeout for sandbox operation (4 mins by default)
// TODO: Make the pod sandbox timeout configurable.
ctx, cancel := getContextWithTimeout(r.timeout * 2)
defer cancel()
resp, err := r.runtimeClient.RunPodSandbox(ctx, &runtimeapi.RunPodSandboxRequest{
Config: config,
Config: config,
RuntimeHandler: runtimeHandler,
})
if err != nil {
glog.Errorf("RunPodSandbox from runtime service failed: %v", err)

View File

@@ -24,9 +24,9 @@ import (
runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
)
// maxMsgSize use 8MB as the default message size limit.
// maxMsgSize use 16MB as the default message size limit.
// grpc library default is 4MB
const maxMsgSize = 1024 * 1024 * 8
const maxMsgSize = 1024 * 1024 * 16
// getContextWithTimeout returns a context with timeout.
func getContextWithTimeout(timeout time.Duration) (context.Context, context.CancelFunc) {