diff --git a/acto/deploy.py b/acto/deploy.py index ac521a33d..334301f6c 100644 --- a/acto/deploy.py +++ b/acto/deploy.py @@ -1,6 +1,7 @@ import time import kubernetes +import yaml from acto.kubectl_client.kubectl import KubectlClient from acto.lib.operator_config import DeployConfig @@ -108,3 +109,11 @@ def deploy_with_retry(self, else: logger.error('Failed to deploy operator, retrying...') return False + + def operator_name(self) -> str: + with open(self._operator_yaml) as f: + operator_yamls = yaml.load_all(f, Loader=yaml.FullLoader) + for yaml in operator_yamls: + if yaml['kind'] == 'Deployment': + return yaml['metadata']['name'] + return None \ No newline at end of file