Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Gu <[email protected]>
  • Loading branch information
tylergu committed Nov 20, 2023
1 parent d5c7602 commit b41d5b0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions acto/deploy.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import time

import kubernetes
import yaml

from acto.kubectl_client.kubectl import KubectlClient
from acto.lib.operator_config import DeployConfig
Expand Down Expand Up @@ -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

0 comments on commit b41d5b0

Please sign in to comment.