pkg/controller: remove old clientbuilder methods
everything has moved to client-go now so these are the same as the original Client* methods.
This commit is contained in:
@@ -46,8 +46,6 @@ type ControllerClientBuilder interface {
|
||||
ConfigOrDie(name string) *restclient.Config
|
||||
Client(name string) (clientset.Interface, error)
|
||||
ClientOrDie(name string) clientset.Interface
|
||||
ClientGoClient(name string) (clientset.Interface, error)
|
||||
ClientGoClientOrDie(name string) clientset.Interface
|
||||
}
|
||||
|
||||
// SimpleControllerClientBuilder returns a fixed client with different user agents
|
||||
@@ -85,22 +83,6 @@ func (b SimpleControllerClientBuilder) ClientOrDie(name string) clientset.Interf
|
||||
return client
|
||||
}
|
||||
|
||||
func (b SimpleControllerClientBuilder) ClientGoClient(name string) (clientset.Interface, error) {
|
||||
clientConfig, err := b.Config(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return clientset.NewForConfig(clientConfig)
|
||||
}
|
||||
|
||||
func (b SimpleControllerClientBuilder) ClientGoClientOrDie(name string) clientset.Interface {
|
||||
client, err := b.ClientGoClient(name)
|
||||
if err != nil {
|
||||
glog.Fatal(err)
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
||||
// SAControllerClientBuilder is a ControllerClientBuilder that returns clients identifying as
|
||||
// service accounts
|
||||
type SAControllerClientBuilder struct {
|
||||
@@ -274,19 +256,3 @@ func (b SAControllerClientBuilder) ClientOrDie(name string) clientset.Interface
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
||||
func (b SAControllerClientBuilder) ClientGoClient(name string) (clientset.Interface, error) {
|
||||
clientConfig, err := b.Config(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return clientset.NewForConfig(clientConfig)
|
||||
}
|
||||
|
||||
func (b SAControllerClientBuilder) ClientGoClientOrDie(name string) clientset.Interface {
|
||||
client, err := b.ClientGoClient(name)
|
||||
if err != nil {
|
||||
glog.Fatal(err)
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
Reference in New Issue
Block a user