diff --git a/Makefile b/Makefile index 575dfcc..ac12cb5 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,8 @@ ENVTEST_K8S_VERSION = 1.22 # Set license header files. LICENSE_HEADER_GO ?= hack/boilerplate/boilerplate.go.txt +PACKAGES ?= $(shell go list ./...) + # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) GOBIN=$(shell go env GOPATH)/bin @@ -93,7 +95,7 @@ build: build-interference-manager .PHONY: build-interference-manager build-interference-manager: ## Build interference-manager binary. - go build -o cmd/interference-manager main.go + go build -o bin/interference-manager cmd/interference-manager/main.go # If you wish built the manager image targeting other platforms you can use the --platform flag. # (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it. diff --git a/cmd/interference-manager/main.go b/cmd/interference-manager/main.go index 2d23d29..2726bfd 100644 --- a/cmd/interference-manager/main.go +++ b/cmd/interference-manager/main.go @@ -18,8 +18,6 @@ package main import ( "flag" - interferencev1alpha1 "github.com/koordinator-sh/koordetector/apis/interference/v1alpha1" - "github.com/koordinator-sh/koordetector/pkg/interferencemanager/controllers" "os" // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) @@ -33,6 +31,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/healthz" "sigs.k8s.io/controller-runtime/pkg/log/zap" //+kubebuilder:scaffold:imports + + interferencev1alpha1 "github.com/koordinator-sh/koordetector/apis/interference/v1alpha1" + "github.com/koordinator-sh/koordetector/pkg/interferencemanager/controllers" ) var (