GoogleCloudPlatform/gcsfuse

Support providing values to GCSFuse via environment variable

taeold opened this issue · 3 comments

I'd like to see if you'd like to extend support for flags by allowing users to pass in value of a flag via string, e.g.

from https://github.com/GoogleCloudPlatform/gcsfuse/blob/master/cmd/flags.go

$ DEBUG_GCS=true gcsfuse some-bucket mp	

It seems like the feature can be easily added by leveraging urfave/cli's supprot for environment variable values

			cli.BoolFlag{
				Name:  "debug_gcs",
				Usage: "Print GCS request and timing information.",
+                               EnvVar: "DEBUG_GCS",

			},

Thanks @taeold for the suggestion!! We will discuss within team and prioritize accordingly.

Also, could you please provide use-cases where environment variable will be more helpful but passing via flags not? That would be helpful in prioritizing this request.

Thanks for the response @raj-prince.

My particular use case where I want to configure Cloud Run's support for gcsfuse.

Today, Cloud Run API doesn't allow me to specify specific setting of GCSfuse, and they'd have to extend their API for me to edit GCSFuse settings. But if environment variables support exists for these configurable flags, I'm assuming that I would be able to edit GCSFuse setting on my Cloud Run app.