Skip to content

Commit d994331

Browse files
Remove local_interactive
1 parent 65e1905 commit d994331

File tree

11 files changed

+2
-196
lines changed

11 files changed

+2
-196
lines changed

docs/cluster-configuration.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -22,39 +22,11 @@ cluster = Cluster(ClusterConfiguration(
2222
image="quay.io/project-codeflare/ray:latest-py39-cu118", # Mandatory Field
2323
instascale=False, # Default False
2424
machine_types=["m5.xlarge", "g4dn.xlarge"],
25-
ingress_domain="example.com" # Default None, Mandatory for Vanilla Kubernetes Clusters - ingress_domain is ignored on OpenShift Clusters as a route is created.
26-
local_interactive=False, # Default False
2725
))
2826
```
29-
Note: On OpenShift, the `ingress_domain` is only required when `local_interactive` is enabled. - This may change soon.
3027

3128
Upon creating a cluster configuration with `mcad=True` an appwrapper will be created featuring the Ray Cluster and any Routes, Ingresses or Secrets that are needed to be created along side it.<br>
3229
From there a user can call `cluster.up()` and `cluster.down()` to create and remove the appwrapper thus creating and removing the Ray Cluster.
3330

3431
In cases where `mcad=False` a yaml file will be created with the individual Ray Cluster, Route/Ingress and Secret included.<br>
3532
The Ray Cluster and service will be created by KubeRay directly and the other components will be individually created.
36-
37-
## Ray Cluster Configuration in a Vanilla Kubernetes environment (Non-OpenShift)
38-
To create a Ray Cluster using the CodeFlare SDK in a Vanilla Kubernetes environment an `ingress_domain` must be passed in the Cluster Configuration.
39-
This is used for the creation of the Ray Dashboard and Client ingresses.
40-
41-
`ingress_options` can be passed to create a custom Ray Dashboard ingress, `ingress_domain` is still a required variable for the Client route/ingress.
42-
An example of `ingress_options` would look like this.
43-
44-
```
45-
ingress_options = {
46-
"ingresses": [
47-
{
48-
"ingressName": "<ingress_name>",
49-
"port": <port_number>,
50-
"pathType": "<path_type>",
51-
"path": "<path>",
52-
"host":"<host>",
53-
"annotations": {
54-
"foo": "bar",
55-
"foo": "bar",
56-
}
57-
}
58-
]
59-
}
60-
```

src/codeflare_sdk/cluster/cluster.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ def create_app_wrapper(self):
179179
mcad = self.config.mcad
180180
instance_types = self.config.machine_types
181181
env = self.config.envs
182-
local_interactive = self.config.local_interactive
183182
image_pull_secrets = self.config.image_pull_secrets
184183
dispatch_priority = self.config.dispatch_priority
185184
write_to_file = self.config.write_to_file
@@ -203,7 +202,6 @@ def create_app_wrapper(self):
203202
mcad=mcad,
204203
instance_types=instance_types,
205204
env=env,
206-
local_interactive=local_interactive,
207205
image_pull_secrets=image_pull_secrets,
208206
dispatch_priority=dispatch_priority,
209207
priority_val=priority_val,
@@ -479,13 +477,6 @@ def from_k8_cluster_object(
479477
verify_tls=True,
480478
):
481479
config_check()
482-
if (
483-
rc["metadata"]["annotations"]["sdk.codeflare.dev/local_interactive"]
484-
== "True"
485-
):
486-
local_interactive = True
487-
else:
488-
local_interactive = False
489480
machine_types = (
490481
rc["metadata"]["labels"]["orderedinstance"].split("_")
491482
if "orderedinstance" in rc["metadata"]["labels"]
@@ -526,19 +517,15 @@ def from_k8_cluster_object(
526517
image=rc["spec"]["workerGroupSpecs"][0]["template"]["spec"]["containers"][
527518
0
528519
]["image"],
529-
local_interactive=local_interactive,
530520
mcad=mcad,
531521
write_to_file=write_to_file,
532522
verify_tls=verify_tls,
533523
)
534524
return Cluster(cluster_config)
535525

536526
def local_client_url(self):
537-
if self.config.local_interactive == True:
538-
ingress_domain = _get_ingress_domain(self)
539-
return f"ray://{ingress_domain}"
540-
else:
541-
return "None"
527+
ingress_domain = _get_ingress_domain(self)
528+
return f"ray://{ingress_domain}"
542529

543530
def _component_resources_up(
544531
self, namespace: str, api_instance: client.CustomObjectsApi

src/codeflare_sdk/cluster/config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ class ClusterConfiguration:
4949
mcad: bool = False
5050
envs: dict = field(default_factory=dict)
5151
image: str = ""
52-
local_interactive: bool = False
5352
image_pull_secrets: list = field(default_factory=list)
5453
dispatch_priority: str = None
5554
write_to_file: bool = False

src/codeflare_sdk/templates/base-template.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ spec:
4040
apiVersion: ray.io/v1
4141
kind: RayCluster
4242
metadata:
43-
annotations:
44-
sdk.codeflare.dev/local_interactive: "False"
4543
labels:
4644
workload.codeflare.dev/appwrapper: "aw-kuberay"
4745
controller-tools.k8s.io: "1.0"

src/codeflare_sdk/utils/generate_yaml.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -277,14 +277,6 @@ def update_ca_secret(ca_secret_item, cluster_name, namespace):
277277
data["ca.key"], data["ca.crt"] = generate_cert.generate_ca_cert(365)
278278

279279

280-
def enable_local_interactive(resources): # pragma: no cover
281-
item = resources["resources"].get("GenericItems")[0]
282-
283-
item["generictemplate"]["metadata"]["annotations"][
284-
"sdk.codeflare.dev/local_interactive"
285-
] = "True"
286-
287-
288280
def del_from_list_by_name(l: list, target: typing.List[str]) -> list:
289281
return [x for x in l if x["name"] not in target]
290282

@@ -454,7 +446,6 @@ def generate_appwrapper(
454446
mcad: bool,
455447
instance_types: list,
456448
env,
457-
local_interactive: bool,
458449
image_pull_secrets: list,
459450
dispatch_priority: str,
460451
priority_val: int,
@@ -505,9 +496,6 @@ def generate_appwrapper(
505496
head_gpus,
506497
)
507498

508-
if local_interactive:
509-
enable_local_interactive(resources)
510-
511499
ca_secret_item = resources["resources"].get("GenericItems")[1]
512500
update_ca_secret(ca_secret_item, cluster_name, namespace)
513501

tests/test-case-bad.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ spec:
3232
apiVersion: ray.io/v1
3333
kind: RayCluster
3434
metadata:
35-
annotations:
36-
sdk.codeflare.dev/local_interactive: 'False'
3735
labels:
3836
workload.codeflare.dev/appwrapper: unit-test-cluster
3937
controller-tools.k8s.io: '1.0'

tests/test-case-no-mcad.yamls

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
apiVersion: ray.io/v1
33
kind: RayCluster
44
metadata:
5-
annotations:
6-
sdk.codeflare.dev/local_interactive: 'False'
75
labels:
86
controller-tools.k8s.io: '1.0'
97
kueue.x-k8s.io/queue-name: local-queue-default

tests/test-case-prio.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ spec:
3232
apiVersion: ray.io/v1
3333
kind: RayCluster
3434
metadata:
35-
annotations:
36-
sdk.codeflare.dev/local_interactive: 'False'
3735
labels:
3836
controller-tools.k8s.io: '1.0'
3937
workload.codeflare.dev/appwrapper: prio-test-cluster

tests/test-case.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ spec:
3131
apiVersion: ray.io/v1
3232
kind: RayCluster
3333
metadata:
34-
annotations:
35-
sdk.codeflare.dev/local_interactive: 'False'
3634
labels:
3735
controller-tools.k8s.io: '1.0'
3836
workload.codeflare.dev/appwrapper: unit-test-cluster

tests/test-default-appwrapper.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ spec:
2929
apiVersion: ray.io/v1
3030
kind: RayCluster
3131
metadata:
32-
annotations:
33-
sdk.codeflare.dev/local_interactive: 'False'
3432
labels:
3533
controller-tools.k8s.io: '1.0'
3634
workload.codeflare.dev/appwrapper: unit-test-default-cluster

0 commit comments

Comments
 (0)