File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed
Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,9 @@ package linode
33import (
44 "fmt"
55 "io"
6- "net/http"
76 "os"
87
98 "github.com/linode/linodego"
10- "golang.org/x/oauth2"
119 "k8s.io/kubernetes/pkg/cloudprovider"
1210 "k8s.io/kubernetes/pkg/controller"
1311)
@@ -53,18 +51,8 @@ func newCloud() (cloudprovider.Interface, error) {
5351 return nil , fmt .Errorf ("%s must be set in the environment (use a k8s secret)" , regionEnv )
5452 }
5553
56- // Initialize Linode API Client
57- tokenSource := oauth2 .StaticTokenSource (& oauth2.Token {
58- AccessToken : apiToken ,
59- })
60-
61- oauth2Client := & http.Client {
62- Transport : & oauth2.Transport {
63- Source : tokenSource ,
64- },
65- }
66-
67- linodeClient := linodego .NewClient (oauth2Client )
54+ linodeClient := linodego .NewClient (nil )
55+ linodeClient .SetToken (apiToken )
6856 if Options .LinodeGoDebug {
6957 linodeClient .SetDebug (true )
7058 }
You can’t perform that action at this time.
0 commit comments