Skip to content

Commit a7eb784

Browse files
authored
feat: add owns to gpunode controller (#40)
1 parent 2fa2dee commit a7eb784

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

internal/controller/gpunode_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,5 +305,6 @@ func (r *GPUNodeReconciler) SetupWithManager(mgr ctrl.Manager) error {
305305
For(&tfv1.GPUNode{}).
306306
Named("gpunode").
307307
Owns(&corev1.Node{}).
308+
Owns(&batchv1.Job{}).
308309
Complete(r)
309310
}

internal/controller/gpupool_controller.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import (
2424
tfv1 "github.com/NexusGPU/tensor-fusion-operator/api/v1"
2525
"github.com/NexusGPU/tensor-fusion-operator/internal/config"
2626
utils "github.com/NexusGPU/tensor-fusion-operator/internal/utils"
27-
batchv1 "k8s.io/api/batch/v1"
2827
"k8s.io/apimachinery/pkg/api/errors"
2928
"k8s.io/apimachinery/pkg/api/resource"
3029
"k8s.io/apimachinery/pkg/runtime"
@@ -175,6 +174,5 @@ func (r *GPUPoolReconciler) SetupWithManager(mgr ctrl.Manager) error {
175174
return ctrl.NewControllerManagedBy(mgr).
176175
For(&tfv1.GPUPool{}, builder.WithPredicates(predicate.GenerationChangedPredicate{})).
177176
Named("gpupool").
178-
Owns(&batchv1.Job{}).
179177
Complete(r)
180178
}

0 commit comments

Comments
 (0)