Repository: kubernetes-sigs/kueue
Pull request #219 (2022-04-13 18:43:03)

Rename apis/core package to apis/kueue
#### What type of PR is this?

/kind cleanup

#### What this PR does / why we need it:

This is necessary to play well with kubebuilder

#### Which issue(s) this PR fixes:

Part of #171 

#### Special notes for your reviewer:




Patch:
diff --git a/.github/ISSUE_TEMPLATE/NEW_RELEASE.md b/.github/ISSUE_TEMPLATE/NEW_RELEASE.md
index e8d66667e..f2e82b24a 100644
--- a/.github/ISSUE_TEMPLATE/NEW_RELEASE.md
+++ b/.github/ISSUE_TEMPLATE/NEW_RELEASE.md
@@ -18,35 +18,31 @@ Please do not remove items from the checklist
   - [ ] An OWNER pushes the new release branch with
         `git push release-$MAJ.$MIN`
 - [ ] Update things like README, deployment templates, docs, configuration, test/e2e flags.
-      Submit a PR against the release branch: <!-- example #211 #214 -->
-- [ ] An OWNER [prepares a draft release](https://github.com/kubernetes-sigs/kueue/releases)
+      Submit a PR against the release branch.
+- An OWNER prepares a draft release
+  - [ ] Create a draft release at [Github releases page](https://github.com/kubernetes-sigs/kueue/releases).
   - [ ] Write the change log into the draft release.
   - [ ] Run
       `make artifacts IMAGE_REGISTRY=k8s.gcr.io/kueue GIT_TAG=$VERSION`
       to generate the artifacts and upload the files in the `artifacts` folder
       to the draft release.
-- [ ] An OWNER creates a signed tag running
+- [ ] An OWNER runs
      `git tag -s $VERSION`
       and inserts the changelog into the tag description.
-      To perform this step, you need [a PGP key registered on github](https://docs.github.com/en/authentication/managing-commit-signature-verification/checking-for-existing-gpg-keys).
 - [ ] An OWNER pushes the tag with
       `git push $VERSION`
   - Triggers prow to build and publish a staging container image
       `gcr.io/k8s-staging-kueue/kueue:$VERSION`
-- [ ] Submit a PR against [k8s.io](https://github.com/kubernetes/k8s.io), 
-      updating `k8s.gcr.io/images/k8s-staging-kueue/images.yaml` to
-      [promote the container images](https://github.com/kubernetes/k8s.io/tree/main/k8s.gcr.io#image-promoter)
-      to production: <!-- example kubernetes/k8s.io#3612-->
+- [ ] Submit a PR against [k8s.io](https://github.com/kubernetes/k8s.io), updating `k8s.gcr.io/images/k8s-staging-kueue/images.yaml` to [promote the container images](https://github.com/kubernetes/k8s.io/tree/main/k8s.gcr.io#image-promoter) to production.
 - [ ] Wait for the PR to be merged and verify that the image `k8s.gcr.io/kueue/kueue:$VERSION` is available.
 - [ ] Publish the draft release prepared at the [Github releases page](https://github.com/kubernetes-sigs/kueue/releases).
-- [ ] Add a link to the tagged release in this issue: <!-- example https://github.com/kubernetes-sigs/kueue/releases/tag/v0.1.0 -->
+- [ ] Add a link to the tagged release in this issue.
 - [ ] Send an announcement email to `sig-scheduling@kubernetes.io` and `wg-batch@kubernetes.io` with the subject `[ANNOUNCE] kueue $VERSION is released`
-- [ ] Add a link to the release announcement in this issue: <!-- example https://groups.google.com/a/kubernetes.io/g/wg-batch/c/-gZOrSnwDV4 -->
-- [ ] For a major or minor release, update `README.md` and `docs/setup/install.md`
-      in `main` branch: <!-- example #215 -->
-- [ ] For a major or minor release, create an unannotated _devel_ tag in the
-      `main` branch, on the first commit that gets merged after the release
-       branch has been created (presumably the README update commit above), and, push the tag:
+- [ ] Add a link to the release announcement in this issue.
+- [ ] For a major or minor release, update `docs/setup/install.md` in `main` branch.
+  - [ ] Update references on deployment yamls.
+  - [ ] Wait for the PR to be merged.
+- [ ] For a major release, create an unannotated _devel_ tag in the `main` branch, on the first commit that gets merged after the release branch has been created (presumably the README update commit above), and, push the tag:
       `DEVEL=v0.$(($MAJ+1)).0-devel; git tag $DEVEL main && git push $DEVEL`
       This ensures that the devel builds on the `main` branch will have a meaningful version number.
 - [ ] Close this issue
diff --git a/PROJECT b/PROJECT
index bab428bcb..3e9fd530a 100644
--- a/PROJECT
+++ b/PROJECT
@@ -12,7 +12,7 @@ resources:
   domain: x-k8s.io
   group: kueue
   kind: Queue
-  path: sigs.k8s.io/kueue/api/v1alpha1
+  path: sigs.k8s.io/kueue/apis/kueue/v1alpha1
   version: v1alpha1
 - api:
     crdVersion: v1
@@ -20,7 +20,7 @@ resources:
   domain: x-k8s.io
   group: kueue
   kind: ClusterQueue
-  path: sigs.k8s.io/kueue/api/v1alpha1
+  path: sigs.k8s.io/kueue/apis/kueue/v1alpha1
   version: v1alpha1
 - api:
     crdVersion: v1
@@ -29,18 +29,18 @@ resources:
   domain: x-k8s.io
   group: kueue
   kind: Workload
-  path: sigs.k8s.io/kueue/api/v1alpha1
+  path: sigs.k8s.io/kueue/apis/kueue/v1alpha1
   version: v1alpha1
 - api:
     crdVersion: v1
   domain: x-k8s.io
   group: kueue
   kind: ResourceFlavor
-  path: sigs.k8s.io/kueue/api/v1alpha1
+  path: sigs.k8s.io/kueue/apis/kueue/v1alpha1
   version: v1alpha1
 - api:
     crdVersion: v1
-  domain: x-k8s.io
+  domain: kueue.x-k8s.io
   group: config
   kind: KueueConfiguration
   path: sigs.k8s.io/kueue/apis/config/v1alpha1
diff --git a/apis/core/v1alpha1/clusterqueue_types.go b/apis/kueue/v1alpha1/clusterqueue_types.go
similarity index 100%
rename from apis/core/v1alpha1/clusterqueue_types.go
rename to apis/kueue/v1alpha1/clusterqueue_types.go
diff --git a/apis/core/v1alpha1/groupversion_info.go b/apis/kueue/v1alpha1/groupversion_info.go
similarity index 100%
rename from apis/core/v1alpha1/groupversion_info.go
rename to apis/kueue/v1alpha1/groupversion_info.go
diff --git a/apis/core/v1alpha1/queue_types.go b/apis/kueue/v1alpha1/queue_types.go
similarity index 100%
rename from apis/core/v1alpha1/queue_types.go
rename to apis/kueue/v1alpha1/queue_types.go
diff --git a/apis/core/v1alpha1/resourceflavor_types.go b/apis/kueue/v1alpha1/resourceflavor_types.go
similarity index 100%
rename from apis/core/v1alpha1/resourceflavor_types.go
rename to apis/kueue/v1alpha1/resourceflavor_types.go
diff --git a/apis/core/v1alpha1/workload_types.go b/apis/kueue/v1alpha1/workload_types.go
similarity index 100%
rename from apis/core/v1alpha1/workload_types.go
rename to apis/kueue/v1alpha1/workload_types.go
diff --git a/apis/core/v1alpha1/zz_generated.deepcopy.go b/apis/kueue/v1alpha1/zz_generated.deepcopy.go
similarity index 100%
rename from apis/core/v1alpha1/zz_generated.deepcopy.go
rename to apis/kueue/v1alpha1/zz_generated.deepcopy.go
diff --git a/main.go b/main.go
index 508dfae21..e7877497e 100644
--- a/main.go
+++ b/main.go
@@ -36,7 +36,7 @@ import (
 	"sigs.k8s.io/controller-runtime/pkg/log/zap"
 
 	configv1alpha1 "sigs.k8s.io/kueue/apis/config/v1alpha1"
-	kueuev1alpha1 "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueuev1alpha1 "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/cache"
 	"sigs.k8s.io/kueue/pkg/constants"
 	"sigs.k8s.io/kueue/pkg/controller/core"
diff --git a/pkg/cache/cache.go b/pkg/cache/cache.go
index 669cb1466..2554c750c 100644
--- a/pkg/cache/cache.go
+++ b/pkg/cache/cache.go
@@ -28,7 +28,7 @@ import (
 	"k8s.io/apimachinery/pkg/util/sets"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/util/pointer"
 	"sigs.k8s.io/kueue/pkg/workload"
 )
diff --git a/pkg/cache/snapshot.go b/pkg/cache/snapshot.go
index 7b85be048..e82239824 100644
--- a/pkg/cache/snapshot.go
+++ b/pkg/cache/snapshot.go
@@ -17,7 +17,7 @@ limitations under the License.
 package cache
 
 import (
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/workload"
 )
 
diff --git a/pkg/controller/core/clusterqueue_controller.go b/pkg/controller/core/clusterqueue_controller.go
index c87f3230e..b8311f94f 100644
--- a/pkg/controller/core/clusterqueue_controller.go
+++ b/pkg/controller/core/clusterqueue_controller.go
@@ -33,7 +33,7 @@ import (
 	"sigs.k8s.io/controller-runtime/pkg/source"
 	"sigs.k8s.io/kueue/pkg/queue"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/cache"
 )
 
diff --git a/pkg/controller/core/queue_controller.go b/pkg/controller/core/queue_controller.go
index 1c5f88a22..722ca9e47 100644
--- a/pkg/controller/core/queue_controller.go
+++ b/pkg/controller/core/queue_controller.go
@@ -31,7 +31,7 @@ import (
 	"sigs.k8s.io/controller-runtime/pkg/source"
 	"sigs.k8s.io/kueue/pkg/constants"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/queue"
 )
 
diff --git a/pkg/controller/core/resourceflavor_controller.go b/pkg/controller/core/resourceflavor_controller.go
index 214d838f3..8fb51ab35 100644
--- a/pkg/controller/core/resourceflavor_controller.go
+++ b/pkg/controller/core/resourceflavor_controller.go
@@ -24,7 +24,7 @@ import (
 	ctrl "sigs.k8s.io/controller-runtime"
 	"sigs.k8s.io/controller-runtime/pkg/event"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/cache"
 )
 
diff --git a/pkg/controller/core/workload_controller.go b/pkg/controller/core/workload_controller.go
index 8db5690bf..643ae9265 100644
--- a/pkg/controller/core/workload_controller.go
+++ b/pkg/controller/core/workload_controller.go
@@ -27,7 +27,7 @@ import (
 	"sigs.k8s.io/controller-runtime/pkg/client"
 	"sigs.k8s.io/controller-runtime/pkg/event"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/cache"
 	"sigs.k8s.io/kueue/pkg/queue"
 	"sigs.k8s.io/kueue/pkg/workload"
@@ -80,22 +80,17 @@ func (r *WorkloadReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c
 
 	status := workloadStatus(&wl)
 	if status == pending && !r.queues.QueueForWorkloadExists(&wl) {
-		err := workload.UpdateStatusIfChanged(ctx, r.client, &wl, kueue.WorkloadAdmitted, corev1.ConditionFalse,
+		err := workload.UpdateWorkloadStatusIfChanged(ctx, r.client, &wl, kueue.WorkloadAdmitted, corev1.ConditionFalse,
 			"Inadmissible", fmt.Sprintf("Queue %s doesn't exist", wl.Spec.QueueName))
 		return ctrl.Result{}, client.IgnoreNotFound(err)
 	}
 	cqName, cqOk := r.queues.ClusterQueueForWorkload(&wl)
 	if status == pending && !cqOk {
-		err := workload.UpdateStatusIfChanged(ctx, r.client, &wl, kueue.WorkloadAdmitted, corev1.ConditionFalse,
+		err := workload.UpdateWorkloadStatusIfChanged(ctx, r.client, &wl, kueue.WorkloadAdmitted, corev1.ConditionFalse,
 			"Inadmissible", fmt.Sprintf("ClusterQueue %s doesn't exist", cqName))
 		return ctrl.Result{}, client.IgnoreNotFound(err)
 	}
 
-	if status == admitted {
-		err := workload.UpdateStatusIfChanged(ctx, r.client, &wl, kueue.WorkloadAdmitted, corev1.ConditionTrue, "", "")
-		return ctrl.Result{}, client.IgnoreNotFound(err)
-	}
-
 	return ctrl.Result{}, nil
 }
 
@@ -159,7 +154,6 @@ func (r *WorkloadReconciler) Update(e event.UpdateEvent) bool {
 	wl := e.ObjectNew.(*kueue.Workload)
 	defer r.notifyWatchers(oldWl)
 	defer r.notifyWatchers(wl)
-
 	status := workloadStatus(wl)
 	log := r.log.WithValues("workload", klog.KObj(wl), "queue", wl.Spec.QueueName, "status", status)
 	prevQueue := oldWl.Spec.QueueName
@@ -241,7 +235,7 @@ func (r *WorkloadReconciler) SetupWithManager(mgr ctrl.Manager) error {
 }
 
 func workloadStatus(w *kueue.Workload) string {
-	if workload.InCondition(w, kueue.WorkloadFinished) {
+	if workloadFinished(w) {
 		return finished
 	}
 	if w.Spec.Admission != nil {
@@ -249,3 +243,12 @@ func workloadStatus(w *kueue.Workload) string {
 	}
 	return pending
 }
+
+func workloadFinished(w *kueue.Workload) bool {
+	for _, c := range w.Status.Conditions {
+		if c.Type == kueue.WorkloadFinished {
+			return c.Status == corev1.ConditionTrue
+		}
+	}
+	return false
+}
diff --git a/pkg/controller/workload/job/job_controller.go b/pkg/controller/workload/job/job_controller.go
index 9798a4b2b..096b48a60 100644
--- a/pkg/controller/workload/job/job_controller.go
+++ b/pkg/controller/workload/job/job_controller.go
@@ -34,7 +34,7 @@ import (
 	ctrl "sigs.k8s.io/controller-runtime"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/constants"
 	utilpriority "sigs.k8s.io/kueue/pkg/util/priority"
 	"sigs.k8s.io/kueue/pkg/workload"
diff --git a/pkg/queue/cluster_queue_best_effort_fifo.go b/pkg/queue/cluster_queue_best_effort_fifo.go
index 98153cd4d..53b952e6d 100644
--- a/pkg/queue/cluster_queue_best_effort_fifo.go
+++ b/pkg/queue/cluster_queue_best_effort_fifo.go
@@ -19,7 +19,7 @@ package queue
 import (
 	"k8s.io/apimachinery/pkg/api/equality"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/workload"
 )
 
diff --git a/pkg/queue/cluster_queue_impl.go b/pkg/queue/cluster_queue_impl.go
index db9f2a49a..c8f05fad3 100644
--- a/pkg/queue/cluster_queue_impl.go
+++ b/pkg/queue/cluster_queue_impl.go
@@ -21,7 +21,7 @@ import (
 
 	"k8s.io/apimachinery/pkg/util/sets"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/workload"
 )
 
diff --git a/pkg/queue/cluster_queue_interface.go b/pkg/queue/cluster_queue_interface.go
index 52ca94b2e..a652d2733 100644
--- a/pkg/queue/cluster_queue_interface.go
+++ b/pkg/queue/cluster_queue_interface.go
@@ -20,7 +20,7 @@ import (
 	"fmt"
 
 	"k8s.io/apimachinery/pkg/util/sets"
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/workload"
 )
 
diff --git a/pkg/queue/cluster_queue_strict_fifo.go b/pkg/queue/cluster_queue_strict_fifo.go
index a8a51f9ec..328284f0d 100644
--- a/pkg/queue/cluster_queue_strict_fifo.go
+++ b/pkg/queue/cluster_queue_strict_fifo.go
@@ -17,7 +17,7 @@ limitations under the License.
 package queue
 
 import (
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	utilpriority "sigs.k8s.io/kueue/pkg/util/priority"
 	"sigs.k8s.io/kueue/pkg/workload"
 )
diff --git a/pkg/queue/manager.go b/pkg/queue/manager.go
index d91d5564a..338be868c 100644
--- a/pkg/queue/manager.go
+++ b/pkg/queue/manager.go
@@ -27,7 +27,7 @@ import (
 	ctrl "sigs.k8s.io/controller-runtime"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/workload"
 )
 
diff --git a/pkg/queue/queue.go b/pkg/queue/queue.go
index f3977561e..079885196 100644
--- a/pkg/queue/queue.go
+++ b/pkg/queue/queue.go
@@ -19,7 +19,7 @@ package queue
 import (
 	"fmt"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/workload"
 )
 
diff --git a/pkg/scheduler/scheduler.go b/pkg/scheduler/scheduler.go
index 3683306e8..665bd8392 100644
--- a/pkg/scheduler/scheduler.go
+++ b/pkg/scheduler/scheduler.go
@@ -36,7 +36,7 @@ import (
 	ctrl "sigs.k8s.io/controller-runtime"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/cache"
 	"sigs.k8s.io/kueue/pkg/queue"
 	"sigs.k8s.io/kueue/pkg/util/routine"
diff --git a/pkg/util/priority/priority.go b/pkg/util/priority/priority.go
index b5f02c36a..c82b642c0 100644
--- a/pkg/util/priority/priority.go
+++ b/pkg/util/priority/priority.go
@@ -23,7 +23,7 @@ import (
 	"k8s.io/apimachinery/pkg/types"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/constants"
 )
 
diff --git a/pkg/workload/workload.go b/pkg/workload/workload.go
index d44ce16cc..65049e65c 100644
--- a/pkg/workload/workload.go
+++ b/pkg/workload/workload.go
@@ -26,7 +26,7 @@ import (
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 )
 
 // Info holds a Workload object and some pre-processing.
@@ -162,7 +162,10 @@ func max(v1, v2 int64) int64 {
 // FindConditionIndex finds the provided condition from the given status and returns the index.
 // Returns -1 if the condition is not present.
 func FindConditionIndex(status *kueue.WorkloadStatus, conditionType kueue.WorkloadConditionType) int {
-	if status == nil || status.Conditions == nil {
+	if status == nil {
+		return -1
+	}
+	if status.Conditions == nil {
 		return -1
 	}
 	for i := range status.Conditions {
@@ -204,7 +207,7 @@ func UpdateStatus(ctx context.Context,
 	return c.Status().Update(ctx, &newWl)
 }
 
-func UpdateStatusIfChanged(ctx context.Context,
+func UpdateWorkloadStatusIfChanged(ctx context.Context,
 	c client.Client,
 	wl *kueue.Workload,
 	conditionType kueue.WorkloadConditionType,
@@ -223,8 +226,3 @@ func UpdateStatusIfChanged(ctx context.Context,
 	// Updating an existing condition
 	return UpdateStatus(ctx, c, wl, conditionType, conditionStatus, reason, message)
 }
-
-func InCondition(w *kueue.Workload, condition kueue.WorkloadConditionType) bool {
-	i := FindConditionIndex(&w.Status, condition)
-	return i != -1 && w.Status.Conditions[i].Status == corev1.ConditionTrue
-}


Test patch:
diff --git a/pkg/cache/cache_test.go b/pkg/cache/cache_test.go
index e2d86ce01..b95ec9703 100644
--- a/pkg/cache/cache_test.go
+++ b/pkg/cache/cache_test.go
@@ -31,7 +31,7 @@ import (
 	"k8s.io/apimachinery/pkg/util/sets"
 	"sigs.k8s.io/controller-runtime/pkg/client/fake"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/util/pointer"
 	utiltesting "sigs.k8s.io/kueue/pkg/util/testing"
 	"sigs.k8s.io/kueue/pkg/workload"
diff --git a/pkg/cache/snapshot_test.go b/pkg/cache/snapshot_test.go
index e06503c96..a590ff764 100644
--- a/pkg/cache/snapshot_test.go
+++ b/pkg/cache/snapshot_test.go
@@ -30,7 +30,7 @@ import (
 	"k8s.io/apimachinery/pkg/util/sets"
 	"sigs.k8s.io/controller-runtime/pkg/client/fake"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	utiltesting "sigs.k8s.io/kueue/pkg/util/testing"
 	"sigs.k8s.io/kueue/pkg/workload"
 )
diff --git a/pkg/queue/cluster_queue_best_effort_fifo_test.go b/pkg/queue/cluster_queue_best_effort_fifo_test.go
index fcd38e06e..29a562aaf 100644
--- a/pkg/queue/cluster_queue_best_effort_fifo_test.go
+++ b/pkg/queue/cluster_queue_best_effort_fifo_test.go
@@ -22,7 +22,7 @@ import (
 	"github.com/google/go-cmp/cmp"
 	"k8s.io/apimachinery/pkg/util/sets"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	utiltesting "sigs.k8s.io/kueue/pkg/util/testing"
 	"sigs.k8s.io/kueue/pkg/workload"
 )
diff --git a/pkg/queue/cluster_queue_strict_fifo_test.go b/pkg/queue/cluster_queue_strict_fifo_test.go
index 96c7ed2e6..55eb3d003 100644
--- a/pkg/queue/cluster_queue_strict_fifo_test.go
+++ b/pkg/queue/cluster_queue_strict_fifo_test.go
@@ -23,7 +23,7 @@ import (
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/utils/pointer"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 )
 
 const (
diff --git a/pkg/queue/manager_test.go b/pkg/queue/manager_test.go
index 5600e9190..69f92a26a 100644
--- a/pkg/queue/manager_test.go
+++ b/pkg/queue/manager_test.go
@@ -28,7 +28,7 @@ import (
 	"k8s.io/apimachinery/pkg/util/sets"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 	"sigs.k8s.io/controller-runtime/pkg/client/fake"
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	utiltesting "sigs.k8s.io/kueue/pkg/util/testing"
 	"sigs.k8s.io/kueue/pkg/workload"
 )
diff --git a/pkg/scheduler/scheduler_test.go b/pkg/scheduler/scheduler_test.go
index 76022ee27..570a6789b 100644
--- a/pkg/scheduler/scheduler_test.go
+++ b/pkg/scheduler/scheduler_test.go
@@ -37,7 +37,7 @@ import (
 	"sigs.k8s.io/controller-runtime/pkg/client/fake"
 	"sigs.k8s.io/kueue/pkg/util/pointer"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/cache"
 	"sigs.k8s.io/kueue/pkg/constants"
 	"sigs.k8s.io/kueue/pkg/queue"
diff --git a/pkg/util/testing/wrappers.go b/pkg/util/testing/wrappers.go
index c39289734..ccb291182 100644
--- a/pkg/util/testing/wrappers.go
+++ b/pkg/util/testing/wrappers.go
@@ -25,7 +25,7 @@ import (
 	"k8s.io/apimachinery/pkg/api/resource"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/constants"
 	"sigs.k8s.io/kueue/pkg/util/pointer"
 )
diff --git a/pkg/workload/workload_test.go b/pkg/workload/workload_test.go
index 61d11c21f..1c71e32d2 100644
--- a/pkg/workload/workload_test.go
+++ b/pkg/workload/workload_test.go
@@ -29,7 +29,7 @@ import (
 	"sigs.k8s.io/controller-runtime/pkg/client/fake"
 	utiltesting "sigs.k8s.io/kueue/pkg/util/testing"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 )
 
 func TestPodRequests(t *testing.T) {
diff --git a/test/integration/controller/core/clusterqueue_controller_test.go b/test/integration/controller/core/clusterqueue_controller_test.go
index 0db22ecee..e1ef1aee2 100644
--- a/test/integration/controller/core/clusterqueue_controller_test.go
+++ b/test/integration/controller/core/clusterqueue_controller_test.go
@@ -24,7 +24,7 @@ import (
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
 	"sigs.k8s.io/controller-runtime/pkg/client"
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/util/pointer"
 	"sigs.k8s.io/kueue/pkg/util/testing"
 	"sigs.k8s.io/kueue/test/integration/framework"
diff --git a/test/integration/controller/core/queue_controller_test.go b/test/integration/controller/core/queue_controller_test.go
index 09ceae6c6..734de405f 100644
--- a/test/integration/controller/core/queue_controller_test.go
+++ b/test/integration/controller/core/queue_controller_test.go
@@ -23,7 +23,7 @@ import (
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
 	"sigs.k8s.io/controller-runtime/pkg/client"
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/util/testing"
 	"sigs.k8s.io/kueue/test/integration/framework"
 )
diff --git a/test/integration/controller/core/workload_controller_test.go b/test/integration/controller/core/workload_controller_test.go
index 291892df0..a870331a9 100644
--- a/test/integration/controller/core/workload_controller_test.go
+++ b/test/integration/controller/core/workload_controller_test.go
@@ -25,9 +25,8 @@ import (
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
 	"sigs.k8s.io/controller-runtime/pkg/client"
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/util/testing"
-	"sigs.k8s.io/kueue/pkg/workload"
 	"sigs.k8s.io/kueue/test/integration/framework"
 )
 
@@ -40,7 +39,6 @@ var _ = ginkgo.Describe("Workload controller", func() {
 		queue                *kueue.Queue
 		wl                   *kueue.Workload
 		message              string
-		clusterQueue         *kueue.ClusterQueue
 	)
 
 	ginkgo.BeforeEach(func() {
@@ -107,39 +105,4 @@ var _ = ginkgo.Describe("Workload controller", func() {
 			gomega.Expect(updatedQueueWorkload.Status.Conditions[0].Message).To(testing.Equal(message))
 		})
 	})
-
-	ginkgo.When("the workload is admitted", func() {
-		ginkgo.BeforeEach(func() {
-			clusterQueue = testing.MakeClusterQueue("cluster-queue").
-				Resource(testing.MakeResource(resourceGPU).
-					Flavor(testing.MakeFlavor(flavorOnDemand, "5").Max("10").Obj()).Obj()).
-				Obj()
-			gomega.Expect(k8sClient.Create(ctx, clusterQueue)).To(gomega.Succeed())
-
-			queue = testing.MakeQueue("queue", ns.Name).ClusterQueue(clusterQueue.Name).Obj()
-			gomega.Expect(k8sClient.Create(ctx, queue)).To(gomega.Succeed())
-		})
-		ginkgo.AfterEach(func() {
-			gomega.Expect(framework.DeleteNamespace(ctx, k8sClient, ns)).To(gomega.Succeed())
-			gomega.Expect(framework.DeleteClusterQueue(ctx, k8sClient, clusterQueue)).To(gomega.Succeed())
-			updatedQueueWorkload = kueue.Workload{}
-			clusterQueue = nil
-		})
-
-		ginkgo.It("Should update the workload's condition", func() {
-			ginkgo.By("Create workload")
-			wl = testing.MakeWorkload("one", ns.Name).Queue(queue.Name).Request(corev1.ResourceCPU, "1").Obj()
-			gomega.Expect(k8sClient.Create(ctx, wl)).To(gomega.Succeed())
-
-			ginkgo.By("Admit workload")
-			gomega.Expect(k8sClient.Get(ctx, client.ObjectKeyFromObject(wl), &updatedQueueWorkload)).To(gomega.Succeed())
-			updatedQueueWorkload.Spec.Admission = testing.MakeAdmission(clusterQueue.Name).
-				Flavor(corev1.ResourceCPU, flavorOnDemand).Obj()
-			gomega.Expect(k8sClient.Update(ctx, &updatedQueueWorkload)).To(gomega.Succeed())
-			gomega.Eventually(func() bool {
-				gomega.Expect(k8sClient.Get(ctx, client.ObjectKeyFromObject(wl), &updatedQueueWorkload)).To(gomega.Succeed())
-				return workload.InCondition(&updatedQueueWorkload, kueue.WorkloadAdmitted)
-			}, framework.Timeout, framework.Interval).Should(gomega.BeTrue())
-		})
-	})
 })
diff --git a/test/integration/controller/job/job_controller_test.go b/test/integration/controller/job/job_controller_test.go
index ca16e586d..f342b3d91 100644
--- a/test/integration/controller/job/job_controller_test.go
+++ b/test/integration/controller/job/job_controller_test.go
@@ -32,7 +32,7 @@ import (
 	"k8s.io/client-go/rest"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/constants"
 	"sigs.k8s.io/kueue/pkg/controller/workload/job"
 	workloadjob "sigs.k8s.io/kueue/pkg/controller/workload/job"
diff --git a/test/integration/framework/framework.go b/test/integration/framework/framework.go
index cece845f0..84d7f787b 100644
--- a/test/integration/framework/framework.go
+++ b/test/integration/framework/framework.go
@@ -35,7 +35,7 @@ import (
 	"sigs.k8s.io/controller-runtime/pkg/manager"
 	"sigs.k8s.io/kueue/pkg/workload"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	//+kubebuilder:scaffold:imports
 )
 
diff --git a/test/integration/scheduler/scheduler_test.go b/test/integration/scheduler/scheduler_test.go
index f2dd99c77..c94784ca1 100644
--- a/test/integration/scheduler/scheduler_test.go
+++ b/test/integration/scheduler/scheduler_test.go
@@ -26,7 +26,7 @@ import (
 	"k8s.io/utils/pointer"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 
-	kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
+	kueue "sigs.k8s.io/kueue/apis/kueue/v1alpha1"
 	"sigs.k8s.io/kueue/pkg/util/testing"
 	"sigs.k8s.io/kueue/test/integration/framework"
 )