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 authored and tylergu committed Nov 4, 2023
1 parent 0e58ca4 commit 96a1b2e
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 @@ -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

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 96a1b2e

Please sign in to comment.