-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documented environment variables used in Tink Server/CLI/Worker: #545
Conversation
Codecov Report
@@ Coverage Diff @@
## main #545 +/- ##
=======================================
Coverage 34.76% 34.76%
=======================================
Files 44 44
Lines 3348 3348
=======================================
Hits 1164 1164
Misses 2085 2085
Partials 99 99 Continue to review full report at Codecov.
|
ffa917a
to
474a5aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love to see the list sorted but I see why its the way it is here. Its very weird to see all the similarly named env vars, I think it would be good to have one as the "most used/main" var and the other one refers to it with context. Like:
PGDATABASE
: name of postgres database to connect to
POSTGRES_DATABASE
: like PGDATABASE, should be same value, used by $thing.
... actually where is this used? I can't see it in grep.
docs/ENVVARS.md
Outdated
| ---------------------------------------------------------------------------------------------- | ------ | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `TINK_AUTH_USERNAME=tink` | string | server | username to use for basic auth to http endpoints | | ||
| `TINK_AUTH_PASSWORD=tink` | string | server | password to use for basic auth to http endpoints | | ||
| `TINKERBELL_CERT_URL=http://127.0.0.1:42114/cert` | string | cli/worker | string url from which to get a TLS certificate | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should Type say string/url
and avoid saying so in Description? Also TLS certificate for what? Its probably a good idea to be explicit since tls connections usually just work and don't need this kind of feeding into a binary.
docs/ENVVARS.md
Outdated
| `TINKERBELL_CERTS_DIR=/certs` | string | server | a directory which contains the `bundle.pem` and `server-key.pem` files | | ||
| `CERTS_DIR=/certs` | string | server | a directory which contains the `bundle.pem` and `server-key.pem` files | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these used for the same things? should we call out what its for?
docs/ENVVARS.md
Outdated
| `TINKERBELL_TLS_CERT="-----BEGIN RSA PRIVATE KEY-----\n....\n-----END RSA PRIVATE KEY-----\n"` | string | server | a TLS certificate for use with Tink server | | ||
| `TLS_CERT="-----BEGIN RSA PRIVATE KEY-----\n....\n-----END RSA PRIVATE KEY-----\n"` | string | server | a TLS certificate for use with Tink server | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
The cobra/viper library use is set up in such a way that all CLI flags are able to be set via environment variables. So the CLI flag |
Oh one more thing @jacobweinstock, worth linking somehow from README or CONTRIBUTING docs. |
8854507
to
145ba8c
Compare
Ahh, is it worth mentioning which ones are old deprecated (looking at Lines 57 to 96 in 5923ca9
|
are you saying that all the variables in |
a9d8817
to
600a5c0
Compare
done |
600a5c0
to
939e844
Compare
Yep, most of these I can find as viper/cli args:
The only ones I can't find are TINK_AUTH_USERNAME/PASSWORD... |
a7a22f6
to
86105e8
Compare
Hoping this is will help with the development and operation of Tink Server/CLI/Worker. Signed-off-by: Jacob Weinstock <[email protected]>
86105e8
to
18d1fab
Compare
IMHO, This doc is better than nothing. Let's merge it and iterate forward. |
Description
Hoping this is will help with the development and operation of Tink Server/CLI/Worker.
Why is this needed
Fixes: #417
How Has This Been Tested?
How are existing users impacted? What migration steps/scripts do we need?
Checklist:
I have: