From 96a1b2ed13d05a37928bf9f3f1d57692a95353ef Mon Sep 17 00:00:00 2001 From: hzeng21 Date: Mon, 16 Oct 2023 03:47:45 -0400 Subject: [PATCH] add constraints to version str --- acto/kubernetes_engine/kind.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/acto/kubernetes_engine/kind.py b/acto/kubernetes_engine/kind.py index 05dd4922be..bcdc37b110 100644 --- a/acto/kubernetes_engine/kind.py +++ b/acto/kubernetes_engine/kind.py @@ -19,6 +19,7 @@ def __init__( self, acto_namespace: int, posthooks: List[base.KubernetesEnginePostHookType] = None, feature_gates: Dict[str, bool] = None): self._config_path = os.path.join(CONST.CLUSTER_CONFIG_FOLDER, f'KIND-{acto_namespace}.yaml') + self._k8s_version = "" self._posthooks = posthooks self._feature_gates = feature_gates @@ -91,7 +92,8 @@ def create_cluster(self, name: str, kubeconfig: str): cmd.extend(['--config', self._config_path]) - cmd.extend(['--image', f"kindest/node:{self._k8s_version}"]) + if self._k8s_version != "": + cmd.extend(['--image', f"kindest/node:{self._k8s_version}"]) p = subprocess.run(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) while p.returncode != 0: