Skip to content

Commit

Permalink
Doc, Fix: posthooks of KubernetesEngine initialization
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Gu <[email protected]>
  • Loading branch information
tylergu committed Oct 1, 2023
1 parent c6ff460 commit ee1acd3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions acto/kubernetes_engine/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ class KubernetesEngine(ABC):
@abstractmethod
def __init__(self, acto_namespace: int,
posthooks: List[KubernetesEnginePostHookType] = None) -> None: ...
'''Constructor for KubernetesEngine
Args:
acto_namespace: the namespace of the acto
posthooks: a list of posthooks to be executed after the cluster is created
'''

@abstractmethod
def configure_cluster(self, num_nodes: int, version: str):
Expand Down
3 changes: 1 addition & 2 deletions acto/kubernetes_engine/kind.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +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')
if posthooks is not None:
self.posthooks = posthooks
self.posthooks = posthooks

def configure_cluster(self, num_nodes: int, version: str):
'''Create config file for kind'''
Expand Down

0 comments on commit ee1acd3

Please sign in to comment.