mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Always test PDB's during service upgrade test
OpenShift has been running this tests on various platform for several years now without any problems.
This commit is contained in:
parent
109491f3cb
commit
ec7e051bc0
@ -41,8 +41,6 @@ type ServiceUpgradeTest struct {
|
||||
// Name returns the tracking name of the test.
|
||||
func (ServiceUpgradeTest) Name() string { return "service-upgrade" }
|
||||
|
||||
func shouldTestPDBs() bool { return framework.ProviderIs("gce", "gke") }
|
||||
|
||||
// Setup creates a service with a load balancer and makes sure it's reachable.
|
||||
func (t *ServiceUpgradeTest) Setup(ctx context.Context, f *framework.Framework) {
|
||||
serviceName := "service-test"
|
||||
@ -67,11 +65,9 @@ func (t *ServiceUpgradeTest) Setup(ctx context.Context, f *framework.Framework)
|
||||
rc, err := jig.Run(ctx, jig.AddRCAntiAffinity)
|
||||
framework.ExpectNoError(err)
|
||||
|
||||
if shouldTestPDBs() {
|
||||
ginkgo.By("creating a PodDisruptionBudget to cover the ReplicationController")
|
||||
_, err = jig.CreatePDB(ctx, rc)
|
||||
framework.ExpectNoError(err)
|
||||
}
|
||||
ginkgo.By("creating a PodDisruptionBudget to cover the ReplicationController")
|
||||
_, err = jig.CreatePDB(ctx, rc)
|
||||
framework.ExpectNoError(err)
|
||||
|
||||
// Hit it once before considering ourselves ready
|
||||
ginkgo.By("hitting the pod through the service's LoadBalancer")
|
||||
@ -93,8 +89,7 @@ func (t *ServiceUpgradeTest) Test(ctx context.Context, f *framework.Framework, d
|
||||
case upgrades.MasterUpgrade, upgrades.ClusterUpgrade:
|
||||
t.test(ctx, f, done, true, true)
|
||||
case upgrades.NodeUpgrade:
|
||||
// Node upgrades should test during disruption only on GCE/GKE for now.
|
||||
t.test(ctx, f, done, shouldTestPDBs(), false)
|
||||
t.test(ctx, f, done, true, false)
|
||||
default:
|
||||
t.test(ctx, f, done, false, false)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user