Closed stroitelev closed 5 years ago
Thanks for the PR @stroitelev!
Could you please implement this variable as a kingpin flag, rather than reading the environment variable with os.Getenv()
? A kingpin flag can be provided as an environment variable as well as a commandline flag so it provides more flexibility and also keeps configuration unified to kingpin.
https://godoc.org/github.com/alecthomas/kingpin#ArgClause.Envar https://godoc.org/github.com/alecthomas/kingpin#Application.DefaultEnvars
Hello @ribbybibby!
Sorry for delay, I have fixed it, could you check please? And sorry for my English, feel free to rewrite my descriptions if something wrong.
P.S. I also have helm chart for the s3-exporter, if it useful I can add it too.
About the environment variable S3_EXPORTER_S3_ENDPOINT_URL, I think it is well.
Hi @stroitelev, your fork doesn't seem to use any environment variables now. You'll need to make a few more changes to enable kingpin's default envvars (see the example from my previous comment).
Also, the naming of endpointURL
is inconsistently cased:
# github.com/stroitelev/s3_exporter
./s3_exporter.go:166:10: undefined: endpointUrl
./s3_exporter.go:167:21: undefined: endpointUrl
Closing. I found some time to implement this myself. I've released it as 0.3.0.
Hello, I had a task to deploy the S3 exporter and integrate with our local S3 service. I have added new variable for that. Thank you for your work and maybe my little update will be helpful for you too.