Skip to content

Commit

Permalink
update scheduler import paths to volcano and fix building
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-wangzefeng committed Jul 4, 2019
1 parent 471b543 commit aec87f6
Show file tree
Hide file tree
Showing 85 changed files with 1,538 additions and 178 deletions.
2 changes: 1 addition & 1 deletion cmd/admission/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"net/http"

"github.com/golang/glog"
"github.com/kubernetes-sigs/kube-batch/pkg/client/clientset/versioned"
"volcano.sh/volcano/pkg/client/clientset/versioned"

"k8s.io/api/admission/v1beta1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
2 changes: 1 addition & 1 deletion cmd/controllers/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
"k8s.io/client-go/tools/leaderelection/resourcelock"
"k8s.io/client-go/tools/record"

kbver "github.com/kubernetes-sigs/kube-batch/pkg/client/clientset/versioned"
kbver "volcano.sh/volcano/pkg/client/clientset/versioned"

"volcano.sh/volcano/cmd/controllers/app/options"
vkclient "volcano.sh/volcano/pkg/client/clientset/versioned"
Expand Down
8 changes: 4 additions & 4 deletions cmd/kube-batch/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"time"

"github.com/golang/glog"
"github.com/kubernetes-sigs/kube-batch/cmd/kube-batch/app/options"
"github.com/kubernetes-sigs/kube-batch/pkg/scheduler"
"github.com/kubernetes-sigs/kube-batch/pkg/version"
"volcano.sh/volcano/cmd/kube-batch/app/options"
"volcano.sh/volcano/pkg/scheduler"
"volcano.sh/volcano/pkg/version"
"github.com/prometheus/client_golang/prometheus/promhttp"

v1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -75,7 +75,7 @@ func buildConfig(opt *options.ServerOption) (*rest.Config, error) {
// Run the kubeBatch scheduler
func Run(opt *options.ServerOption) error {
if opt.PrintVersion {
version.PrintVersionAndExit(apiVersion)
version.PrintVersionAndExit()
}

config, err := buildConfig(opt)
Expand Down
10 changes: 5 additions & 5 deletions cmd/kube-batch/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/apiserver/pkg/util/flag"

"github.com/kubernetes-sigs/kube-batch/cmd/kube-batch/app"
"github.com/kubernetes-sigs/kube-batch/cmd/kube-batch/app/options"
"volcano.sh/volcano/cmd/kube-batch/app"
"volcano.sh/volcano/cmd/kube-batch/app/options"

// Import default actions/plugins.
_ "github.com/kubernetes-sigs/kube-batch/pkg/scheduler/actions"
_ "github.com/kubernetes-sigs/kube-batch/pkg/scheduler/plugins"
_ "volcano.sh/volcano/pkg/scheduler/actions"
_ "volcano.sh/volcano/pkg/scheduler/plugins"

// init assert
_ "github.com/kubernetes-sigs/kube-batch/pkg/scheduler/util/assert"
_ "volcano.sh/volcano/pkg/scheduler/util/assert"
)

var logFlushFreq = pflag.Duration("log-flush-frequency", 5*time.Second, "Maximum number of seconds between log flushes")
Expand Down
2 changes: 1 addition & 1 deletion hack/update-gencode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-ge
# instead of the $GOPATH directly. For normal projects this can be dropped.
${CODEGEN_PKG}/generate-groups.sh "deepcopy,client,informer,lister" \
volcano.sh/volcano/pkg/client volcano.sh/volcano/pkg/apis \
"batch:v1alpha1 bus:v1alpha1" \
"batch:v1alpha1 bus:v1alpha1 scheduling:v1alpha1" \
--go-header-file ${SCRIPT_ROOT}/hack/boilerplate/boilerplate.go.txt

# To use your own boilerplate text use:
Expand Down
2 changes: 1 addition & 1 deletion pkg/admission/admit_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"strings"

"github.com/golang/glog"
"github.com/kubernetes-sigs/kube-batch/pkg/client/clientset/versioned"
"volcano.sh/volcano/pkg/client/clientset/versioned"

"k8s.io/api/admission/v1beta1"
"k8s.io/api/core/v1"
Expand Down
4 changes: 2 additions & 2 deletions pkg/admission/admit_job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ import (
"strings"
"testing"

kubebatchclient "github.com/kubernetes-sigs/kube-batch/pkg/client/clientset/versioned/fake"
kubebatchclient "volcano.sh/volcano/pkg/client/clientset/versioned/fake"

"k8s.io/api/admission/v1beta1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

kbv1aplha1 "github.com/kubernetes-sigs/kube-batch/pkg/apis/scheduling/v1alpha1"
kbv1aplha1 "volcano.sh/volcano/pkg/apis/scheduling/v1alpha1"
v1alpha1 "volcano.sh/volcano/pkg/apis/batch/v1alpha1"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/scheduling/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/cli/queue/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

vkapi "github.com/kubernetes-sigs/kube-batch/pkg/apis/scheduling/v1alpha1"
"github.com/kubernetes-sigs/kube-batch/pkg/client/clientset/versioned"
vkapi "volcano.sh/volcano/pkg/apis/scheduling/v1alpha1"
"volcano.sh/volcano/pkg/client/clientset/versioned"
)

type createFlags struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/queue/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (

"github.com/spf13/cobra"

"github.com/kubernetes-sigs/kube-batch/pkg/apis/scheduling/v1alpha1"
"github.com/kubernetes-sigs/kube-batch/pkg/client/clientset/versioned"
"volcano.sh/volcano/pkg/apis/scheduling/v1alpha1"
"volcano.sh/volcano/pkg/client/clientset/versioned"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/queue/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (

"github.com/spf13/cobra"

"github.com/kubernetes-sigs/kube-batch/pkg/apis/scheduling/v1alpha1"
"github.com/kubernetes-sigs/kube-batch/pkg/client/clientset/versioned"
"volcano.sh/volcano/pkg/apis/scheduling/v1alpha1"
"volcano.sh/volcano/pkg/client/clientset/versioned"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/queue/queue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"net/http/httptest"
"testing"

"github.com/kubernetes-sigs/kube-batch/pkg/apis/scheduling/v1alpha1"
"volcano.sh/volcano/pkg/apis/scheduling/v1alpha1"
"github.com/spf13/cobra"
"k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand Down
26 changes: 24 additions & 2 deletions pkg/client/clientset/versioned/clientset.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions pkg/client/clientset/versioned/fake/clientset_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pkg/client/clientset/versioned/fake/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pkg/client/clientset/versioned/scheme/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions pkg/client/clientset/versioned/typed/scheduling/v1alpha1/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit aec87f6

Please sign in to comment.