Commit 585daa20 authored by deads2k's avatar deads2k

use the client builder to support using SAs

parent 21c30433
...@@ -51,7 +51,7 @@ type SimpleControllerClientBuilder struct { ...@@ -51,7 +51,7 @@ type SimpleControllerClientBuilder struct {
func (b SimpleControllerClientBuilder) Config(name string) (*restclient.Config, error) { func (b SimpleControllerClientBuilder) Config(name string) (*restclient.Config, error) {
clientConfig := *b.ClientConfig clientConfig := *b.ClientConfig
return &clientConfig, nil return restclient.AddUserAgent(&clientConfig, name), nil
} }
func (b SimpleControllerClientBuilder) ConfigOrDie(name string) *restclient.Config { func (b SimpleControllerClientBuilder) ConfigOrDie(name string) *restclient.Config {
...@@ -67,7 +67,7 @@ func (b SimpleControllerClientBuilder) Client(name string) (clientset.Interface, ...@@ -67,7 +67,7 @@ func (b SimpleControllerClientBuilder) Client(name string) (clientset.Interface,
if err != nil { if err != nil {
return nil, err return nil, err
} }
return clientset.NewForConfig(restclient.AddUserAgent(clientConfig, name)) return clientset.NewForConfig(clientConfig)
} }
func (b SimpleControllerClientBuilder) ClientOrDie(name string) clientset.Interface { func (b SimpleControllerClientBuilder) ClientOrDie(name string) clientset.Interface {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment