@@ -23,12 +23,9 @@ import (
2323
2424 gonanoid "github.com/matoous/go-nanoid/v2"
2525 gomega "github.com/onsi/gomega"
26- awv1beta2 "github.com/project-codeflare/appwrapper/api/v1beta2"
2726 rayv1 "github.com/ray-project/kuberay/ray-operator/apis/ray/v1"
2827
2928 v1 "k8s.io/api/core/v1"
30- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
31- "k8s.io/apimachinery/pkg/runtime"
3229
3330 "github.com/opendatahub-io/distributed-workloads/tests/common/support"
3431)
@@ -87,72 +84,3 @@ func uniqueSuffix(prefix string) string {
8784 suffix := gonanoid .MustGenerate ("1234567890abcdef" , 4 )
8885 return prefix + "-" + suffix
8986}
90-
91- func newAppWrapperWithRayCluster (awName string , rcName string , namespace string ) * awv1beta2.AppWrapper {
92- return & awv1beta2.AppWrapper {
93- TypeMeta : metav1.TypeMeta {
94- APIVersion : "workload.codeflare.dev/v1beta2" ,
95- Kind : "AppWrapper" ,
96- },
97- ObjectMeta : metav1.ObjectMeta {
98- Name : awName ,
99- Namespace : namespace ,
100- },
101- Spec : awv1beta2.AppWrapperSpec {
102- Components : []awv1beta2.AppWrapperComponent {
103- {
104- Template : runtime.RawExtension {
105- Object : & rayv1.RayCluster {
106- TypeMeta : metav1.TypeMeta {
107- APIVersion : "ray.io/v1" ,
108- Kind : "RayCluster" ,
109- },
110- ObjectMeta : metav1.ObjectMeta {
111- Name : rcName ,
112- Namespace : namespace ,
113- },
114- Spec : rayv1.RayClusterSpec {
115- HeadGroupSpec : rayv1.HeadGroupSpec {
116- RayStartParams : map [string ]string {},
117- Template : v1.PodTemplateSpec {
118- Spec : v1.PodSpec {
119- Containers : []v1.Container {
120- {
121- Name : "ray-head" ,
122- Image : "rayproject/ray:latest" ,
123- Ports : []v1.ContainerPort {
124- {
125- Name : "redis" ,
126- ContainerPort : 6379 ,
127- },
128- },
129- },
130- },
131- },
132- },
133- },
134- WorkerGroupSpecs : []rayv1.WorkerGroupSpec {
135- {
136- GroupName : "workers" ,
137- Replicas : support .Ptr (int32 (1 )),
138- RayStartParams : map [string ]string {},
139- Template : v1.PodTemplateSpec {
140- Spec : v1.PodSpec {
141- Containers : []v1.Container {
142- {
143- Name : "ray-worker" ,
144- Image : "rayproject/ray:latest" ,
145- },
146- },
147- },
148- },
149- },
150- },
151- },
152- },
153- },
154- },
155- },
156- },
157- }
158- }
0 commit comments