def _check_if_pod_or_more(self, app_id, app_info):
only_pod = True
kind_list = []
app_dir = app_info['app_location']
app_folder_name = app_info['app_folder_name']
df_dir = app_dir + "/" + app_folder_name
app_yaml = app_info['app_yaml']
stream = open(df_dir + "/" + app_yaml, "r")
docs = yaml.load_all(stream)
for doc in docs:
for k,v in doc.items():
if k == 'kind':
kind_list.append(v.strip())
if 'Service' in kind_list or 'Deployment' in kind_list:
only_pod = False
return only_pod
评论列表
文章目录