k3s/test/e2e
Kubernetes Submit Queue 44980eb55c Merge pull request #40756 from vmware/e2eTestsUpdate
Automatic merge from submit-queue (batch tested with PRs 38796, 40823, 40756, 41083, 41105)

e2e tests for vSphere cloud provider

**What this PR does / why we need it**:
This PR contains changes for existing e2e volume provisioning test cases for running on vsphere cloud provider.

**Following is the summary of changes made in  existing e2e test cases**

**Added test/e2e/persistent_volumes-vsphere.go**
- This test verifies deleting a PVC before the pod does not cause pod deletion to fail on PD detach and deleting the PV before the pod does not cause pod deletion to fail on PD detach.

**test/e2e/volume_provisioning.go**
- This test creates a StorageClass and claim with dynamic provisioning and alpha dynamic provisioning annotations and verifies that required volumes are getting created. Test also verifies that created volume is readable and retaining data.
- Added vsphere as supported cloud provider. Also set pluginName to "kubernetes.io/vsphere-volume" for vsphere cloud provider.

**test/e2e/volumes.go**
- Added test spec for vsphere
-  This test creates requested volume, mount it on the pod, write some random content at /opt/0/index.html and verifies file contents are perfect to make sure we don't see the content from previous test runs.
- This test also passes "1234" as fsGroup to mount volume and verifies fsGroup is set correctly.

**added  test/e2e/vsphere_utils.go** 
- Added function verifyVSphereDiskAttached - Verify the persistent disk attached to the node.
- Added function waitForVSphereDiskToDetach - Wait until vsphere vmdk is deteched from the given node or time out after 5 minutes
- Added getVSpherePersistentVolumeSpec - create vsphere volume spec with given VMDK volume path, Reclaim Policy and labels
- Added getVSpherePersistentVolumeClaimSpec - get vsphere persistent volume spec with given selector labels
- createVSphereVolume - function to create vmdk volume

**Following is the summary of new e2e tests added with this PR**

**test/e2e/vsphere_volume_placement.go**
- contains volume placement tests using node label selector
-  Test Back-to-back pod creation/deletion with the same volume source on the same worker node
- Test Back-to-back pod creation/deletion with the same volume source attach/detach to different worker nodes

**test/e2e/pv_reclaimpolicy.go**
- contains tests for PV/PVC - Reclaiming Policy
- Test verifies persistent volume should be deleted when reclaimPolicy on the PV is set to delete and associated claim is deleted
- Test also verified that persistent volume should be retained when reclaimPolicy on the PV is set to retain and associated claim is deleted 

**test/e2e/pvc_label_selector.go** 
- This is function test for Selector-Label Volume Binding Feature.
- Verify volume with the matching label is bounded with the PVC.

Other changes
Updated  pkg/cloudprovider/providers/vsphere/BUILD  and test/e2e/BUILD 


**Which issue this PR fixes** *
fixes # 41087

**Special notes for your reviewer**:
Updated tests were executed on kubernetes v1.4.8 release on vsphere.
Test steps are provided in comments 


