Skip to content

Commit bde2de5

Browse files
authored
move utils from internal to pkg (#63)
1 parent a978538 commit bde2de5

File tree

7 files changed

+7
-9
lines changed

7 files changed

+7
-9
lines changed

internal/controller/appwrapper/appwrapper_controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ import (
4141
utilmaps "sigs.k8s.io/kueue/pkg/util/maps"
4242

4343
workloadv1beta2 "github.com/project-codeflare/appwrapper/api/v1beta2"
44-
"github.com/project-codeflare/appwrapper/internal/utils"
4544
"github.com/project-codeflare/appwrapper/pkg/config"
45+
"github.com/project-codeflare/appwrapper/pkg/utils"
4646
)
4747

4848
const (

internal/controller/appwrapper/appwrapper_controller_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ import (
3030

3131
workloadv1beta2 "github.com/project-codeflare/appwrapper/api/v1beta2"
3232
"github.com/project-codeflare/appwrapper/internal/controller/workload"
33-
"github.com/project-codeflare/appwrapper/internal/utils"
3433
"github.com/project-codeflare/appwrapper/pkg/config"
34+
"github.com/project-codeflare/appwrapper/pkg/utils"
3535
)
3636

3737
var _ = Describe("AppWrapper Controller", func() {

internal/controller/workload/child_admission_controller.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ import (
3636
)
3737

3838
const (
39-
AppWrapperLabel = "workload.codeflare.dev/appwrapper"
40-
AppWrapperFinalizer = "workload.codeflare.dev/finalizer"
41-
childJobQueueName = "workload.codeflare.dev.admitted"
39+
childJobQueueName = "workload.codeflare.dev.admitted"
4240
)
4341

4442
// ChildWorkloadReconciler reconciles the admission status of an AppWrapper's child workloads
@@ -66,7 +64,7 @@ func (r *ChildWorkloadReconciler) Reconcile(ctx context.Context, req ctrl.Reques
6664
return ctrl.Result{}, nil
6765
}
6866

69-
// One reason for not being Running but not PodsReady is that a child was suspended on creation by Kueue. Rectify that.
67+
// One reason for being Running but not PodsReady is that a child was suspended on creation by Kueue. Rectify that.
7068
if aw.Status.Phase == workloadv1beta2.AppWrapperRunning && !meta.IsStatusConditionTrue(aw.Status.Conditions, string(workloadv1beta2.PodsReady)) {
7169
admittedChildren := 0
7270
childrenWithPods := 0

internal/controller/workload/workload_controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
"sigs.k8s.io/kueue/pkg/podset"
3232

3333
workloadv1beta2 "github.com/project-codeflare/appwrapper/api/v1beta2"
34-
"github.com/project-codeflare/appwrapper/internal/utils"
34+
"github.com/project-codeflare/appwrapper/pkg/utils"
3535
)
3636

3737
// +kubebuilder:rbac:groups=scheduling.k8s.io,resources=priorityclasses,verbs=list;get;watch

internal/webhook/appwrapper_webhook.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ import (
4040

4141
workloadv1beta2 "github.com/project-codeflare/appwrapper/api/v1beta2"
4242
wlc "github.com/project-codeflare/appwrapper/internal/controller/workload"
43-
"github.com/project-codeflare/appwrapper/internal/utils"
4443
"github.com/project-codeflare/appwrapper/pkg/config"
44+
"github.com/project-codeflare/appwrapper/pkg/utils"
4545
)
4646

4747
type AppWrapperWebhook struct {
File renamed without changes.

test/e2e/util_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import (
4141

4242
workloadv1beta2 "github.com/project-codeflare/appwrapper/api/v1beta2"
4343
"github.com/project-codeflare/appwrapper/internal/controller/appwrapper"
44-
"github.com/project-codeflare/appwrapper/internal/utils"
44+
"github.com/project-codeflare/appwrapper/pkg/utils"
4545
)
4646

4747
const (

0 commit comments

Comments
 (0)