Skip to content

Commit 430ff72

Browse files
committed
remove unused scheme and namespace
1 parent 20e5325 commit 430ff72

File tree

5 files changed

+0
-11
lines changed

5 files changed

+0
-11
lines changed

pkg/epp/controller/inferencemodel_reconciler.go

-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"fmt"
2222

2323
"k8s.io/apimachinery/pkg/api/errors"
24-
"k8s.io/apimachinery/pkg/runtime"
2524
"k8s.io/apimachinery/pkg/types"
2625
"k8s.io/client-go/tools/record"
2726
ctrl "sigs.k8s.io/controller-runtime"
@@ -36,7 +35,6 @@ import (
3635

3736
type InferenceModelReconciler struct {
3837
client.Client
39-
Scheme *runtime.Scheme
4038
Record record.EventRecorder
4139
Datastore datastore.Datastore
4240
PoolNamespacedName types.NamespacedName

pkg/epp/controller/inferencemodel_reconciler_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ func TestInferenceModelReconciler(t *testing.T) {
193193
datastore := datastore.NewFakeDatastore(nil, test.modelsInStore, pool)
194194
reconciler := &InferenceModelReconciler{
195195
Client: fakeClient,
196-
Scheme: scheme,
197196
Record: record.NewFakeRecorder(10),
198197
Datastore: datastore,
199198
PoolNamespacedName: types.NamespacedName{Name: pool.Name, Namespace: pool.Namespace},

pkg/epp/controller/inferencepool_reconciler.go

-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"reflect"
2222

2323
"k8s.io/apimachinery/pkg/api/errors"
24-
"k8s.io/apimachinery/pkg/runtime"
2524
"k8s.io/apimachinery/pkg/types"
2625
"k8s.io/client-go/tools/record"
2726
ctrl "sigs.k8s.io/controller-runtime"
@@ -37,7 +36,6 @@ import (
3736
// will have the proper controller that will create/manage objects on behalf of the server pool.
3837
type InferencePoolReconciler struct {
3938
client.Client
40-
Scheme *runtime.Scheme
4139
Record record.EventRecorder
4240
PoolNamespacedName types.NamespacedName
4341
Datastore datastore.Datastore

pkg/epp/controller/pod_reconciler.go

-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ import (
3434
type PodReconciler struct {
3535
client.Client
3636
Datastore datastore.Datastore
37-
// namespace of the InferencePool
38-
// we donot support cross namespace pod selection
39-
Namespace string
4037
Record record.EventRecorder
4138
}
4239

pkg/epp/server/runserver.go

-3
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ func (r *ExtProcServerRunner) SetupWithManager(ctx context.Context, mgr ctrl.Man
8989
// Create the controllers and register them with the manager
9090
if err := (&controller.InferencePoolReconciler{
9191
Datastore: r.Datastore,
92-
Scheme: mgr.GetScheme(),
9392
Client: mgr.GetClient(),
9493
PoolNamespacedName: types.NamespacedName{
9594
Name: r.PoolName,
@@ -102,7 +101,6 @@ func (r *ExtProcServerRunner) SetupWithManager(ctx context.Context, mgr ctrl.Man
102101

103102
if err := (&controller.InferenceModelReconciler{
104103
Datastore: r.Datastore,
105-
Scheme: mgr.GetScheme(),
106104
Client: mgr.GetClient(),
107105
PoolNamespacedName: types.NamespacedName{
108106
Name: r.PoolName,
@@ -116,7 +114,6 @@ func (r *ExtProcServerRunner) SetupWithManager(ctx context.Context, mgr ctrl.Man
116114
if err := (&controller.PodReconciler{
117115
Datastore: r.Datastore,
118116
Client: mgr.GetClient(),
119-
Namespace: r.PoolNamespace,
120117
Record: mgr.GetEventRecorderFor("pod"),
121118
}).SetupWithManager(mgr); err != nil {
122119
return fmt.Errorf("failed setting up EndpointSliceReconciler: %v", err)

0 commit comments

Comments
 (0)