Skip to content

Commit

Permalink
hypershift assisted: delete namespace at the end
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Mar 24, 2024
1 parent 77ad799 commit 0e6afbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kvirt/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2867,11 +2867,11 @@ def delete_kube(self, cluster, overrides={}):
kubeconfigmgmt = f"{clusterdir}/kubeconfig.mgmt"
if os.path.exists(f'{clusterdir}/bmcs.yml'):
call(f'KUBECONFIG={kubeconfigmgmt} oc delete -f {clusterdir}/bmcs.yml', shell=True)
if os.path.exists(f'{clusterdir}/assisted_infra.yml'):
call(f'KUBECONFIG={kubeconfigmgmt} oc delete -f {clusterdir}/assisted_infra.yml', shell=True)
call(f'KUBECONFIG={kubeconfigmgmt} oc delete -f {clusterdir}/autoapprovercron.yml', shell=True)
call(f'KUBECONFIG={kubeconfigmgmt} oc delete -f {clusterdir}/nodepool.yaml', shell=True)
call(f'KUBECONFIG={kubeconfigmgmt} oc delete -f {clusterdir}/hostedcluster.yaml', shell=True)
if os.path.exists(f'{clusterdir}/assisted_infra.yml'):
call(f'KUBECONFIG={kubeconfigmgmt} oc delete -f {clusterdir}/assisted_infra.yml', shell=True)
if not assisted and ('baremetal_iso' in clusterdata or 'baremetal_hosts' in clusterdata):
call(f'KUBECONFIG={kubeconfigmgmt} oc -n default delete all -l app=httpd-kcli', shell=True)
call(f'KUBECONFIG={kubeconfigmgmt} oc -n default delete pvc httpd-kcli-pvc', shell=True)
Expand Down

0 comments on commit 0e6afbb

Please sign in to comment.