Skip to content

Commit d5158c2

Browse files
authored
Merge pull request #11798 from chrischdi/pr-scale-optional-upgrade-vars
🌱 e2e/scale: make coredns and etcd upgrade variables optional
2 parents 79f2bd7 + 4aca8d8 commit d5158c2

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

test/e2e/cluster_upgrade.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,8 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
128128
workerMachineCount = *input.WorkerMachineCount
129129
}
130130

131-
if input.E2EConfig.HasVariable(EtcdVersionUpgradeTo) {
132-
etcdVersionUpgradeTo = input.E2EConfig.MustGetVariable(EtcdVersionUpgradeTo)
133-
}
134-
if input.E2EConfig.HasVariable(CoreDNSVersionUpgradeTo) {
135-
coreDNSVersionUpgradeTo = input.E2EConfig.MustGetVariable(CoreDNSVersionUpgradeTo)
136-
}
131+
etcdVersionUpgradeTo = input.E2EConfig.GetVariableOrEmpty(EtcdVersionUpgradeTo)
132+
coreDNSVersionUpgradeTo = input.E2EConfig.GetVariableOrEmpty(CoreDNSVersionUpgradeTo)
137133

138134
// Setup a Namespace where to host objects for this spec and create a watcher for the Namespace events.
139135
namespace, cancelWatches = framework.SetupSpecNamespace(ctx, specName, input.BootstrapClusterProxy, input.ArtifactFolder, input.PostNamespaceCreated)

test/e2e/scale.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ func ScaleSpec(ctx context.Context, inputGetter func() ScaleSpecInput) {
411411
upgrader := getClusterUpgradeAndWaitFn(framework.UpgradeClusterTopologyAndWaitForUpgradeInput{
412412
ClusterProxy: input.BootstrapClusterProxy,
413413
KubernetesUpgradeVersion: input.E2EConfig.MustGetVariable(KubernetesVersionUpgradeTo),
414-
EtcdImageTag: input.E2EConfig.MustGetVariable(EtcdVersionUpgradeTo),
415-
DNSImageTag: input.E2EConfig.MustGetVariable(CoreDNSVersionUpgradeTo),
414+
EtcdImageTag: input.E2EConfig.GetVariableOrEmpty(EtcdVersionUpgradeTo),
415+
DNSImageTag: input.E2EConfig.GetVariableOrEmpty(CoreDNSVersionUpgradeTo),
416416
WaitForMachinesToBeUpgraded: input.E2EConfig.GetIntervals(specName, "wait-machine-upgrade"),
417417
WaitForKubeProxyUpgrade: input.E2EConfig.GetIntervals(specName, "wait-machine-upgrade"),
418418
WaitForDNSUpgrade: input.E2EConfig.GetIntervals(specName, "wait-machine-upgrade"),

test/e2e/self_hosted.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,8 @@ func SelfHostedSpec(ctx context.Context, inputGetter func() SelfHostedSpecInput)
124124

125125
kubernetesVersion = input.E2EConfig.MustGetVariable(KubernetesVersionUpgradeFrom)
126126

127-
if input.E2EConfig.HasVariable(EtcdVersionUpgradeTo) {
128-
etcdVersionUpgradeTo = input.E2EConfig.MustGetVariable(EtcdVersionUpgradeTo)
129-
}
130-
if input.E2EConfig.HasVariable(CoreDNSVersionUpgradeTo) {
131-
coreDNSVersionUpgradeTo = input.E2EConfig.MustGetVariable(CoreDNSVersionUpgradeTo)
132-
}
127+
etcdVersionUpgradeTo = input.E2EConfig.GetVariableOrEmpty(EtcdVersionUpgradeTo)
128+
coreDNSVersionUpgradeTo = input.E2EConfig.GetVariableOrEmpty(CoreDNSVersionUpgradeTo)
133129
}
134130

135131
// Setup a Namespace where to host objects for this spec and create a watcher for the namespace events.

0 commit comments

Comments
 (0)