Skip to content

Commit

Permalink
Merge pull request #169 from cynepco3hahue/remove_apiserver_builder_dep
Browse files Browse the repository at this point in the history
Remove apiserver-builder dependency
  • Loading branch information
openshift-merge-robot authored Jan 24, 2019
2 parents 6153db6 + 1105a2f commit e71cdb9
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 483 deletions.
13 changes: 1 addition & 12 deletions Gopkg.lock

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

20 changes: 8 additions & 12 deletions cmd/nodelink-controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,32 @@ import (
"sync"
"time"

"github.com/golang/glog"
"github.com/spf13/pflag"

corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/apimachinery/pkg/util/wait"
coreinformers "k8s.io/client-go/informers/core/v1"
"k8s.io/client-go/kubernetes"
kubeclientset "k8s.io/client-go/kubernetes"
v1core "k8s.io/client-go/kubernetes/typed/core/v1"
corelister "k8s.io/client-go/listers/core/v1"
"k8s.io/client-go/tools/cache"
"k8s.io/client-go/tools/record"
"k8s.io/client-go/util/workqueue"

"github.com/golang/glog"
"github.com/kubernetes-incubator/apiserver-builder/pkg/controller"
"github.com/spf13/pflag"
"sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset"
"sigs.k8s.io/controller-runtime/pkg/client/config"

capiv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1"
"sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset"
capiclient "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset"
capiinformersfactory "sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions"
capiinformers "sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1"
lister "sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1"
"sigs.k8s.io/cluster-api/pkg/controller/config"

kubeinformers "k8s.io/client-go/informers"
"k8s.io/client-go/kubernetes"
capiinformersfactory "sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions"
)

const (
Expand Down Expand Up @@ -429,16 +429,12 @@ var (
logLevel string
)

func init() {
config.ControllerConfig.AddFlags(pflag.CommandLine)
}

func main() {

pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
pflag.Parse()

config, err := controller.GetConfig(config.ControllerConfig.Kubeconfig)
config, err := config.GetConfig()
if err != nil {
glog.Fatalf("Could not create Config for talking to the apiserver: %v", err)
}
Expand Down
5 changes: 3 additions & 2 deletions test/integration/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/kubernetes-incubator/apiserver-builder/pkg/controller"
appsv1beta2 "k8s.io/api/apps/v1beta2"
apiv1 "k8s.io/api/core/v1"
rbacv1beta1 "k8s.io/api/rbac/v1beta1"
Expand All @@ -24,6 +23,8 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/tools/clientcmd"

capiv1alpha1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1"
"sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset"
capiv1alpha1scheme "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/scheme"
Expand Down Expand Up @@ -58,7 +59,7 @@ type TestConfig struct {

// NewTestConfig creates new test config with clients
func NewTestConfig(kubeconfig string) *TestConfig {
config, err := controller.GetConfig(kubeconfig)
config, err := clientcmd.BuildConfigFromFlags("", kubeconfig)
if err != nil {
glog.Fatalf("Could not create Config for talking to the apiserver: %v", err)
}
Expand Down
201 changes: 0 additions & 201 deletions vendor/github.com/kubernetes-incubator/apiserver-builder/LICENSE

This file was deleted.

Loading

0 comments on commit e71cdb9

Please sign in to comment.