File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/codeflare_sdk/cluster Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -691,6 +691,7 @@ def get_cluster(cluster_name: str, namespace: str = "default"):
691691 config_check ()
692692 api_instance = client .NetworkingV1Api (api_config_handler ())
693693 ingresses = api_instance .list_namespaced_ingress (namespace )
694+ ingress_host = None
694695 if mcad == True :
695696 for ingress in ingresses .items :
696697 # Search for ingress with AppWrapper name as the owner
@@ -705,7 +706,11 @@ def get_cluster(cluster_name: str, namespace: str = "default"):
705706 return _kube_api_error_handling (e )
706707
707708 # We gather the ingress domain from the host
708- ingress_domain = ingress_host .split ("." , 1 )[1 ]
709+ if ingress_host is not None :
710+ ingress_domain = ingress_host .split ("." , 1 )[1 ]
711+ else :
712+ ingress_domain = None
713+
709714 return Cluster .from_k8_cluster_object (
710715 rc , mcad = mcad , ingress_domain = ingress_domain
711716 )
You can’t perform that action at this time.
0 commit comments