Merge pull request #938 from Random-Liu/update-kubernetes-1.12
Update kubernetes to v1.12.0.
This commit is contained in:
commit
e4f33828c3
@ -36,7 +36,7 @@ func TestAdditionalGids(t *testing.T) {
|
||||
t.Log("Create a sandbox with log directory")
|
||||
sbConfig := PodSandboxConfig("sandbox", "additional-gids",
|
||||
WithPodLogDirectory(testPodLogDir))
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig)
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig, *runtimeHandler)
|
||||
require.NoError(t, err)
|
||||
defer func() {
|
||||
assert.NoError(t, runtimeService.StopPodSandbox(sb))
|
||||
|
@ -39,7 +39,7 @@ func TestLongContainerLog(t *testing.T) {
|
||||
sbConfig := PodSandboxConfig("sandbox", "long-container-log",
|
||||
WithPodLogDirectory(testPodLogDir),
|
||||
)
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig)
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig, *runtimeHandler)
|
||||
require.NoError(t, err)
|
||||
defer func() {
|
||||
assert.NoError(t, runtimeService.StopPodSandbox(sb))
|
||||
|
@ -31,7 +31,7 @@ import (
|
||||
func TestContainerStats(t *testing.T) {
|
||||
t.Logf("Create a pod config and run sandbox container")
|
||||
sbConfig := PodSandboxConfig("sandbox1", "stats")
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig)
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig, *runtimeHandler)
|
||||
require.NoError(t, err)
|
||||
defer func() {
|
||||
assert.NoError(t, runtimeService.StopPodSandbox(sb))
|
||||
@ -76,7 +76,7 @@ func TestContainerStats(t *testing.T) {
|
||||
func TestContainerListStats(t *testing.T) {
|
||||
t.Logf("Create a pod config and run sandbox container")
|
||||
sbConfig := PodSandboxConfig("running-pod", "statsls")
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig)
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig, *runtimeHandler)
|
||||
require.NoError(t, err)
|
||||
defer func() {
|
||||
assert.NoError(t, runtimeService.StopPodSandbox(sb))
|
||||
@ -131,7 +131,7 @@ func TestContainerListStats(t *testing.T) {
|
||||
func TestContainerListStatsWithIdFilter(t *testing.T) {
|
||||
t.Logf("Create a pod config and run sandbox container")
|
||||
sbConfig := PodSandboxConfig("running-pod", "statsls")
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig)
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig, *runtimeHandler)
|
||||
require.NoError(t, err)
|
||||
defer func() {
|
||||
assert.NoError(t, runtimeService.StopPodSandbox(sb))
|
||||
@ -191,7 +191,7 @@ func TestContainerListStatsWithIdFilter(t *testing.T) {
|
||||
func TestContainerListStatsWithSandboxIdFilter(t *testing.T) {
|
||||
t.Logf("Create a pod config and run sandbox container")
|
||||
sbConfig := PodSandboxConfig("running-pod", "statsls")
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig)
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig, *runtimeHandler)
|
||||
require.NoError(t, err)
|
||||
defer func() {
|
||||
assert.NoError(t, runtimeService.StopPodSandbox(sb))
|
||||
@ -247,7 +247,7 @@ func TestContainerListStatsWithSandboxIdFilter(t *testing.T) {
|
||||
func TestContainerListStatsWithIdSandboxIdFilter(t *testing.T) {
|
||||
t.Logf("Create a pod config and run sandbox container")
|
||||
sbConfig := PodSandboxConfig("running-pod", "statsls")
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig)
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig, *runtimeHandler)
|
||||
require.NoError(t, err)
|
||||
defer func() {
|
||||
assert.NoError(t, runtimeService.StopPodSandbox(sb))
|
||||
|
@ -39,7 +39,7 @@ func checkMemoryLimit(t *testing.T, spec *runtimespec.Spec, memLimit int64) {
|
||||
func TestUpdateContainerResources(t *testing.T) {
|
||||
t.Log("Create a sandbox")
|
||||
sbConfig := PodSandboxConfig("sandbox", "update-container-resources")
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig)
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig, *runtimeHandler)
|
||||
require.NoError(t, err)
|
||||
defer func() {
|
||||
assert.NoError(t, runtimeService.StopPodSandbox(sb))
|
||||
|
@ -121,7 +121,7 @@ func TestContainerdImage(t *testing.T) {
|
||||
|
||||
t.Logf("should be able to start container with the image")
|
||||
sbConfig := PodSandboxConfig("sandbox", "containerd-image")
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig)
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig, *runtimeHandler)
|
||||
require.NoError(t, err)
|
||||
defer func() {
|
||||
assert.NoError(t, runtimeService.StopPodSandbox(sb))
|
||||
|
@ -26,7 +26,7 @@ import (
|
||||
func TestDuplicateName(t *testing.T) {
|
||||
t.Logf("Create a sandbox")
|
||||
sbConfig := PodSandboxConfig("sandbox", "duplicate-name")
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig)
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig, *runtimeHandler)
|
||||
require.NoError(t, err)
|
||||
defer func() {
|
||||
assert.NoError(t, runtimeService.StopPodSandbox(sb))
|
||||
@ -34,7 +34,7 @@ func TestDuplicateName(t *testing.T) {
|
||||
}()
|
||||
|
||||
t.Logf("Create the sandbox again should fail")
|
||||
_, err = runtimeService.RunPodSandbox(sbConfig)
|
||||
_, err = runtimeService.RunPodSandbox(sbConfig, *runtimeHandler)
|
||||
require.Error(t, err)
|
||||
|
||||
t.Logf("Create a container")
|
||||
|
@ -70,7 +70,7 @@ func TestImageLoad(t *testing.T) {
|
||||
|
||||
t.Logf("create a container with the loaded image")
|
||||
sbConfig := PodSandboxConfig("sandbox", Randomize("image-load"))
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig)
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig, *runtimeHandler)
|
||||
require.NoError(t, err)
|
||||
defer func() {
|
||||
assert.NoError(t, runtimeService.StopPodSandbox(sb))
|
||||
|
@ -37,7 +37,7 @@ func TestImageFSInfo(t *testing.T) {
|
||||
}()
|
||||
t.Logf("Create a sandbox to make sure there is an active snapshot")
|
||||
config := PodSandboxConfig("running-pod", "imagefs")
|
||||
sb, err := runtimeService.RunPodSandbox(config)
|
||||
sb, err := runtimeService.RunPodSandbox(config, *runtimeHandler)
|
||||
require.NoError(t, err)
|
||||
defer func() {
|
||||
assert.NoError(t, runtimeService.StopPodSandbox(sb))
|
||||
|
@ -63,7 +63,7 @@ func TestPodHostnameEnv(t *testing.T) {
|
||||
opts := append(test.opts, WithPodLogDirectory(testPodLogDir))
|
||||
t.Log("Create a sandbox with hostname")
|
||||
sbConfig := PodSandboxConfig("sandbox", "hostname-env", opts...)
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig)
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig, *runtimeHandler)
|
||||
require.NoError(t, err)
|
||||
defer func() {
|
||||
assert.NoError(t, runtimeService.StopPodSandbox(sb))
|
||||
|
@ -91,7 +91,7 @@ func TestContainerdRestart(t *testing.T) {
|
||||
for i := range sandboxes {
|
||||
s := &sandboxes[i]
|
||||
sbCfg := PodSandboxConfig(s.name, sandboxNS)
|
||||
sid, err := runtimeService.RunPodSandbox(sbCfg)
|
||||
sid, err := runtimeService.RunPodSandbox(sbCfg, *runtimeHandler)
|
||||
require.NoError(t, err)
|
||||
defer func() {
|
||||
// Make sure the sandbox is cleaned up in any case.
|
||||
|
@ -31,7 +31,7 @@ func TestSandboxCleanRemove(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
t.Logf("Create a sandbox")
|
||||
sbConfig := PodSandboxConfig("sandbox", "clean-remove")
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig)
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig, *runtimeHandler)
|
||||
require.NoError(t, err)
|
||||
defer func() {
|
||||
// Make sure the sandbox is cleaned up in any case.
|
||||
|
@ -58,6 +58,7 @@ var (
|
||||
|
||||
var criEndpoint = flag.String("cri-endpoint", "unix:///run/containerd/containerd.sock", "The endpoint of cri plugin.")
|
||||
var criRoot = flag.String("cri-root", "/var/lib/containerd/io.containerd.grpc.v1.cri", "The root directory of cri plugin.")
|
||||
var runtimeHandler = flag.String("runtime-handler", "", "The runtime handler to use in the test.")
|
||||
|
||||
func init() {
|
||||
flag.Parse()
|
||||
|
@ -55,7 +55,7 @@ func TestTruncIndex(t *testing.T) {
|
||||
|
||||
t.Logf("Create a sandbox")
|
||||
sbConfig := PodSandboxConfig("sandbox", "truncindex")
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig)
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig, *runtimeHandler)
|
||||
require.NoError(t, err)
|
||||
sbTruncIndex := genTruncIndex(sb)
|
||||
var hasStoppedSandbox bool
|
||||
|
@ -35,7 +35,7 @@ func TestVolumeCopyUp(t *testing.T) {
|
||||
|
||||
t.Logf("Create a sandbox")
|
||||
sbConfig := PodSandboxConfig("sandbox", "volume-copy-up")
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig)
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig, *runtimeHandler)
|
||||
require.NoError(t, err)
|
||||
defer func() {
|
||||
assert.NoError(t, runtimeService.StopPodSandbox(sb))
|
||||
@ -97,7 +97,7 @@ func TestVolumeOwnership(t *testing.T) {
|
||||
|
||||
t.Logf("Create a sandbox")
|
||||
sbConfig := PodSandboxConfig("sandbox", "volume-ownership")
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig)
|
||||
sb, err := runtimeService.RunPodSandbox(sbConfig, *runtimeHandler)
|
||||
require.NoError(t, err)
|
||||
defer func() {
|
||||
assert.NoError(t, runtimeService.StopPodSandbox(sb))
|
||||
|
12
vendor.conf
12
vendor.conf
@ -70,9 +70,9 @@ google.golang.org/genproto d80a6e20e776b0b17a324d0ba1ab50a39c8e8944
|
||||
google.golang.org/grpc v1.12.0
|
||||
gopkg.in/inf.v0 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4
|
||||
gopkg.in/yaml.v2 53feefa2559fb8dfa8d81baad31be332c97d6c77
|
||||
k8s.io/api 012f271b5d41baad56190c5f1ae19bff16df0fd8
|
||||
k8s.io/apimachinery 6429050ef506887d121f3e7306e894f8900d8a63
|
||||
k8s.io/apiserver e9312c15296b6c2c923ebd5031ff5d1d5fd022d7
|
||||
k8s.io/client-go 37c3c02ec96533daec0dbda1f39a6b1d68505c79
|
||||
k8s.io/kubernetes v1.12.0-beta.1
|
||||
k8s.io/utils 982821ea41da7e7c15f3d3738921eb2e7e241ccd
|
||||
k8s.io/api kubernetes-1.12.0
|
||||
k8s.io/apimachinery kubernetes-1.12.0
|
||||
k8s.io/apiserver kubernetes-1.12.0
|
||||
k8s.io/client-go kubernetes-1.12.0
|
||||
k8s.io/kubernetes v1.12.0
|
||||
k8s.io/utils cd34563cd63c2bd7c6fe88a73c4dcf34ed8a67cb
|
||||
|
1621
vendor/k8s.io/api/core/v1/generated.pb.go
generated
vendored
1621
vendor/k8s.io/api/core/v1/generated.pb.go
generated
vendored
File diff suppressed because it is too large
Load Diff
5
vendor/k8s.io/api/core/v1/generated.proto
generated
vendored
5
vendor/k8s.io/api/core/v1/generated.proto
generated
vendored
@ -4503,7 +4503,10 @@ message TopologySelectorTerm {
|
||||
// TypedLocalObjectReference contains enough information to let you locate the
|
||||
// typed referenced object inside the same namespace.
|
||||
message TypedLocalObjectReference {
|
||||
// APIGroup is the group for the resource being referenced
|
||||
// APIGroup is the group for the resource being referenced.
|
||||
// If APIGroup is not specified, the specified Kind must be in the core API group.
|
||||
// For any other third-party types, APIGroup is required.
|
||||
// +optional
|
||||
optional string apiGroup = 1;
|
||||
|
||||
// Kind is the type of resource being referenced
|
||||
|
7
vendor/k8s.io/api/core/v1/types.go
generated
vendored
7
vendor/k8s.io/api/core/v1/types.go
generated
vendored
@ -4495,8 +4495,11 @@ type LocalObjectReference struct {
|
||||
// TypedLocalObjectReference contains enough information to let you locate the
|
||||
// typed referenced object inside the same namespace.
|
||||
type TypedLocalObjectReference struct {
|
||||
// APIGroup is the group for the resource being referenced
|
||||
APIGroup string `json:"apiGroup" protobuf:"bytes,1,opt,name=apiGroup"`
|
||||
// APIGroup is the group for the resource being referenced.
|
||||
// If APIGroup is not specified, the specified Kind must be in the core API group.
|
||||
// For any other third-party types, APIGroup is required.
|
||||
// +optional
|
||||
APIGroup *string `json:"apiGroup" protobuf:"bytes,1,opt,name=apiGroup"`
|
||||
// Kind is the type of resource being referenced
|
||||
Kind string `json:"kind" protobuf:"bytes,2,opt,name=kind"`
|
||||
// Name is the name of resource being referenced
|
||||
|
2
vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go
generated
vendored
2
vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go
generated
vendored
@ -2211,7 +2211,7 @@ func (TopologySelectorTerm) SwaggerDoc() map[string]string {
|
||||
|
||||
var map_TypedLocalObjectReference = map[string]string{
|
||||
"": "TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.",
|
||||
"apiGroup": "APIGroup is the group for the resource being referenced",
|
||||
"apiGroup": "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.",
|
||||
"kind": "Kind is the type of resource being referenced",
|
||||
"name": "Name is the name of resource being referenced",
|
||||
}
|
||||
|
7
vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go
generated
vendored
7
vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go
generated
vendored
@ -2687,7 +2687,7 @@ func (in *PersistentVolumeClaimSpec) DeepCopyInto(out *PersistentVolumeClaimSpec
|
||||
if in.DataSource != nil {
|
||||
in, out := &in.DataSource, &out.DataSource
|
||||
*out = new(TypedLocalObjectReference)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
@ -5090,6 +5090,11 @@ func (in *TopologySelectorTerm) DeepCopy() *TopologySelectorTerm {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *TypedLocalObjectReference) DeepCopyInto(out *TypedLocalObjectReference) {
|
||||
*out = *in
|
||||
if in.APIGroup != nil {
|
||||
in, out := &in.APIGroup, &out.APIGroup
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
65
vendor/k8s.io/client-go/rest/request.go
generated
vendored
65
vendor/k8s.io/client-go/rest/request.go
generated
vendored
@ -455,17 +455,9 @@ func (r *Request) URL() *url.URL {
|
||||
|
||||
// finalURLTemplate is similar to URL(), but will make all specific parameter values equal
|
||||
// - instead of name or namespace, "{name}" and "{namespace}" will be used, and all query
|
||||
// parameters will be reset. This creates a copy of the request so as not to change the
|
||||
// underlying object. This means some useful request info (like the types of field
|
||||
// selectors in use) will be lost.
|
||||
// TODO: preserve field selector keys
|
||||
// parameters will be reset. This creates a copy of the url so as not to change the
|
||||
// underlying object.
|
||||
func (r Request) finalURLTemplate() url.URL {
|
||||
if len(r.resourceName) != 0 {
|
||||
r.resourceName = "{name}"
|
||||
}
|
||||
if r.namespaceSet && len(r.namespace) != 0 {
|
||||
r.namespace = "{namespace}"
|
||||
}
|
||||
newParams := url.Values{}
|
||||
v := []string{"{value}"}
|
||||
for k := range r.params {
|
||||
@ -473,6 +465,59 @@ func (r Request) finalURLTemplate() url.URL {
|
||||
}
|
||||
r.params = newParams
|
||||
url := r.URL()
|
||||
segments := strings.Split(r.URL().Path, "/")
|
||||
groupIndex := 0
|
||||
index := 0
|
||||
if r.URL() != nil && r.baseURL != nil && strings.Contains(r.URL().Path, r.baseURL.Path) {
|
||||
groupIndex += len(strings.Split(r.baseURL.Path, "/"))
|
||||
}
|
||||
if groupIndex >= len(segments) {
|
||||
return *url
|
||||
}
|
||||
|
||||
const CoreGroupPrefix = "api"
|
||||
const NamedGroupPrefix = "apis"
|
||||
isCoreGroup := segments[groupIndex] == CoreGroupPrefix
|
||||
isNamedGroup := segments[groupIndex] == NamedGroupPrefix
|
||||
if isCoreGroup {
|
||||
// checking the case of core group with /api/v1/... format
|
||||
index = groupIndex + 2
|
||||
} else if isNamedGroup {
|
||||
// checking the case of named group with /apis/apps/v1/... format
|
||||
index = groupIndex + 3
|
||||
} else {
|
||||
// this should not happen that the only two possibilities are /api... and /apis..., just want to put an
|
||||
// outlet here in case more API groups are added in future if ever possible:
|
||||
// https://kubernetes.io/docs/concepts/overview/kubernetes-api/#api-groups
|
||||
// if a wrong API groups name is encountered, return the {prefix} for url.Path
|
||||
url.Path = "/{prefix}"
|
||||
url.RawQuery = ""
|
||||
return *url
|
||||
}
|
||||
//switch segLength := len(segments) - index; segLength {
|
||||
switch {
|
||||
// case len(segments) - index == 1:
|
||||
// resource (with no name) do nothing
|
||||
case len(segments)-index == 2:
|
||||
// /$RESOURCE/$NAME: replace $NAME with {name}
|
||||
segments[index+1] = "{name}"
|
||||
case len(segments)-index == 3:
|
||||
if segments[index+2] == "finalize" || segments[index+2] == "status" {
|
||||
// /$RESOURCE/$NAME/$SUBRESOURCE: replace $NAME with {name}
|
||||
segments[index+1] = "{name}"
|
||||
} else {
|
||||
// /namespace/$NAMESPACE/$RESOURCE: replace $NAMESPACE with {namespace}
|
||||
segments[index+1] = "{namespace}"
|
||||
}
|
||||
case len(segments)-index >= 4:
|
||||
segments[index+1] = "{namespace}"
|
||||
// /namespace/$NAMESPACE/$RESOURCE/$NAME: replace $NAMESPACE with {namespace}, $NAME with {name}
|
||||
if segments[index+3] != "finalize" && segments[index+3] != "status" {
|
||||
// /$RESOURCE/$NAME/$SUBRESOURCE: replace $NAME with {name}
|
||||
segments[index+3] = "{name}"
|
||||
}
|
||||
}
|
||||
url.Path = path.Join(segments...)
|
||||
return *url
|
||||
}
|
||||
|
||||
|
4
vendor/k8s.io/kubernetes/README.md
generated
vendored
4
vendor/k8s.io/kubernetes/README.md
generated
vendored
@ -1,6 +1,6 @@
|
||||
# Kubernetes
|
||||
|
||||
[![Submit Queue Widget]][Submit Queue] [![GoDoc Widget]][GoDoc] [](https://bestpractices.coreinfrastructure.org/projects/569)
|
||||
[![GoDoc Widget]][GoDoc] [](https://bestpractices.coreinfrastructure.org/projects/569)
|
||||
|
||||
<img src="https://github.com/kubernetes/kubernetes/raw/master/logo/logo.png" width="100">
|
||||
|
||||
@ -79,8 +79,6 @@ That said, if you have questions, reach out to us
|
||||
[interactive tutorial]: https://kubernetes.io/docs/tutorials/kubernetes-basics
|
||||
[kubernetes.io]: https://kubernetes.io
|
||||
[Scalable Microservices with Kubernetes]: https://www.udacity.com/course/scalable-microservices-with-kubernetes--ud615
|
||||
[Submit Queue]: https://submit-queue.k8s.io/#/ci
|
||||
[Submit Queue Widget]: https://submit-queue.k8s.io/health.svg?v=1
|
||||
[troubleshooting guide]: https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/
|
||||
|
||||
[]()
|
||||
|
7
vendor/k8s.io/kubernetes/pkg/apis/core/types.go
generated
vendored
7
vendor/k8s.io/kubernetes/pkg/apis/core/types.go
generated
vendored
@ -3976,8 +3976,11 @@ type LocalObjectReference struct {
|
||||
|
||||
// TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.
|
||||
type TypedLocalObjectReference struct {
|
||||
// APIGroup is the group for the resource being referenced
|
||||
APIGroup string
|
||||
// APIGroup is the group for the resource being referenced.
|
||||
// If APIGroup is not specified, the specified Kind must be in the core API group.
|
||||
// For any other third-party types, APIGroup is required.
|
||||
// +optional
|
||||
APIGroup *string
|
||||
// Kind is the type of resource being referenced
|
||||
Kind string
|
||||
// Name is the name of resource being referenced
|
||||
|
7
vendor/k8s.io/kubernetes/pkg/apis/core/zz_generated.deepcopy.go
generated
vendored
7
vendor/k8s.io/kubernetes/pkg/apis/core/zz_generated.deepcopy.go
generated
vendored
@ -2689,7 +2689,7 @@ func (in *PersistentVolumeClaimSpec) DeepCopyInto(out *PersistentVolumeClaimSpec
|
||||
if in.DataSource != nil {
|
||||
in, out := &in.DataSource, &out.DataSource
|
||||
*out = new(TypedLocalObjectReference)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
@ -5075,6 +5075,11 @@ func (in *TopologySelectorTerm) DeepCopy() *TopologySelectorTerm {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *TypedLocalObjectReference) DeepCopyInto(out *TypedLocalObjectReference) {
|
||||
*out = *in
|
||||
if in.APIGroup != nil {
|
||||
in, out := &in.APIGroup, &out.APIGroup
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
2
vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/services.go
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/services.go
generated
vendored
@ -63,7 +63,7 @@ type ContainerManager interface {
|
||||
type PodSandboxManager interface {
|
||||
// RunPodSandbox creates and starts a pod-level sandbox. Runtimes should ensure
|
||||
// the sandbox is in ready state.
|
||||
RunPodSandbox(config *runtimeapi.PodSandboxConfig) (string, error)
|
||||
RunPodSandbox(config *runtimeapi.PodSandboxConfig, runtimeHandler string) (string, error)
|
||||
// StopPodSandbox stops the sandbox. If there are any running containers in the
|
||||
// sandbox, they should be force terminated.
|
||||
StopPodSandbox(podSandboxID string) error
|
||||
|
6
vendor/k8s.io/kubernetes/pkg/kubelet/remote/remote_image.go
generated
vendored
6
vendor/k8s.io/kubernetes/pkg/kubelet/remote/remote_image.go
generated
vendored
@ -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
|
||||
|
10
vendor/k8s.io/kubernetes/pkg/kubelet/remote/remote_runtime.go
generated
vendored
10
vendor/k8s.io/kubernetes/pkg/kubelet/remote/remote_runtime.go
generated
vendored
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user