1
- //go:build !providerless
2
- // +build !providerless
3
-
4
1
/*
5
2
Copyright 2016 The Kubernetes Authors.
6
3
@@ -42,6 +39,7 @@ import (
42
39
clientset "k8s.io/client-go/kubernetes"
43
40
podutil "k8s.io/kubernetes/pkg/api/v1/pod"
44
41
e2eapps "k8s.io/kubernetes/test/e2e/apps"
42
+ "k8s.io/kubernetes/test/e2e/feature"
45
43
"k8s.io/kubernetes/test/e2e/framework"
46
44
e2edaemonset "k8s.io/kubernetes/test/e2e/framework/daemonset"
47
45
e2edeployment "k8s.io/kubernetes/test/e2e/framework/deployment"
@@ -116,7 +114,7 @@ func getReadySchedulableWorkerNode(ctx context.Context, c clientset.Interface) (
116
114
return nil , fmt .Errorf ("there are currently no ready, schedulable worker nodes in the cluster" )
117
115
}
118
116
119
- var _ = common .SIGDescribe ("LoadBalancers" , func () {
117
+ var _ = common .SIGDescribe ("LoadBalancers" , feature . LoadBalancer , func () {
120
118
f := framework .NewDefaultFramework ("loadbalancers" )
121
119
f .NamespacePodSecurityLevel = admissionapi .LevelPrivileged
122
120
@@ -133,13 +131,8 @@ var _ = common.SIGDescribe("LoadBalancers", func() {
133
131
})
134
132
135
133
f .It ("should be able to change the type and ports of a TCP service" , f .WithSlow (), func (ctx context.Context ) {
136
- // requires cloud load-balancer support
137
- e2eskipper .SkipUnlessProviderIs ("gce" , "gke" , "aws" )
138
-
139
- loadBalancerLagTimeout := e2eservice .LoadBalancerLagTimeoutDefault
140
- if framework .ProviderIs ("aws" ) {
141
- loadBalancerLagTimeout = e2eservice .LoadBalancerLagTimeoutAWS
142
- }
134
+ // FIXME: need a better platform-independent timeout
135
+ loadBalancerLagTimeout := e2eservice .LoadBalancerLagTimeoutAWS
143
136
loadBalancerCreateTimeout := e2eservice .GetServiceLoadBalancerCreationTimeout (ctx , cs )
144
137
145
138
// This test is more monolithic than we'd like because LB turnup can be
@@ -276,8 +269,7 @@ var _ = common.SIGDescribe("LoadBalancers", func() {
276
269
})
277
270
278
271
f .It ("should be able to change the type and ports of a UDP service" , f .WithSlow (), func (ctx context.Context ) {
279
- // requires cloud load-balancer support
280
- e2eskipper .SkipUnlessProviderIs ("gce" , "gke" )
272
+ // FIXME: some cloud providers do not support UDP LoadBalancers
281
273
282
274
loadBalancerLagTimeout := e2eservice .LoadBalancerLagTimeoutDefault
283
275
loadBalancerCreateTimeout := e2eservice .GetServiceLoadBalancerCreationTimeout (ctx , cs )
@@ -428,9 +420,6 @@ var _ = common.SIGDescribe("LoadBalancers", func() {
428
420
})
429
421
430
422
f .It ("should only allow access from service loadbalancer source ranges" , f .WithSlow (), func (ctx context.Context ) {
431
- // this feature currently supported only on GCE/GKE/AWS/AZURE
432
- e2eskipper .SkipUnlessProviderIs ("gce" , "gke" , "aws" , "azure" )
433
-
434
423
loadBalancerCreateTimeout := e2eservice .GetServiceLoadBalancerCreationTimeout (ctx , cs )
435
424
436
425
namespace := f .Namespace .Name
@@ -513,8 +502,7 @@ var _ = common.SIGDescribe("LoadBalancers", func() {
513
502
514
503
// [LinuxOnly]: Windows does not support session affinity.
515
504
f .It ("should have session affinity work for LoadBalancer service with ESIPP on" , f .WithSlow (), "[LinuxOnly]" , func (ctx context.Context ) {
516
- // L4 load balancer affinity `ClientIP` is not supported on AWS ELB.
517
- e2eskipper .SkipIfProviderIs ("aws" )
505
+ // FIXME: some cloud providers do not support k8s-compatible affinity
518
506
519
507
svc := getServeHostnameService ("affinity-lb-esipp" )
520
508
svc .Spec .Type = v1 .ServiceTypeLoadBalancer
@@ -524,8 +512,7 @@ var _ = common.SIGDescribe("LoadBalancers", func() {
524
512
525
513
// [LinuxOnly]: Windows does not support session affinity.
526
514
f .It ("should be able to switch session affinity for LoadBalancer service with ESIPP on" , f .WithSlow (), "[LinuxOnly]" , func (ctx context.Context ) {
527
- // L4 load balancer affinity `ClientIP` is not supported on AWS ELB.
528
- e2eskipper .SkipIfProviderIs ("aws" )
515
+ // FIXME: some cloud providers do not support k8s-compatible affinity
529
516
530
517
svc := getServeHostnameService ("affinity-lb-esipp-transition" )
531
518
svc .Spec .Type = v1 .ServiceTypeLoadBalancer
@@ -535,8 +522,7 @@ var _ = common.SIGDescribe("LoadBalancers", func() {
535
522
536
523
// [LinuxOnly]: Windows does not support session affinity.
537
524
f .It ("should have session affinity work for LoadBalancer service with ESIPP off" , f .WithSlow (), "[LinuxOnly]" , func (ctx context.Context ) {
538
- // L4 load balancer affinity `ClientIP` is not supported on AWS ELB.
539
- e2eskipper .SkipIfProviderIs ("aws" )
525
+ // FIXME: some cloud providers do not support k8s-compatible affinity
540
526
541
527
svc := getServeHostnameService ("affinity-lb" )
542
528
svc .Spec .Type = v1 .ServiceTypeLoadBalancer
@@ -546,8 +532,7 @@ var _ = common.SIGDescribe("LoadBalancers", func() {
546
532
547
533
// [LinuxOnly]: Windows does not support session affinity.
548
534
f .It ("should be able to switch session affinity for LoadBalancer service with ESIPP off" , f .WithSlow (), "[LinuxOnly]" , func (ctx context.Context ) {
549
- // L4 load balancer affinity `ClientIP` is not supported on AWS ELB.
550
- e2eskipper .SkipIfProviderIs ("aws" )
535
+ // FIXME: some cloud providers do not support k8s-compatible affinity
551
536
552
537
svc := getServeHostnameService ("affinity-lb-transition" )
553
538
svc .Spec .Type = v1 .ServiceTypeLoadBalancer
@@ -594,13 +579,8 @@ var _ = common.SIGDescribe("LoadBalancers", func() {
594
579
})
595
580
596
581
f .It ("should be able to create LoadBalancer Service without NodePort and change it" , f .WithSlow (), func (ctx context.Context ) {
597
- // requires cloud load-balancer support
598
- e2eskipper .SkipUnlessProviderIs ("gce" , "gke" , "aws" )
599
-
600
- loadBalancerLagTimeout := e2eservice .LoadBalancerLagTimeoutDefault
601
- if framework .ProviderIs ("aws" ) {
602
- loadBalancerLagTimeout = e2eservice .LoadBalancerLagTimeoutAWS
603
- }
582
+ // FIXME: need a better platform-independent timeout
583
+ loadBalancerLagTimeout := e2eservice .LoadBalancerLagTimeoutAWS
604
584
loadBalancerCreateTimeout := e2eservice .GetServiceLoadBalancerCreationTimeout (ctx , cs )
605
585
606
586
// This test is more monolithic than we'd like because LB turnup can be
@@ -664,8 +644,8 @@ var _ = common.SIGDescribe("LoadBalancers", func() {
664
644
})
665
645
666
646
ginkgo .It ("should be able to preserve UDP traffic when server pod cycles for a LoadBalancer service on different nodes" , func (ctx context.Context ) {
667
- // requires cloud load-balancer support
668
- e2eskipper . SkipUnlessProviderIs ( "gce" , "gke" , "azure" )
647
+ // FIXME: some cloud providers do not support UDP LoadBalancers
648
+
669
649
ns := f .Namespace .Name
670
650
nodes , err := e2enode .GetBoundedReadySchedulableNodes (ctx , cs , 2 )
671
651
framework .ExpectNoError (err )
@@ -796,8 +776,8 @@ var _ = common.SIGDescribe("LoadBalancers", func() {
796
776
})
797
777
798
778
ginkgo .It ("should be able to preserve UDP traffic when server pod cycles for a LoadBalancer service on the same nodes" , func (ctx context.Context ) {
799
- // requires cloud load-balancer support
800
- e2eskipper . SkipUnlessProviderIs ( "gce" , "gke" , "azure" )
779
+ // FIXME: some cloud providers do not support UDP LoadBalancers
780
+
801
781
ns := f .Namespace .Name
802
782
nodes , err := e2enode .GetBoundedReadySchedulableNodes (ctx , cs , 1 )
803
783
framework .ExpectNoError (err )
@@ -946,7 +926,12 @@ var _ = common.SIGDescribe("LoadBalancers", func() {
946
926
})
947
927
})
948
928
949
- var _ = common .SIGDescribe ("LoadBalancers ESIPP" , framework .WithSlow (), func () {
929
+ var _ = common .SIGDescribe ("LoadBalancers ESIPP" , feature .LoadBalancer , framework .WithSlow (), func () {
930
+ // FIXME: What are the expected semantics of requesting an
931
+ // "ExternalTrafficPolicy: Local" service from a cloud provider that does not
932
+ // support that? What are the expected semantics of "ExternalTrafficPolicy: Local"
933
+ // on `IPMode: Proxy`-type LoadBalancers?
934
+
950
935
f := framework .NewDefaultFramework ("esipp" )
951
936
f .NamespacePodSecurityLevel = admissionapi .LevelBaseline
952
937
var loadBalancerCreateTimeout time.Duration
@@ -956,9 +941,6 @@ var _ = common.SIGDescribe("LoadBalancers ESIPP", framework.WithSlow(), func() {
956
941
var err error
957
942
958
943
ginkgo .BeforeEach (func (ctx context.Context ) {
959
- // requires cloud load-balancer support - this feature currently supported only on GCE/GKE
960
- e2eskipper .SkipUnlessProviderIs ("gce" , "gke" )
961
-
962
944
cs = f .ClientSet
963
945
loadBalancerCreateTimeout = e2eservice .GetServiceLoadBalancerCreationTimeout (ctx , cs )
964
946
subnetPrefix , err = getSubnetPrefix (ctx , cs )
@@ -1415,10 +1397,8 @@ func testRollingUpdateLBConnectivityDisruption(ctx context.Context, f *framework
1415
1397
svcPort := int (service .Spec .Ports [0 ].Port )
1416
1398
1417
1399
ginkgo .By ("Hitting the DaemonSet's pods through the service's load balancer" )
1418
- timeout := e2eservice .LoadBalancerLagTimeoutDefault
1419
- if framework .ProviderIs ("aws" ) {
1420
- timeout = e2eservice .LoadBalancerLagTimeoutAWS
1421
- }
1400
+ // FIXME: need a better platform-independent timeout
1401
+ timeout := e2eservice .LoadBalancerLagTimeoutAWS
1422
1402
e2eservice .TestReachableHTTP (ctx , lbNameOrAddress , svcPort , timeout )
1423
1403
1424
1404
ginkgo .By ("Starting a goroutine to continuously hit the DaemonSet's pods through the service's load balancer" )
0 commit comments