mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 22:17:14 +00:00
Merge pull request #48092 from enisoc/upgrade-skip-dep
Automatic merge from submit-queue (batch tested with PRs 48092, 47894, 47983) Skip Deployment upgrade test on 1.5 and earlier. The test relies on implementation details and would need a rewrite to work for older clusters. xref #47685
This commit is contained in:
commit
eb2c702aaa
@ -22,6 +22,7 @@ import (
|
||||
extensions "k8s.io/api/extensions/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
deploymentutil "k8s.io/kubernetes/pkg/controller/deployment/util"
|
||||
"k8s.io/kubernetes/pkg/util/version"
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
@ -41,6 +42,22 @@ type DeploymentUpgradeTest struct {
|
||||
|
||||
func (DeploymentUpgradeTest) Name() string { return "deployment-upgrade" }
|
||||
|
||||
func (DeploymentUpgradeTest) Skip(upgCtx UpgradeContext) bool {
|
||||
// The Deployment upgrade test currently relies on implementation details to probe the
|
||||
// ReplicaSets belonging to a Deployment. As of 1.7, the client code we call into no
|
||||
// longer supports talking to a server <1.6. (see #47685)
|
||||
minVersion := version.MustParseSemantic("v1.6.0")
|
||||
|
||||
for _, vCtx := range upgCtx.Versions {
|
||||
if vCtx.Version.LessThan(minVersion) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var _ Skippable = DeploymentUpgradeTest{}
|
||||
|
||||
// Setup creates a deployment and makes sure it has a new and an old replica set running.
|
||||
// This calls in to client code and should not be expected to work against a cluster more than one minor version away from the current version.
|
||||
func (t *DeploymentUpgradeTest) Setup(f *framework.Framework) {
|
||||
|
Loading…
Reference in New Issue
Block a user