Skip to content

Commit 03196bf

Browse files
authored
Check flag is_managed_by_argo_cd for k8s deploy (#4790)
it adds a guard on deploy k8s function to check if it's configured to be managed by ArgoCD. We should deploy it only if it's not, to avoid overlap the deployments. --------- Signed-off-by: Javan Lacerda <[email protected]>
1 parent 16ef654 commit 03196bf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/local/butler/deploy.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,9 +502,13 @@ def _enforce_safe_day_to_deploy():
502502

503503
def _deploy_k8s(config_dir):
504504
"""Deploys all k8s workloads."""
505+
config = local_config.ProjectConfig()
506+
is_argocd_enabled = config.get('argocd.enabled', False)
507+
if is_argocd_enabled:
508+
return
505509
k8s_dir = os.path.join('infra', 'k8s')
506510
k8s_instance_dir = os.path.join(config_dir, 'k8s')
507-
k8s_project = local_config.ProjectConfig().get('env.K8S_PROJECT')
511+
k8s_project = config.get('env.K8S_PROJECT')
508512
redis_host = _get_redis_ip(k8s_project)
509513
os.environ['REDIS_HOST'] = redis_host
510514
common.execute(f'gcloud config set project {k8s_project}')

0 commit comments

Comments
 (0)