@@ -187,8 +187,6 @@ def create_app_wrapper(self):
187
187
local_interactive = self .config .local_interactive
188
188
image_pull_secrets = self .config .image_pull_secrets
189
189
dispatch_priority = self .config .dispatch_priority
190
- ingress_domain = self .config .ingress_domain
191
- ingress_options = self .config .ingress_options
192
190
write_to_file = self .config .write_to_file
193
191
verify_tls = self .config .verify_tls
194
192
return generate_appwrapper (
@@ -213,8 +211,6 @@ def create_app_wrapper(self):
213
211
image_pull_secrets = image_pull_secrets ,
214
212
dispatch_priority = dispatch_priority ,
215
213
priority_val = priority_val ,
216
- ingress_domain = ingress_domain ,
217
- ingress_options = ingress_options ,
218
214
write_to_file = write_to_file ,
219
215
verify_tls = verify_tls ,
220
216
)
@@ -493,8 +489,6 @@ def torchx_config(
493
489
def from_k8_cluster_object (
494
490
rc ,
495
491
mcad = True ,
496
- ingress_domain = None ,
497
- ingress_options = {},
498
492
write_to_file = False ,
499
493
verify_tls = True ,
500
494
):
@@ -512,11 +506,6 @@ def from_k8_cluster_object(
512
506
else []
513
507
)
514
508
515
- if local_interactive and ingress_domain == None :
516
- ingress_domain = rc ["metadata" ]["annotations" ][
517
- "sdk.codeflare.dev/ingress_domain"
518
- ]
519
-
520
509
cluster_config = ClusterConfiguration (
521
510
name = rc ["metadata" ]["name" ],
522
511
namespace = rc ["metadata" ]["namespace" ],
@@ -553,8 +542,6 @@ def from_k8_cluster_object(
553
542
]["image" ],
554
543
local_interactive = local_interactive ,
555
544
mcad = mcad ,
556
- ingress_domain = ingress_domain ,
557
- ingress_options = ingress_options ,
558
545
write_to_file = write_to_file ,
559
546
verify_tls = verify_tls ,
560
547
)
@@ -661,62 +648,9 @@ def get_cluster(
661
648
for rc in rcs ["items" ]:
662
649
if rc ["metadata" ]["name" ] == cluster_name :
663
650
mcad = _check_aw_exists (cluster_name , namespace )
664
- ingress_host = None
665
- ingress_options = {}
666
- if not is_openshift_cluster ():
667
- try :
668
- config_check ()
669
- api_instance = client .NetworkingV1Api (api_config_handler ())
670
- ingresses = api_instance .list_namespaced_ingress (namespace )
671
- for ingress in ingresses .items :
672
- # Search for ingress with AppWrapper name as the owner
673
- if (
674
- "ingress-owner" in ingress .metadata .labels
675
- and ingress .metadata .labels ["ingress-owner" ] == cluster_name
676
- ):
677
- ingress_host = ingress .spec .rules [0 ].host
678
- if (
679
- "ingress-options" in ingress .metadata .labels
680
- and ingress .metadata .labels ["ingress-options" ] == "true"
681
- ):
682
- ingress_name = ingress .metadata .name
683
- port = (
684
- ingress .spec .rules [0 ]
685
- .http .paths [0 ]
686
- .backend .service .port .number
687
- )
688
- annotations = ingress .metadata .annotations
689
- path = ingress .spec .rules [0 ].http .paths [0 ].path
690
- ingress_class_name = ingress .spec .ingress_class_name
691
- path_type = (
692
- ingress .spec .rules [0 ].http .paths [0 ].path_type
693
- )
694
-
695
- ingress_options = {
696
- "ingresses" : [
697
- {
698
- "ingressName" : ingress_name ,
699
- "port" : port ,
700
- "annotations" : annotations ,
701
- "ingressClassName" : ingress_class_name ,
702
- "pathType" : path_type ,
703
- "path" : path ,
704
- "host" : ingress_host ,
705
- }
706
- ]
707
- }
708
- except Exception as e : # pragma: no cover
709
- return _kube_api_error_handling (e )
710
- # We gather the ingress domain from the host
711
- if ingress_host is not None and ingress_options == {}:
712
- ingress_domain = ingress_host .split ("." , 1 )[1 ]
713
- else :
714
- ingress_domain = None
715
651
return Cluster .from_k8_cluster_object (
716
652
rc ,
717
653
mcad = mcad ,
718
- ingress_domain = ingress_domain ,
719
- ingress_options = ingress_options ,
720
654
write_to_file = write_to_file ,
721
655
verify_tls = verify_tls ,
722
656
)
@@ -739,24 +673,6 @@ def _delete_resources(
739
673
plural = "rayclusters" ,
740
674
name = name ,
741
675
)
742
- elif resource ["kind" ] == "Ingress" :
743
- name = resource ["metadata" ]["name" ]
744
- api_instance .delete_namespaced_custom_object (
745
- group = "networking.k8s.io" ,
746
- version = "v1" ,
747
- namespace = namespace ,
748
- plural = "ingresses" ,
749
- name = name ,
750
- )
751
- elif resource ["kind" ] == "Route" :
752
- name = resource ["metadata" ]["name" ]
753
- api_instance .delete_namespaced_custom_object (
754
- group = "route.openshift.io" ,
755
- version = "v1" ,
756
- namespace = namespace ,
757
- plural = "routes" ,
758
- name = name ,
759
- )
760
676
elif resource ["kind" ] == "Secret" :
761
677
name = resource ["metadata" ]["name" ]
762
678
secret_instance = client .CoreV1Api (api_config_handler ())
@@ -776,22 +692,6 @@ def _create_resources(yamls, namespace: str, api_instance: client.CustomObjectsA
776
692
plural = "rayclusters" ,
777
693
body = resource ,
778
694
)
779
- elif resource ["kind" ] == "Ingress" :
780
- api_instance .create_namespaced_custom_object (
781
- group = "networking.k8s.io" ,
782
- version = "v1" ,
783
- namespace = namespace ,
784
- plural = "ingresses" ,
785
- body = resource ,
786
- )
787
- elif resource ["kind" ] == "Route" :
788
- api_instance .create_namespaced_custom_object (
789
- group = "route.openshift.io" ,
790
- version = "v1" ,
791
- namespace = namespace ,
792
- plural = "routes" ,
793
- body = resource ,
794
- )
795
695
elif resource ["kind" ] == "Secret" :
796
696
secret_instance = client .CoreV1Api (api_config_handler ())
797
697
secret_instance .create_namespaced_secret (
0 commit comments