Skip to content

Commit

Permalink
Fix pkg import and kind version problem
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Gu <[email protected]>
  • Loading branch information
tylergu committed Jun 13, 2024
1 parent 1391e54 commit fada84a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions acto/kubernetes_engine/kind.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import subprocess
import time
from typing import Any, Dict, List
from typing import Any, Dict, List, Optional

import kubernetes
import yaml
Expand All @@ -22,7 +22,7 @@ def __init__(
posthooks: List[base.KubernetesEnginePostHookType] = None,
feature_gates: Dict[str, bool] = None,
num_nodes=1,
version="",
version: Optional[str] = None,
):
self._config_path = os.path.join(
CONST.CLUSTER_CONFIG_FOLDER, f"KIND-{acto_namespace}.yaml"
Expand Down Expand Up @@ -108,7 +108,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, check=False)
i = 0
Expand Down
2 changes: 1 addition & 1 deletion chactos/fault_injections.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import kubernetes
import yaml
from failures.network_chaos import OperatorApplicationPartitionFailure

from acto import constant
from acto.common import kubernetes_client
Expand All @@ -20,6 +19,7 @@
from acto.system_state.kubernetes_system_state import KubernetesSystemState
from acto.utils import acto_timer
from acto.utils.preprocess import process_crd
from chactos.failures.network_chaos import OperatorApplicationPartitionFailure


def load_inputs_from_dir(dir_: str) -> list[object]:
Expand Down

0 comments on commit fada84a

Please sign in to comment.