@kerneltime @BaluDontu
2017-02-08 00:49:47 -08:00
..
chaosmonkey Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
common Merge pull request #40861 from lucab/to-k8s/bump-test-images 2017-02-07 11:33:44 -08:00
framework Merge pull request #41097 from kargakis/test-update 2017-02-07 22:12:36 -08:00
generated Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
perftype Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
testing-manifests Bump nginx ingress version to 0.9.0-beta.1 2017-01-31 10:11:40 -08:00
upgrades Add an upgrade test for secrets. 2017-01-31 13:05:36 -08:00
BUILD updating existing e2e tests and adding new e2e tests for vsphere cloud provider 2017-02-07 10:36:39 -08:00
addon_update.go refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
apparmor.go refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
autoscaling_utils.go move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
cadvisor.go refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
cluster_logging_es.go refactor: Move *Options references to metav1 2017-01-24 13:41:51 -05:00
cluster_logging_gcl.go refactor: Move *Options references to metav1 2017-01-24 13:41:51 -05:00
cluster_logging_utils.go refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
cluster_size_autoscaling.go refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
cluster_upgrade.go Add an upgrade test for secrets. 2017-01-31 13:05:36 -08:00
cronjob.go move client/record 2017-01-31 19:14:13 -05:00
daemon_restart.go pkg/util: move uuid and strategicpatch into k8s.io/apimachinery 2017-01-25 19:45:09 +01:00
daemon_set.go DaemonSet controller actively kills failed pods (to recreate them) 2017-01-25 10:20:26 -08:00
dashboard.go refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
density.go Fix failing density test in 100-node clusters 2017-02-06 12:18:10 +01:00
deployment.go Merge pull request #41097 from kargakis/test-update 2017-02-07 22:12:36 -08:00
disruption.go Fix k8s.io/client-go imports in authorative files before resync 2017-01-31 13:49:38 +01:00
dns.go pkg/util: move uuid and strategicpatch into k8s.io/apimachinery 2017-01-25 19:45:09 +01:00
dns_autoscaling.go pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
dns_configmap.go move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
e2e-example-config.json
e2e.go refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
e2e_test.go
empty.go Allow for configuring timeout for waiting for nodes 2016-12-13 09:55:34 +01:00
empty_dir_wrapper.go move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
etcd_failure.go refactor: Move *Options references to metav1 2017-01-24 13:41:51 -05:00
events.go pkg/util: move uuid and strategicpatch into k8s.io/apimachinery 2017-01-25 19:45:09 +01:00
example_cluster_dns.go refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
example_k8petstore.go Merge pull request #38592 from krousey/client-context 2017-01-16 10:37:38 -08:00
examples.go install authorization.k8s.io/v1, add tests 2017-02-06 18:16:51 -05:00
firewall.go fix redundant alias clientset 2017-01-12 10:21:05 +08:00
garbage_collector.go Merge pull request #39216 from krmayankk/contr-ref 2017-02-01 12:32:41 -08:00
generated_clientset.go move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
gke_local_ssd.go pkg/util: move uuid and strategicpatch into k8s.io/apimachinery 2017-01-25 19:45:09 +01:00
gke_node_pools.go Use clientset in GetReadySchedulableNodesOrDie 2016-10-19 15:55:39 +02:00
ha_master.go Merge pull request #39661 from NickrenREN/clientset-redundant-modify 2017-01-12 13:29:16 -08:00
horizontal_pod_autoscaling.go refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
ingress.go install authorization.k8s.io/v1, add tests 2017-02-06 18:16:51 -05:00
ingress_utils.go refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
initial_resources.go refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
job.go Remove half of the job e2e tests. 2017-02-02 10:31:43 -08:00
kibana_logging.go refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
kube_proxy.go refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
kubectl.go install authorization.k8s.io/v1, add tests 2017-02-06 18:16:51 -05:00
kubelet.go Add [Flaky] to persistent volumes tests 2017-02-03 12:26:20 -06:00
kubelet_perf.go pkg/util: move uuid and strategicpatch into k8s.io/apimachinery 2017-01-25 19:45:09 +01:00
limit_range.go pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
load.go Modify load test to not create too may services/endpoints 2017-02-01 13:25:43 +01:00
logging_soak.go New ns param for NewClusterVerification 2016-12-05 16:27:07 -05:00
mesos.go refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
metrics_grabber_test.go refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
monitoring.go refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
namespace.go move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
network_partition.go make tools/cache authoritative 2017-01-25 08:29:45 -05:00
networking.go start the apimachinery repo 2017-01-11 09:09:48 -05:00
networking_perf.go New ns param for NewClusterVerification 2016-12-05 16:27:07 -05:00
node_problem_detector.go install authorization.k8s.io/v1, add tests 2017-02-06 18:16:51 -05:00
nodeoutofdisk.go pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
opaque_resource.go pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
pd.go pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
persistent_volumes-disruptive.go Merge pull request #40879 from copejon/pv-e2e-unique-nfs-vol 2017-02-04 04:43:07 -08:00
persistent_volumes-vsphere.go updating existing e2e tests and adding new e2e tests for vsphere cloud provider 2017-02-07 10:36:39 -08:00
persistent_volumes.go Merge pull request #40879 from copejon/pv-e2e-unique-nfs-vol 2017-02-04 04:43:07 -08:00
pod_gc.go pkg/util: move uuid and strategicpatch into k8s.io/apimachinery 2017-01-25 19:45:09 +01:00
pods.go pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
portforward.go Port forward over websockets 2017-02-01 06:32:04 -07:00
pre_stop.go install authorization.k8s.io/v1, add tests 2017-02-06 18:16:51 -05:00
proxy.go move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
pv_reclaimpolicy.go updating existing e2e tests and adding new e2e tests for vsphere cloud provider 2017-02-07 10:36:39 -08:00
pvc_label_selector.go updating existing e2e tests and adding new e2e tests for vsphere cloud provider 2017-02-07 10:36:39 -08:00
pvutil.go refactor pv code for readability 2017-01-30 18:12:53 -08:00
rc.go pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
reboot.go refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
replica_set.go pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
rescheduler.go refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
resize_nodes.go move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
resource_quota.go move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
restart.go refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
scheduler_predicates.go pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
security_context.go pkg/util: move uuid and strategicpatch into k8s.io/apimachinery 2017-01-25 19:45:09 +01:00
service.go move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
service_accounts.go test: update to use mounttest:0.8 and mounttest-user:0.5 2017-02-02 20:41:18 +00:00
service_latency.go make tools/cache authoritative 2017-01-25 08:29:45 -05:00
serviceloadbalancers.go refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
ssh.go Use clientset in GetReadySchedulableNodesOrDie 2016-10-19 15:55:39 +02:00
statefulset.go Add StatefulSets checks at Service level 2017-02-01 11:29:40 +01:00
third-party.go refactor: Move *Options references to metav1 2017-01-24 13:41:51 -05:00
ubernetes_lite.go move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
util_iperf.go
volume_provisioning.go updating existing e2e tests and adding new e2e tests for vsphere cloud provider 2017-02-07 10:36:39 -08:00
volumes.go updating existing e2e tests and adding new e2e tests for vsphere cloud provider 2017-02-07 10:36:39 -08:00
vsphere_utils.go updating existing e2e tests and adding new e2e tests for vsphere cloud provider 2017-02-07 10:36:39 -08:00
vsphere_volume_placement.go updating existing e2e tests and adding new e2e tests for vsphere cloud provider 2017-02-07 10:36:39 -08:00