Skip to content

Commit 605323e

Browse files
committed
Rebase and resolve conflict with main and update-lmevaljob-pod branches
Signed-off-by: ted chang <[email protected]>
1 parent fc44ba3 commit 605323e

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

controllers/job_mgr/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ When Job Manager is an enabled service LMevalJob requires `kueue.x-k8s.io/queue-
129129
```
130130
Start the controller locally:
131131
```bash
132+
# This file is needed to run controller outside of container
133+
echo -n "default">/var/run/secrets/kubernetes.io/serviceaccount/namespace
132134
ENABLED_SERVICES=LMES,JOB_MGR make run
133135
```
134136
Verify logs

controllers/lmes/lmevaljob_controller_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ func Test_ManagedPVC(t *testing.T) {
10501050
},
10511051
}
10521052

1053-
newPod := createPod(svcOpts, job, log)
1053+
newPod := CreatePod(svcOpts, job, log)
10541054

10551055
assert.Equal(t, expect, newPod)
10561056
}
@@ -1166,7 +1166,7 @@ func Test_ExistingPVC(t *testing.T) {
11661166
},
11671167
}
11681168

1169-
newPod := createPod(svcOpts, job, log)
1169+
newPod := CreatePod(svcOpts, job, log)
11701170

11711171
assert.Equal(t, expect, newPod)
11721172
}
@@ -1305,7 +1305,7 @@ func Test_PVCPreference(t *testing.T) {
13051305
},
13061306
}
13071307

1308-
newPod := createPod(svcOpts, job, log)
1308+
newPod := CreatePod(svcOpts, job, log)
13091309

13101310
assert.Equal(t, expect, newPod)
13111311
}
@@ -1480,7 +1480,7 @@ func Test_OfflineMode(t *testing.T) {
14801480
},
14811481
}
14821482

1483-
newPod := createPod(svcOpts, job, log)
1483+
newPod := CreatePod(svcOpts, job, log)
14841484

14851485
assert.Equal(t, expect, newPod)
14861486
}
@@ -1644,7 +1644,7 @@ func Test_OfflineModeWithOutput(t *testing.T) {
16441644
},
16451645
}
16461646

1647-
newPod := createPod(svcOpts, job, log)
1647+
newPod := CreatePod(svcOpts, job, log)
16481648

16491649
assert.Equal(t, expect, newPod)
16501650
}

controllers/lmes/storage.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func generateMagedPVCResource(job *lmesv1alpha1.LMEvalJob) *corev1.PersistentVol
3030
AccessModes: []corev1.PersistentVolumeAccessMode{
3131
corev1.ReadWriteOnce,
3232
},
33-
Resources: corev1.ResourceRequirements{
33+
Resources: corev1.VolumeResourceRequirements{
3434
Requests: corev1.ResourceList{
3535
corev1.ResourceStorage: resource.MustParse(job.Spec.Outputs.PersistentVolumeClaimManaged.Size),
3636
},

controllers/tas/statuses_test.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66

77
. "github.com/onsi/ginkgo/v2"
88
. "github.com/onsi/gomega"
9+
routev1 "github.com/openshift/api/route/v1"
910
trustyaiopendatahubiov1alpha1 "github.com/trustyai-explainability/trustyai-service-operator/api/tas/v1alpha1"
1011
corev1 "k8s.io/api/core/v1"
1112
"k8s.io/apimachinery/pkg/types"
@@ -51,7 +52,10 @@ func setupAndTestStatusNoComponent(instance *trustyaiopendatahubiov1alpha1.Trust
5152
var _ = Describe("Status and condition tests", func() {
5253

5354
BeforeEach(func() {
54-
k8sClient = fake.NewClientBuilder().WithScheme(scheme.Scheme).Build()
55+
k8sClient = fake.NewClientBuilder().WithScheme(scheme.Scheme).WithStatusSubresource(
56+
&routev1.Route{},
57+
&trustyaiopendatahubiov1alpha1.TrustyAIService{},
58+
).Build()
5559
recorder = record.NewFakeRecorder(10)
5660
reconciler = &TrustyAIServiceReconciler{
5761
Client: k8sClient,

0 commit comments

Comments
 (0)