Skip to content

Commit

Permalink
Changed the project to support multi api groups
Browse files Browse the repository at this point in the history
  • Loading branch information
ahg-g committed Apr 11, 2022
1 parent cb8eab0 commit f8e104a
Show file tree
Hide file tree
Showing 40 changed files with 34 additions and 35 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN go mod download

# Copy the go source
COPY main.go main.go
COPY api/ api/
COPY apis/ apis/
COPY pkg/ pkg/

# Build
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ ci-lint: golangci-lint

.PHONY: verify
verify: gomod-verify vet ci-lint fmt-verify manifests generate
git --no-pager diff --exit-code config/crd/bases api
git --no-pager diff --exit-code config/crd/bases apis

##@ Build

Expand Down
3 changes: 1 addition & 2 deletions PROJECT
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
domain: x-k8s.io
layout:
- go.kubebuilder.io/v3
multigroup: true
projectName: kueue
repo: sigs.k8s.io/kueue
resources:
Expand All @@ -15,7 +16,6 @@ resources:
version: v1alpha1
- api:
crdVersion: v1
namespaced: false
controller: true
domain: x-k8s.io
group: kueue
Expand All @@ -33,7 +33,6 @@ resources:
version: v1alpha1
- api:
crdVersion: v1
namespaced: false
domain: x-k8s.io
group: kueue
kind: ResourceFlavor
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

kueuev1alpha1 "sigs.k8s.io/kueue/api/v1alpha1"
kueuev1alpha1 "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/cache"
"sigs.k8s.io/kueue/pkg/constants"
"sigs.k8s.io/kueue/pkg/controller/core"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"k8s.io/apimachinery/pkg/util/sets"
"sigs.k8s.io/controller-runtime/pkg/client"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/util/pointer"
"sigs.k8s.io/kueue/pkg/workload"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"k8s.io/apimachinery/pkg/util/sets"
"sigs.k8s.io/controller-runtime/pkg/client/fake"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/util/pointer"
utiltesting "sigs.k8s.io/kueue/pkg/util/testing"
"sigs.k8s.io/kueue/pkg/workload"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cache/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package cache

import (
kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/workload"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/cache/snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"k8s.io/apimachinery/pkg/util/sets"
"sigs.k8s.io/controller-runtime/pkg/client/fake"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
utiltesting "sigs.k8s.io/kueue/pkg/util/testing"
"sigs.k8s.io/kueue/pkg/workload"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/core/clusterqueue_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/source"
"sigs.k8s.io/kueue/pkg/queue"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/cache"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/core/queue_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/source"
"sigs.k8s.io/kueue/pkg/constants"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/queue"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/core/resourceflavor_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/event"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/cache"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/core/workload_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/event"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/cache"
"sigs.k8s.io/kueue/pkg/queue"
"sigs.k8s.io/kueue/pkg/workload"
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/workload/job/job_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/constants"
utilpriority "sigs.k8s.io/kueue/pkg/util/priority"
"sigs.k8s.io/kueue/pkg/workload"
Expand Down
2 changes: 1 addition & 1 deletion pkg/queue/cluster_queue_best_effort_fifo.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package queue
import (
"k8s.io/apimachinery/pkg/api/equality"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/workload"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/queue/cluster_queue_best_effort_fifo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/google/go-cmp/cmp"
"k8s.io/apimachinery/pkg/util/sets"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
utiltesting "sigs.k8s.io/kueue/pkg/util/testing"
"sigs.k8s.io/kueue/pkg/workload"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/queue/cluster_queue_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"k8s.io/apimachinery/pkg/util/sets"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/workload"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/queue/cluster_queue_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"

"k8s.io/apimachinery/pkg/util/sets"
kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/workload"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/queue/cluster_queue_strict_fifo.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package queue

import (
kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
utilpriority "sigs.k8s.io/kueue/pkg/util/priority"
"sigs.k8s.io/kueue/pkg/workload"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/queue/cluster_queue_strict_fifo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/pointer"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/queue/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/workload"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/queue/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
utiltesting "sigs.k8s.io/kueue/pkg/util/testing"
"sigs.k8s.io/kueue/pkg/workload"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/queue/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package queue
import (
"fmt"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/workload"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/cache"
"sigs.k8s.io/kueue/pkg/queue"
"sigs.k8s.io/kueue/pkg/util/routine"
Expand Down
2 changes: 1 addition & 1 deletion pkg/scheduler/scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/fake"
"sigs.k8s.io/kueue/pkg/util/pointer"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/cache"
"sigs.k8s.io/kueue/pkg/constants"
"sigs.k8s.io/kueue/pkg/queue"
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/priority/priority.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/constants"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/util/testing/wrappers.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/constants"
"sigs.k8s.io/kueue/pkg/util/pointer"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/workload/workload.go
Original file line number Diff line number Diff line change
Expand Up @@ -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/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
)

// Info holds a Workload object and some pre-processing.
Expand Down
2 changes: 1 addition & 1 deletion pkg/workload/workload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
)

func TestPodRequests(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/util/pointer"
"sigs.k8s.io/kueue/pkg/util/testing"
"sigs.k8s.io/kueue/test/integration/framework"
Expand Down
2 changes: 1 addition & 1 deletion test/integration/controller/core/queue_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/util/testing"
"sigs.k8s.io/kueue/test/integration/framework"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"sigs.k8s.io/controller-runtime/pkg/client"
kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/util/testing"
"sigs.k8s.io/kueue/test/integration/framework"
)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/controller/job/job_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kubernetes/scheme"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/constants"
workloadjob "sigs.k8s.io/kueue/pkg/controller/workload/job"
"sigs.k8s.io/kueue/pkg/util/testing"
Expand Down
2 changes: 1 addition & 1 deletion test/integration/framework/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/kueue/pkg/workload"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
//+kubebuilder:scaffold:imports
)

Expand Down
2 changes: 1 addition & 1 deletion test/integration/scheduler/scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"k8s.io/utils/pointer"
"sigs.k8s.io/controller-runtime/pkg/client"

kueue "sigs.k8s.io/kueue/api/v1alpha1"
kueue "sigs.k8s.io/kueue/apis/core/v1alpha1"
"sigs.k8s.io/kueue/pkg/util/testing"
"sigs.k8s.io/kueue/test/integration/framework"
)
Expand Down

0 comments on commit f8e104a

Please sign in to comment.