@@ -131,6 +131,7 @@ def create_app_wrapper(self):
131
131
image_pull_secrets = self .config .image_pull_secrets
132
132
dispatch_priority = self .config .dispatch_priority
133
133
ingress_domain = self .config .ingress_domain
134
+ ingress_options = self .config .ingress_options
134
135
return generate_appwrapper (
135
136
name = name ,
136
137
namespace = namespace ,
@@ -153,6 +154,7 @@ def create_app_wrapper(self):
153
154
dispatch_priority = dispatch_priority ,
154
155
priority_val = priority_val ,
155
156
ingress_domain = ingress_domain ,
157
+ ingress_options = ingress_options ,
156
158
)
157
159
158
160
# creates a new cluster with the provided or default spec
@@ -174,17 +176,6 @@ def up(self):
174
176
plural = "appwrappers" ,
175
177
body = aw ,
176
178
)
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
- )
188
179
189
180
except Exception as e : # pragma: no cover
190
181
return _kube_api_error_handling (e )
@@ -207,12 +198,6 @@ def down(self):
207
198
)
208
199
except Exception as e : # pragma: no cover
209
200
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
216
201
217
202
def status (
218
203
self , print_to_console : bool = True
@@ -512,31 +497,6 @@ def get_cluster(cluster_name: str, namespace: str = "default"):
512
497
513
498
514
499
# 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 )} " )
540
500
541
501
542
502
# Cant test this until get_current_namespace is fixed
0 commit comments