diff --git a/test/addons/submariner/base/src/pod.yaml b/test/addons/submariner/base/src/pod.yaml index a21fbbda7..a849c52a1 100644 --- a/test/addons/submariner/base/src/pod.yaml +++ b/test/addons/submariner/base/src/pod.yaml @@ -10,7 +10,8 @@ metadata: spec: containers: - name: test - image: quay.io/submariner/nettest + # NOTE: keep in sync with start:VERSION. + image: quay.io/submariner/nettest:0.15.2 command: - sh - -c diff --git a/test/addons/submariner/start b/test/addons/submariner/start index e1b9c8731..a20fb5148 100755 --- a/test/addons/submariner/start +++ b/test/addons/submariner/start @@ -11,6 +11,8 @@ from drenv import cluster as drenv_cluster from drenv import kubectl from drenv import subctl +VERSION = "0.15.2" + NAMESPACE = "submariner-operator" BROKER_DEPLOYMENTS = ("submariner-operator",) @@ -33,7 +35,12 @@ def deploy_broker(broker): os.makedirs(broker_dir, exist_ok=True) print(f"Deploying submariner broker in cluster '{broker}'") - subctl.deploy_broker(broker, globalnet=True, broker_info=broker_info) + subctl.deploy_broker( + broker, + globalnet=True, + broker_info=broker_info, + version=VERSION, + ) print(f"Broker info stored in '{broker_info}'") print(f"Waiting for submariner broker deployments in cluster '{broker}'") @@ -47,7 +54,13 @@ def join_cluster(cluster, broker_info): drenv_cluster.wait_until_ready(cluster) print(f"Joining cluster '{cluster}' to broker") - subctl.join(broker_info, context=cluster, clusterid=cluster, cable_driver="vxlan") + subctl.join( + broker_info, + context=cluster, + clusterid=cluster, + cable_driver="vxlan", + version=VERSION, + ) def wait_for_cluster(cluster): diff --git a/test/drenv/subctl.py b/test/drenv/subctl.py index ceeef529f..0b925d38b 100644 --- a/test/drenv/subctl.py +++ b/test/drenv/subctl.py @@ -8,7 +8,7 @@ BROKER_INFO = "broker-info.subm" -def deploy_broker(context, globalnet=False, broker_info=None, log=print): +def deploy_broker(context, globalnet=False, broker_info=None, version=None, log=print): """ Run subctl deploy-broker ... logging progress messages. @@ -18,6 +18,8 @@ def deploy_broker(context, globalnet=False, broker_info=None, log=print): args = ["deploy-broker", "--context", context] if globalnet: args.append("--globalnet") + if version: + args.append(f"--version={version}") _watch(*args, log=log) @@ -25,13 +27,15 @@ def deploy_broker(context, globalnet=False, broker_info=None, log=print): shutil.move(BROKER_INFO, broker_info) -def join(broker_info, context, clusterid, cable_driver=None, log=print): +def join(broker_info, context, clusterid, cable_driver=None, version=None, log=print): """ Run subctl join ... logging progress messages. """ args = ["join", broker_info, "--context", context, "--clusterid", clusterid] if cable_driver: args.extend(("--cable-driver", cable_driver)) + if version: + args.append(f"--version={version}") _watch(*args, log=log)