...

Source file src/k8s.io/kubernetes/test/e2e/network/ingress_scale.go

Documentation: k8s.io/kubernetes/test/e2e/network

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

View as plain text