@@ -131,6 +131,7 @@ def create_app_wrapper(self):
131131 image_pull_secrets = self .config .image_pull_secrets
132132 dispatch_priority = self .config .dispatch_priority
133133 ingress_domain = self .config .ingress_domain
134+ ingress_options = self .config .ingress_options
134135 return generate_appwrapper (
135136 name = name ,
136137 namespace = namespace ,
@@ -153,6 +154,7 @@ def create_app_wrapper(self):
153154 dispatch_priority = dispatch_priority ,
154155 priority_val = priority_val ,
155156 ingress_domain = ingress_domain ,
157+ ingress_options = ingress_options ,
156158 )
157159
158160 # creates a new cluster with the provided or default spec
@@ -174,17 +176,6 @@ def up(self):
174176 plural = "appwrappers" ,
175177 body = aw ,
176178 )
177- if self .config .ingress_options != {}: # pragma: no cover
178- generate_custom_ingresses (
179- self .config .ingress_options , namespace , self .config .name
180- )
181- else :
182- generate_default_ingresses (
183- self .config .name ,
184- namespace ,
185- self .config .ingress_domain ,
186- self .config .local_interactive ,
187- )
188179
189180 except Exception as e : # pragma: no cover
190181 return _kube_api_error_handling (e )
@@ -207,12 +198,6 @@ def down(self):
207198 )
208199 except Exception as e : # pragma: no cover
209200 return _kube_api_error_handling (e )
210- _delete_generated_ingresses (
211- self .config .ingress_options ,
212- namespace ,
213- self .config .name ,
214- self .config .local_interactive ,
215- ) # pragma: no cover
216201
217202 def status (
218203 self , print_to_console : bool = True
@@ -512,31 +497,6 @@ def get_cluster(cluster_name: str, namespace: str = "default"):
512497
513498
514499# private methods
515- def _delete_generated_ingresses (
516- ingress_options , namespace , clusterName , local_interactive
517- ): # pragma: no cover
518- ingressNames = []
519- if ingress_options != {}:
520- for ingress_option in ingress_options ["ingresses" ]:
521- ingressNames .append (ingress_option ["ingressName" ])
522- else :
523- ingressNames .append (f"ray-dashboard-ingress-{ clusterName } -{ namespace } " )
524- if local_interactive :
525- ingressNames .append (f"rayclient-ingress-{ clusterName } -{ namespace } " )
526-
527- config_check ()
528- api_client = client .CustomObjectsApi (api_config_handler ())
529- for ingressName in ingressNames :
530- try :
531- api_client .delete_namespaced_custom_object (
532- group = "networking.k8s.io" ,
533- version = "v1" ,
534- namespace = namespace ,
535- plural = "ingresses" ,
536- name = ingressName ,
537- )
538- except Exception as e : # pragma: no cover
539- print (f"Error deleting Ingress resource: { str (e )} " )
540500
541501
542502# Cant test this until get_current_namespace is fixed
0 commit comments