Skip to content

Commit

Permalink
fix go mod confliction
Browse files Browse the repository at this point in the history
Signed-off-by: Vacant2333 <[email protected]>
  • Loading branch information
Vacant2333 committed Nov 23, 2024
1 parent ae0aaac commit 1a1b96e
Show file tree
Hide file tree
Showing 8 changed files with 147 additions and 148 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This project originated from:

# Quick start

You can read [deploy guide](docs/deploy/README).
You can read [deploy guide](docs/deploy/README.md).

# How does it run?

Expand Down
40 changes: 19 additions & 21 deletions cmd/controller-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,13 @@ import (
"fmt"
"os"
"runtime"
"sort"
"time"

"github.com/spf13/pflag"
utilfeature "k8s.io/apiserver/pkg/util/feature"
cliflag "k8s.io/component-base/cli/flag"
componentbaseoptions "k8s.io/component-base/config/options"
"k8s.io/klog/v2"
"volcano.sh/volcano/cmd/controller-manager/app"
"volcano.sh/volcano/cmd/controller-manager/app/options"
"volcano.sh/volcano/pkg/controllers/framework"
commonutil "volcano.sh/volcano/pkg/util"
"volcano.sh/volcano/pkg/version"

_ "volcano.sh/volcano/pkg/controllers/garbagecollector"
Expand All @@ -52,22 +47,25 @@ func main() {
fs := pflag.CommandLine
s := options.NewServerOption()

var knownControllers = func() []string {
var controllerNames []string
fn := func(controller framework.Controller) {
controllerNames = append(controllerNames, controller.Name())
}
framework.ForeachController(fn)
sort.Strings(controllerNames)
return controllerNames
}

s.AddFlags(fs, knownControllers())
utilfeature.DefaultMutableFeatureGate.AddFlag(fs)

commonutil.LeaderElectionDefault(&s.LeaderElection)
s.LeaderElection.ResourceName = componentName
componentbaseoptions.BindLeaderElectionFlags(&s.LeaderElection, fs)
//var knownControllers = func() []string {
// var controllerNames []string
// fn := func(controller framework.Controller) {
// controllerNames = append(controllerNames, controller.Name())
// }
// framework.ForeachController(fn)
// sort.Strings(controllerNames)
// return controllerNames
//}

s.AddFlags(fs)

// todo: enable this when update [email protected]
//s.AddFlags(fs, knownControllers())
//utilfeature.DefaultMutableFeatureGate.AddFlag(fs)
//
//commonutil.LeaderElectionDefault(&s.LeaderElection)
//s.LeaderElection.ResourceName = componentName
//componentbaseoptions.BindLeaderElectionFlags(&s.LeaderElection, fs)

cliflag.InitFlags()

Expand Down
60 changes: 30 additions & 30 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ require (
github.com/karmada-io/karmada v1.10.2
github.com/spf13/pflag v1.0.5
gomodules.xyz/jsonpatch/v2 v2.4.0
k8s.io/api v0.30.2
k8s.io/apimachinery v0.30.2
k8s.io/client-go v0.30.2
k8s.io/component-base v0.30.2
k8s.io/api v0.29.4
k8s.io/apimachinery v0.29.4
k8s.io/apiserver v0.29.4
k8s.io/client-go v0.29.4
k8s.io/component-base v0.29.4
k8s.io/klog/v2 v2.120.1
k8s.io/kube-openapi v0.0.0-20240620174524-b456828f718b
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340
sigs.k8s.io/controller-runtime v0.17.5
volcano.sh/apis v1.10.0
volcano.sh/volcano v1.10.0
volcano.sh/apis v1.9.0
volcano.sh/volcano v1.9.0
)

// todo: remove this when resourceBinding suspend merge to master
Expand All @@ -32,7 +33,7 @@ require (
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/zapr v1.3.0 // indirect
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect
Expand All @@ -55,9 +56,9 @@ require (
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/moby/sys/mountinfo v0.6.2 // indirect
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect
github.com/moby/spdystream v0.4.0 // indirect
github.com/moby/sys/mountinfo v0.7.1 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
Expand All @@ -66,42 +67,41 @@ require (
github.com/opencontainers/selinux v1.11.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.19.0 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/common v0.48.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/cobra v1.8.1 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/stretchr/testify v1.9.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/oauth2 v0.20.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/term v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
google.golang.org/grpc v1.65.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.29.4 // indirect
k8s.io/apiserver v0.30.2 // indirect
k8s.io/cli-runtime v0.29.4 // indirect
k8s.io/cloud-provider v0.25.0 // indirect
k8s.io/component-helpers v0.30.2 // indirect
k8s.io/csi-translation-lib v0.30.2 // indirect
k8s.io/component-helpers v0.29.4 // indirect
k8s.io/csi-translation-lib v0.29.4 // indirect
k8s.io/kube-scheduler v0.0.0 // indirect
k8s.io/kubectl v0.29.4 // indirect
k8s.io/kubernetes v1.30.2 // indirect
k8s.io/kubernetes v1.29.4 // indirect
k8s.io/mount-utils v0.25.0 // indirect
k8s.io/utils v0.0.0-20231127182322-b307cd553661 // indirect
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
sigs.k8s.io/cluster-api v1.7.1 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/mcs-api v0.1.0 // indirect
Expand Down
Loading

0 comments on commit 1a1b96e

Please sign in to comment.