Skip to content

Commit

Permalink
add constraints to version str
Browse files Browse the repository at this point in the history
  • Loading branch information
hzeng21 committed Oct 16, 2023
1 parent 191a8de commit 7c47db9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion acto/kubernetes_engine/kind.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Kind(base.KubernetesEngine):
def __init__(
self, acto_namespace: int, posthooks: List[base.KubernetesEnginePostHookType] = None):
self.config_path = os.path.join(CONST.CLUSTER_CONFIG_FOLDER, f'KIND-{acto_namespace}.yaml')
self._k8s_version = ""
if posthooks is not None:
self.posthooks = posthooks

Expand Down Expand Up @@ -85,7 +86,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:
Expand Down

0 comments on commit 7c47db9

Please sign in to comment.