Skip to content

Commit c807226

Browse files
committed
ObjRef name update
1 parent 888d0d0 commit c807226

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

api/v1alpha1/inferencemodel_types.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ type InferenceModelSpec struct {
6666
// Reference to the poolIt must exist in the same namespace.
6767
//
6868
// +kubebuilder:validation:Required
69-
PoolRef *LocalObjectReference `json:"poolRef,omitempty"`
69+
PoolRef *PoolObjectReference `json:"poolRef,omitempty"`
7070
}
7171

72-
// LocalObjectReference identifies an API object within the namespace of the
72+
// PoolObjectReference identifies an API object within the namespace of the
7373
// referrer.
74-
type LocalObjectReference struct {
74+
type PoolObjectReference struct {
7575
// Group is the group of the referent.
7676
//
7777
// +optional
@@ -93,6 +93,7 @@ type LocalObjectReference struct {
9393
//
9494
// +kubebuilder:validation:MinLength=1
9595
// +kubebuilder:validation:MaxLength=253
96+
// +kubebuilder:validation:Required
9697
Name string `json:"name,omitempty"`
9798
}
9899

pkg/ext-proc/backend/inferencemodel_reconciler_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var (
1212
service1 = &v1alpha1.InferenceModel{
1313
Spec: v1alpha1.InferenceModelSpec{
1414
ModelName: "fake model1",
15-
PoolRef: &v1alpha1.LocalObjectReference{Name: "test-pool"},
15+
PoolRef: &v1alpha1.PoolObjectReference{Name: "test-pool"},
1616
},
1717
ObjectMeta: metav1.ObjectMeta{
1818
Name: "test-service",
@@ -21,7 +21,7 @@ var (
2121
service1Modified = &v1alpha1.InferenceModel{
2222
Spec: v1alpha1.InferenceModelSpec{
2323
ModelName: "fake model1",
24-
PoolRef: &v1alpha1.LocalObjectReference{Name: "test-poolio"},
24+
PoolRef: &v1alpha1.PoolObjectReference{Name: "test-poolio"},
2525
},
2626
ObjectMeta: metav1.ObjectMeta{
2727
Name: "test-service",
@@ -30,7 +30,7 @@ var (
3030
service2 = &v1alpha1.InferenceModel{
3131
Spec: v1alpha1.InferenceModelSpec{
3232
ModelName: "fake model",
33-
PoolRef: &v1alpha1.LocalObjectReference{Name: "test-pool"},
33+
PoolRef: &v1alpha1.PoolObjectReference{Name: "test-pool"},
3434
},
3535
ObjectMeta: metav1.ObjectMeta{
3636
Name: "test-service-2",
@@ -96,7 +96,7 @@ func TestUpdateDatastore_InferenceModelReconciler(t *testing.T) {
9696
incomingService: &v1alpha1.InferenceModel{
9797
Spec: v1alpha1.InferenceModelSpec{
9898
ModelName: "fake model",
99-
PoolRef: &v1alpha1.LocalObjectReference{Name: "test-poolio"},
99+
PoolRef: &v1alpha1.PoolObjectReference{Name: "test-poolio"},
100100
},
101101
ObjectMeta: metav1.ObjectMeta{
102102
Name: "unrelated-service",

0 commit comments

Comments
 (0)