@@ -45,10 +45,8 @@ import (
4545)
4646
4747const (
48- driverName = "objectstorage.cosi.linode.com"
49- gracePeriod = 5 * time .Second
50- envK8sNodeName = "K8S_NODE_NAME"
51- envK8sPodName = "K8S_POD_NAME"
48+ driverName = "objectstorage.cosi.linode.com"
49+ gracePeriod = 5 * time .Second
5250)
5351
5452var ErrNoKeySpecified = errors .New ("no S3 policy credentials, " +
@@ -57,9 +55,6 @@ var ErrNoKeySpecified = errors.New("no S3 policy credentials, " +
5755
5856func main () {
5957 var (
60- linodeToken = envflag .String ("LINODE_TOKEN" , "" )
61- linodeURL = envflag .String ("LINODE_API_URL" , "" )
62- linodeAPIVersion = envflag .String ("LINODE_API_VERSION" , "" )
6358 cosiEndpoint = envflag .String ("COSI_ENDPOINT" , "unix:///var/lib/cosi/cosi.sock" )
6459 cacheTTL = envflag .Duration ("LINODE_OBJECT_STORAGE_ENDPOINT_CACHE_TTL" , cache .DefaultTTL )
6560 s3SSL = envflag .Bool ("S3_CLIENT_SSL_ENABLED" , true )
@@ -73,9 +68,6 @@ func main() {
7368
7469 if err := run (context .Background (), log , mainOptions {
7570 cosiEndpoint : cosiEndpoint ,
76- linodeToken : linodeToken ,
77- linodeURL : linodeURL ,
78- linodeAPIVersion : linodeAPIVersion ,
7971 cacheTTL : cacheTTL ,
8072 s3SSL : s3SSL ,
8173 s3EphemeralCredentials : s3EphemeralCredentials ,
@@ -90,9 +82,6 @@ func main() {
9082
9183type mainOptions struct {
9284 cosiEndpoint string
93- linodeToken string
94- linodeURL string
95- linodeAPIVersion string
9685 cacheTTL time.Duration
9786 s3SSL bool
9887 s3EphemeralCredentials bool
@@ -120,11 +109,7 @@ func run(ctx context.Context, log *slog.Logger, opts mainOptions) error {
120109 }
121110
122111 // initialize Linode client
123- client , err := linodeclient .NewLinodeClient (
124- opts .linodeToken ,
125- fmt .Sprintf ("LinodeCOSI/%s" , version .Version ),
126- opts .linodeURL ,
127- opts .linodeAPIVersion )
112+ client , err := linodeclient .NewLinodeClient (fmt .Sprintf ("LinodeCOSI/%s" , version .Version ))
128113 if err != nil {
129114 return fmt .Errorf ("unable to create new client: %w" , err )
130115 }
0 commit comments