@@ -188,7 +188,6 @@ def create_app_wrapper(self):
188
188
image_pull_secrets = self .config .image_pull_secrets
189
189
dispatch_priority = self .config .dispatch_priority
190
190
ingress_domain = self .config .ingress_domain
191
- # ingress_options = self.config.ingress_options
192
191
write_to_file = self .config .write_to_file
193
192
verify_tls = self .config .verify_tls
194
193
return generate_appwrapper (
@@ -214,7 +213,6 @@ def create_app_wrapper(self):
214
213
dispatch_priority = dispatch_priority ,
215
214
priority_val = priority_val ,
216
215
ingress_domain = ingress_domain ,
217
- # ingress_options=ingress_options,
218
216
write_to_file = write_to_file ,
219
217
verify_tls = verify_tls ,
220
218
)
@@ -553,7 +551,6 @@ def from_k8_cluster_object(
553
551
local_interactive = local_interactive ,
554
552
mcad = mcad ,
555
553
ingress_domain = ingress_domain ,
556
- # ingress_options=ingress_options,
557
554
write_to_file = write_to_file ,
558
555
verify_tls = verify_tls ,
559
556
)
@@ -661,7 +658,6 @@ def get_cluster(
661
658
if rc ["metadata" ]["name" ] == cluster_name :
662
659
mcad = _check_aw_exists (cluster_name , namespace )
663
660
ingress_host = None
664
- # ingress_options = {}
665
661
if not is_openshift_cluster ():
666
662
try :
667
663
config_check ()
@@ -674,36 +670,6 @@ def get_cluster(
674
670
and ingress .metadata .labels ["ingress-owner" ] == cluster_name
675
671
):
676
672
ingress_host = ingress .spec .rules [0 ].host
677
- # if (
678
- # "ingress-options" in ingress.metadata.labels
679
- # and ingress.metadata.labels["ingress-options"] == "true"
680
- # ):
681
- # ingress_name = ingress.metadata.name
682
- # port = (
683
- # ingress.spec.rules[0]
684
- # .http.paths[0]
685
- # .backend.service.port.number
686
- # )
687
- # annotations = ingress.metadata.annotations
688
- # path = ingress.spec.rules[0].http.paths[0].path
689
- # ingress_class_name = ingress.spec.ingress_class_name
690
- # path_type = (
691
- # ingress.spec.rules[0].http.paths[0].path_type
692
- # )
693
-
694
- # ingress_options = {
695
- # "ingresses": [
696
- # {
697
- # "ingressName": ingress_name,
698
- # "port": port,
699
- # "annotations": annotations,
700
- # "ingressClassName": ingress_class_name,
701
- # "pathType": path_type,
702
- # "path": path,
703
- # "host": ingress_host,
704
- # }
705
- # ]
706
- # }
707
673
except Exception as e : # pragma: no cover
708
674
return _kube_api_error_handling (e )
709
675
# We gather the ingress domain from the host
@@ -715,7 +681,6 @@ def get_cluster(
715
681
rc ,
716
682
mcad = mcad ,
717
683
ingress_domain = ingress_domain ,
718
- # ingress_options=ingress_options,
719
684
write_to_file = write_to_file ,
720
685
verify_tls = verify_tls ,
721
686
)
@@ -738,24 +703,6 @@ def _delete_resources(
738
703
plural = "rayclusters" ,
739
704
name = name ,
740
705
)
741
- # elif resource["kind"] == "Ingress":
742
- # name = resource["metadata"]["name"]
743
- # api_instance.delete_namespaced_custom_object(
744
- # group="networking.k8s.io",
745
- # version="v1",
746
- # namespace=namespace,
747
- # plural="ingresses",
748
- # name=name,
749
- # )
750
- # elif resource["kind"] == "Route":
751
- # name = resource["metadata"]["name"]
752
- # api_instance.delete_namespaced_custom_object(
753
- # group="route.openshift.io",
754
- # version="v1",
755
- # namespace=namespace,
756
- # plural="routes",
757
- # name=name,
758
- # )
759
706
elif resource ["kind" ] == "Secret" :
760
707
name = resource ["metadata" ]["name" ]
761
708
secret_instance = client .CoreV1Api (api_config_handler ())
@@ -775,22 +722,6 @@ def _create_resources(yamls, namespace: str, api_instance: client.CustomObjectsA
775
722
plural = "rayclusters" ,
776
723
body = resource ,
777
724
)
778
- # elif resource["kind"] == "Ingress":
779
- # api_instance.create_namespaced_custom_object(
780
- # group="networking.k8s.io",
781
- # version="v1",
782
- # namespace=namespace,
783
- # plural="ingresses",
784
- # body=resource,
785
- # )
786
- # elif resource["kind"] == "Route":
787
- # api_instance.create_namespaced_custom_object(
788
- # group="route.openshift.io",
789
- # version="v1",
790
- # namespace=namespace,
791
- # plural="routes",
792
- # body=resource,
793
- # )
794
725
elif resource ["kind" ] == "Secret" :
795
726
secret_instance = client .CoreV1Api (api_config_handler ())
796
727
secret_instance .create_namespaced_secret (
0 commit comments