feat: expose support links as env variables (#11697)

This commit is contained in:
Marcin Tojek
2024-01-19 11:20:36 +01:00
committed by GitHub
parent bf0a6fcc32
commit 89fd29478d
5 changed files with 19 additions and 8 deletions
+3
View File
@@ -54,6 +54,9 @@ OPTIONS:
The algorithm to use for generating ssh keys. Accepted values are
"ed25519", "ecdsa", or "rsa4096".
--support-links struct[[]codersdk.LinkConfig], $CODER_SUPPORT_LINKS
Support links to display in the top right drop down menu.
--update-check bool, $CODER_UPDATE_CHECK (default: false)
Periodically check for new releases of Coder and inform the owner. The
check is performed once per day.
+3 -3
View File
@@ -1793,11 +1793,11 @@ Write out the current server config as YAML to stdout.`,
{
Name: "Support Links",
Description: "Support links to display in the top right drop down menu.",
Env: "CODER_SUPPORT_LINKS",
Flag: "support-links",
YAML: "supportLinks",
Value: &c.Support.Links,
// The support links are hidden until they are defined in the
// YAML.
Hidden: true,
Hidden: false,
},
{
// Env handling is done in cli.ReadGitAuthFromEnvironment
-5
View File
@@ -65,11 +65,6 @@ func TestDeploymentValues_HighlyConfigurable(t *testing.T) {
"External Token Encryption Keys": {
yaml: true,
},
// These complex objects should be configured through YAML.
"Support Links": {
flag: true,
env: true,
},
"External Auth Providers": {
// Technically External Auth Providers can be provided through the env,
// but bypassing clibase. See cli.ReadExternalAuthProvidersFromEnv.
+10
View File
@@ -918,6 +918,16 @@ Controls if the 'Strict-Transport-Security' header is set on all static file res
Two optional fields can be set in the Strict-Transport-Security header; 'includeSubDomains' and 'preload'. The 'strict-transport-security' flag must be set to a non-zero value for these options to be used.
### --support-links
| | |
| ----------- | ------------------------------------------ |
| Type | <code>struct[[]codersdk.LinkConfig]</code> |
| Environment | <code>$CODER_SUPPORT_LINKS</code> |
| YAML | <code>supportLinks</code> |
Support links to display in the top right drop down menu.
### --tls-address
| | |
+3
View File
@@ -55,6 +55,9 @@ OPTIONS:
The algorithm to use for generating ssh keys. Accepted values are
"ed25519", "ecdsa", or "rsa4096".
--support-links struct[[]codersdk.LinkConfig], $CODER_SUPPORT_LINKS
Support links to display in the top right drop down menu.
--update-check bool, $CODER_UPDATE_CHECK (default: false)
Periodically check for new releases of Coder and inform the owner. The
check is performed once per day.