k8s.io/kubernetes@v1.29.3/test/e2e/network/ingress_scale.go (about) 1 /* 2 Copyright 2018 The Kubernetes Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package network 18 19 import ( 20 "context" 21 22 "k8s.io/kubernetes/test/e2e/feature" 23 "k8s.io/kubernetes/test/e2e/framework" 24 e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper" 25 "k8s.io/kubernetes/test/e2e/network/common" 26 "k8s.io/kubernetes/test/e2e/network/scale" 27 admissionapi "k8s.io/pod-security-admission/api" 28 29 "github.com/onsi/ginkgo/v2" 30 ) 31 32 var _ = common.SIGDescribe("Loadbalancing: L7 Scalability", func() { 33 defer ginkgo.GinkgoRecover() 34 var ( 35 ns string 36 ) 37 f := framework.NewDefaultFramework("ingress-scale") 38 f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged 39 40 ginkgo.BeforeEach(func() { 41 ns = f.Namespace.Name 42 }) 43 44 f.Describe("GCE", framework.WithSlow(), framework.WithSerial(), feature.IngressScale, func() { 45 var ( 46 scaleFramework *scale.IngressScaleFramework 47 ) 48 49 ginkgo.BeforeEach(func(ctx context.Context) { 50 e2eskipper.SkipUnlessProviderIs("gce", "gke") 51 52 scaleFramework = scale.NewIngressScaleFramework(f.ClientSet, ns, framework.TestContext.CloudConfig) 53 if err := scaleFramework.PrepareScaleTest(ctx); err != nil { 54 framework.Failf("Unexpected error while preparing ingress scale test: %v", err) 55 } 56 }) 57 58 ginkgo.AfterEach(func(ctx context.Context) { 59 if errs := scaleFramework.CleanupScaleTest(ctx); len(errs) != 0 { 60 framework.Failf("Unexpected error while cleaning up ingress scale test: %v", errs) 61 } 62 }) 63 64 ginkgo.It("Creating and updating ingresses should happen promptly with small/medium/large amount of ingresses", func(ctx context.Context) { 65 if errs := scaleFramework.RunScaleTest(ctx); len(errs) != 0 { 66 framework.Failf("Unexpected error while running ingress scale test: %v", errs) 67 } 68 69 }) 70 }) 71 })