Bumping k8s dependencies to 1.13
This commit is contained in:
21
vendor/k8s.io/kubernetes/test/e2e/node/BUILD
generated
vendored
21
vendor/k8s.io/kubernetes/test/e2e/node/BUILD
generated
vendored
@@ -4,6 +4,7 @@ go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"apparmor.go",
|
||||
"crictl.go",
|
||||
"events.go",
|
||||
"framework.go",
|
||||
"kubelet.go",
|
||||
@@ -19,22 +20,22 @@ go_library(
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//pkg/kubelet/apis/stats/v1alpha1:go_default_library",
|
||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library",
|
||||
"//staging/src/k8s.io/client-go/kubernetes:go_default_library",
|
||||
"//test/e2e/common:go_default_library",
|
||||
"//test/e2e/framework:go_default_library",
|
||||
"//test/utils:go_default_library",
|
||||
"//test/utils/image:go_default_library",
|
||||
"//vendor/github.com/onsi/ginkgo:go_default_library",
|
||||
"//vendor/github.com/onsi/gomega:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/fields:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/uuid:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
|
||||
"//vendor/k8s.io/client-go/kubernetes:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
13
vendor/k8s.io/kubernetes/test/e2e/node/README.md
generated
vendored
Normal file
13
vendor/k8s.io/kubernetes/test/e2e/node/README.md
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# WARNING: Do not add tests in this directory
|
||||
|
||||
There are two types of end-to-end tests in Kubernetes:
|
||||
* [Cluster end-to-end tests](https://git.k8s.io/community/contributors/devel/e2e-tests.md)
|
||||
* [Node end-to-end
|
||||
tests](https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-node-tests.md)
|
||||
|
||||
Tests located in `${KUBE_ROOT}/test/e2e/common` are shared by both Cluster
|
||||
and Node E2E test jobs. Tests in `${KUBE_ROOT}/test/e2e_node` are exclusively
|
||||
owned by Node E2E. *If you want to add a test, most likely than not, you want
|
||||
to add the test to one of the two directories mentioned above.* If you are
|
||||
unsure, please check with the OWNER of the directory. This directory currently
|
||||
contains misplaced and legacy tests; they will be cleaned up in the future.
|
73
vendor/k8s.io/kubernetes/test/e2e/node/crictl.go
generated
vendored
Normal file
73
vendor/k8s.io/kubernetes/test/e2e/node/crictl.go
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
Copyright 2018 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 node
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
)
|
||||
|
||||
var _ = SIGDescribe("crictl", func() {
|
||||
f := framework.NewDefaultFramework("crictl")
|
||||
|
||||
BeforeEach(func() {
|
||||
// `crictl` is not available on all cloud providers.
|
||||
framework.SkipUnlessProviderIs("gce", "gke")
|
||||
// The test requires $HOME/.ssh/id_rsa key to be present.
|
||||
framework.SkipUnlessSSHKeyPresent()
|
||||
})
|
||||
|
||||
It("should be able to run crictl on the node", func() {
|
||||
// Get all nodes' external IPs.
|
||||
By("Getting all nodes' SSH-able IP addresses")
|
||||
hosts, err := framework.NodeSSHHosts(f.ClientSet)
|
||||
if err != nil {
|
||||
framework.Failf("Error getting node hostnames: %v", err)
|
||||
}
|
||||
|
||||
testCases := []struct {
|
||||
cmd string
|
||||
}{
|
||||
{`sudo crictl version`},
|
||||
{`sudo crictl info`},
|
||||
}
|
||||
|
||||
for _, testCase := range testCases {
|
||||
// Choose an arbitrary node to test.
|
||||
host := hosts[0]
|
||||
By(fmt.Sprintf("SSH'ing to node %q to run %q", host, testCase.cmd))
|
||||
|
||||
result, err := framework.SSH(testCase.cmd, host, framework.TestContext.Provider)
|
||||
stdout, stderr := strings.TrimSpace(result.Stdout), strings.TrimSpace(result.Stderr)
|
||||
if err != nil {
|
||||
framework.Failf("Ran %q on %q, got error %v", testCase.cmd, host, err)
|
||||
}
|
||||
// Log the stdout/stderr output.
|
||||
// TODO: Verify the output.
|
||||
if len(stdout) > 0 {
|
||||
framework.Logf("Got stdout from %q:\n %s\n", host, strings.TrimSpace(stdout))
|
||||
}
|
||||
if len(stderr) > 0 {
|
||||
framework.Logf("Got stderr from %q:\n %s\n", host, strings.TrimSpace(stderr))
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
12
vendor/k8s.io/kubernetes/test/e2e/node/events.go
generated
vendored
12
vendor/k8s.io/kubernetes/test/e2e/node/events.go
generated
vendored
@@ -17,7 +17,6 @@ limitations under the License.
|
||||
package node
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@@ -36,6 +35,11 @@ import (
|
||||
var _ = SIGDescribe("Events", func() {
|
||||
f := framework.NewDefaultFramework("events")
|
||||
|
||||
/*
|
||||
Release : v1.9
|
||||
Testname: Pod events, verify event from Scheduler and Kubelet
|
||||
Description: Create a Pod, make sure that the Pod can be queried. Create a event selector for the kind=Pod and the source is the Scheduler. List of the events MUST be at least one. Create a event selector for kind=Pod and the source is the Kubelet. List of the events MUST be at least one. Both Scheduler and Kubelet MUST send events when scheduling and running a Pod.
|
||||
*/
|
||||
framework.ConformanceIt("should be sent by kubelets and the scheduler about pods scheduling and running ", func() {
|
||||
|
||||
podClient := f.ClientSet.CoreV1().Pods(f.Namespace.Name)
|
||||
@@ -84,7 +88,7 @@ var _ = SIGDescribe("Events", func() {
|
||||
if err != nil {
|
||||
framework.Failf("Failed to get pod: %v", err)
|
||||
}
|
||||
fmt.Printf("%+v\n", podWithUid)
|
||||
framework.Logf("%+v\n", podWithUid)
|
||||
var events *v1.EventList
|
||||
// Check for scheduler event about the pod.
|
||||
By("checking for scheduler event about the pod")
|
||||
@@ -101,7 +105,7 @@ var _ = SIGDescribe("Events", func() {
|
||||
return false, err
|
||||
}
|
||||
if len(events.Items) > 0 {
|
||||
fmt.Println("Saw scheduler event for our pod.")
|
||||
framework.Logf("Saw scheduler event for our pod.")
|
||||
return true, nil
|
||||
}
|
||||
return false, nil
|
||||
@@ -121,7 +125,7 @@ var _ = SIGDescribe("Events", func() {
|
||||
return false, err
|
||||
}
|
||||
if len(events.Items) > 0 {
|
||||
fmt.Println("Saw kubelet event for our pod.")
|
||||
framework.Logf("Saw kubelet event for our pod.")
|
||||
return true, nil
|
||||
}
|
||||
return false, nil
|
||||
|
2
vendor/k8s.io/kubernetes/test/e2e/node/kubelet.go
generated
vendored
2
vendor/k8s.io/kubernetes/test/e2e/node/kubelet.go
generated
vendored
@@ -133,7 +133,7 @@ func createPodUsingNfs(f *framework.Framework, c clientset.Interface, ns, nfsIP,
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "pod-nfs-vol",
|
||||
Image: "busybox",
|
||||
Image: imageutils.GetE2EImage(imageutils.BusyBox),
|
||||
Command: []string{"/bin/sh"},
|
||||
Args: cmdLine,
|
||||
VolumeMounts: []v1.VolumeMount{
|
||||
|
7
vendor/k8s.io/kubernetes/test/e2e/node/kubelet_perf.go
generated
vendored
7
vendor/k8s.io/kubernetes/test/e2e/node/kubelet_perf.go
generated
vendored
@@ -21,7 +21,6 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
"k8s.io/apimachinery/pkg/util/uuid"
|
||||
clientset "k8s.io/client-go/kubernetes"
|
||||
@@ -199,12 +198,6 @@ var _ = SIGDescribe("Kubelet [Serial] [Slow]", func() {
|
||||
var rm *framework.ResourceMonitor
|
||||
|
||||
BeforeEach(func() {
|
||||
// Wait until image prepull pod has completed so that they wouldn't
|
||||
// affect the runtime cpu usage. Fail the test if prepulling cannot
|
||||
// finish in time.
|
||||
if err := framework.WaitForPodsSuccess(f.ClientSet, metav1.NamespaceSystem, framework.ImagePullerLabels, imagePrePullingLongTimeout); err != nil {
|
||||
framework.Failf("Image puller didn't complete in %v, not running resource usage test since the metrics might be adultrated", imagePrePullingLongTimeout)
|
||||
}
|
||||
nodes := framework.GetReadySchedulableNodesOrDie(f.ClientSet)
|
||||
nodeNames = sets.NewString()
|
||||
for _, node := range nodes.Items {
|
||||
|
3
vendor/k8s.io/kubernetes/test/e2e/node/mount_propagation.go
generated
vendored
3
vendor/k8s.io/kubernetes/test/e2e/node/mount_propagation.go
generated
vendored
@@ -23,6 +23,7 @@ import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
@@ -43,7 +44,7 @@ func preparePod(name string, node *v1.Node, propagation *v1.MountPropagationMode
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: containerName,
|
||||
Image: "busybox",
|
||||
Image: imageutils.GetE2EImage(imageutils.BusyBox),
|
||||
Command: []string{"sh", "-c", cmd},
|
||||
VolumeMounts: []v1.VolumeMount{
|
||||
{
|
||||
|
3
vendor/k8s.io/kubernetes/test/e2e/node/pod_gc.go
generated
vendored
3
vendor/k8s.io/kubernetes/test/e2e/node/pod_gc.go
generated
vendored
@@ -27,6 +27,7 @@ import (
|
||||
"k8s.io/apimachinery/pkg/util/uuid"
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||
)
|
||||
|
||||
// This test requires that --terminated-pod-gc-threshold=100 be set on the controller manager
|
||||
@@ -89,7 +90,7 @@ func createTerminatingPod(f *framework.Framework) (*v1.Pod, error) {
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: string(uuid),
|
||||
Image: "busybox",
|
||||
Image: imageutils.GetE2EImage(imageutils.BusyBox),
|
||||
},
|
||||
},
|
||||
SchedulerName: "please don't schedule my pods",
|
||||
|
14
vendor/k8s.io/kubernetes/test/e2e/node/pods.go
generated
vendored
14
vendor/k8s.io/kubernetes/test/e2e/node/pods.go
generated
vendored
@@ -47,6 +47,11 @@ var _ = SIGDescribe("Pods Extended", func() {
|
||||
podClient = f.PodClient()
|
||||
})
|
||||
// Flaky issue #36821.
|
||||
/*
|
||||
Release : v1.9
|
||||
Testname: Pods, delete grace period
|
||||
Description: Create a pod, make sure it is running, create a watch to observe Pod creation. Create a 'kubectl local proxy', capture the port the proxy is listening. Using the http client send a ‘delete’ with gracePeriodSeconds=30. Pod SHOULD get deleted within 30 seconds.
|
||||
*/
|
||||
framework.ConformanceIt("should be submitted and removed [Flaky]", func() {
|
||||
By("creating the pod")
|
||||
name := "pod-submit-remove-" + string(uuid.NewUUID())
|
||||
@@ -63,7 +68,7 @@ var _ = SIGDescribe("Pods Extended", func() {
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "nginx",
|
||||
Image: imageutils.GetE2EImage(imageutils.NginxSlim),
|
||||
Image: imageutils.GetE2EImage(imageutils.Nginx),
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -199,6 +204,11 @@ var _ = SIGDescribe("Pods Extended", func() {
|
||||
BeforeEach(func() {
|
||||
podClient = f.PodClient()
|
||||
})
|
||||
/*
|
||||
Release : v1.9
|
||||
Testname: Pods, QOS
|
||||
Description: Create a Pod with CPU and Memory request and limits. Pos status MUST have QOSClass set to PodQOSGuaranteed.
|
||||
*/
|
||||
framework.ConformanceIt("should be submitted and removed ", func() {
|
||||
By("creating the pod")
|
||||
name := "pod-qos-class-" + string(uuid.NewUUID())
|
||||
@@ -213,7 +223,7 @@ var _ = SIGDescribe("Pods Extended", func() {
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "nginx",
|
||||
Image: imageutils.GetE2EImage(imageutils.NginxSlim),
|
||||
Image: imageutils.GetE2EImage(imageutils.Nginx),
|
||||
Resources: v1.ResourceRequirements{
|
||||
Limits: v1.ResourceList{
|
||||
v1.ResourceCPU: resource.MustParse("100m"),
|
||||
|
8
vendor/k8s.io/kubernetes/test/e2e/node/pre_stop.go
generated
vendored
8
vendor/k8s.io/kubernetes/test/e2e/node/pre_stop.go
generated
vendored
@@ -80,7 +80,7 @@ func testPreStop(c clientset.Interface, ns string) {
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "tester",
|
||||
Image: "busybox",
|
||||
Image: imageutils.GetE2EImage(imageutils.BusyBox),
|
||||
Command: []string{"sleep", "600"},
|
||||
Lifecycle: &v1.Lifecycle{
|
||||
PreStop: &v1.Handler{
|
||||
@@ -162,9 +162,9 @@ var _ = SIGDescribe("PreStop", func() {
|
||||
f := framework.NewDefaultFramework("prestop")
|
||||
|
||||
/*
|
||||
Testname: pods-prestop-handler-invoked
|
||||
Description: Makes sure a pod's preStop handler is successfully
|
||||
invoked immediately before a container is terminated.
|
||||
Release : v1.9
|
||||
Testname: Pods, prestop hook
|
||||
Description: Create a server pod with a rest endpoint '/write' that changes state.Received field. Create a Pod with a pre-stop handle that posts to the /write endpoint on the server Pod. Verify that the Pod with pre-stop hook is running. Delete the Pod with the pre-stop hook. Before the Pod is deleted, pre-stop handler MUST be called when configured. Verify that the Pod is deleted and a call to prestop hook is verified by checking the status received on the server Pod.
|
||||
*/
|
||||
framework.ConformanceIt("should call prestop when killing a pod ", func() {
|
||||
testPreStop(f.ClientSet, f.Namespace.Name)
|
||||
|
3
vendor/k8s.io/kubernetes/test/e2e/node/security_context.go
generated
vendored
3
vendor/k8s.io/kubernetes/test/e2e/node/security_context.go
generated
vendored
@@ -29,6 +29,7 @@ import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/uuid"
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
@@ -49,7 +50,7 @@ func scTestPod(hostIPC bool, hostPID bool) *v1.Pod {
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "test-container",
|
||||
Image: "busybox",
|
||||
Image: imageutils.GetE2EImage(imageutils.BusyBox),
|
||||
},
|
||||
},
|
||||
RestartPolicy: v1.RestartPolicyNever,
|
||||
|
Reference in New Issue
Block a user