diff --git a/docs/admin/appearance.md b/docs/admin/appearance.md index b1bd1aa7b4aa8..125a895f4bced 100644 --- a/docs/admin/appearance.md +++ b/docs/admin/appearance.md @@ -48,65 +48,55 @@ server. ![support links](../images/admin/support-links.png) -Custom links can be set in the deployment configuration using the -`-c ` flag to `coder server`. - -```yaml -supportLinks: - - name: "On-call 🔥" - target: "http://on-call.example.internal" - icon: "bug" - - name: "😉 Getting started with Go!" - target: "https://go.dev/" - - name: "Community" - target: "https://github.com/coder/coder" - icon: "chat" -``` - ### Icons -The link icons are optional, and limited to: `bug`, `chat`, and `docs`. +The link icons are optional, and can be set to any url or +[builtin icon](../templates/icons.md#bundled-icons), additionally `bug`, `chat`, +and `docs` are available as three special icons. -### Kubernetes configuration +### Configuration -To pass in the `supportLinks` YAML file above into your Coder Kubernetes -deployment, follow the steps below. +
+ +#### Kubernetes -#### 1. Create Kubernetes Secret From File - -Run the below command to create the YAML file as a Kubernetes secret in your -cluster: - -```console -kubectl create secret generic coder-support-links -n --from-file=config.yaml -``` - -#### 2. Mount Secret as Volume in Helm Chart - -Next, update your Helm chart values as follows: +To configure support links in your Coder Kubernetes deployment, update your Helm +chart values as follows: ```yaml coder: env: - - name: CODER_CONFIG_PATH - value: /etc/coder/config.yaml - volumes: - - name: coder-config - secret: - secretName: coder-support-links - volumeMounts: - - name: coder-config - mountPath: /etc/coder/ + - name: CODER_SUPPORT_LINKS + value: > + [{"name": "Hello GitHub", "target": "https://github.com/coder/coder", + "icon": "bug"}, + {"name": "Hello Slack", "target": + "https://codercom.slack.com/archives/C014JH42DBJ", "icon": + "/icon/slack.svg"}, + {"name": "Hello Discord", "target": "https://discord.gg/coder", "icon": + "/icon/discord.svg"}, + {"name": "Hello Foobar", "target": "https://foo.com/bar", "icon": + "/emojis/1f3e1.png"}] ``` -#### 3. Upgrade Coder +#### System package + +if running as a system service, set an environment variable +`CODER_SUPPORT_LINKS` in `/etc/coder.d/coder.env` as follows, -Lastly, upgrade Coder using the following command: +```env +CODER_SUPPORT_LINKS='[{"name": "Hello GitHub", "target": "https://github.com/coder/coder", "icon": "bug"}, {"name": "Hello Slack", "target": "https://codercom.slack.com/archives/C014JH42DBJ", "icon": "https://raw.githubusercontent.com/coder/coder/main/site/static/icon/slack.svg"}, {"name": "Hello Discord", "target": "https://discord.gg/coder", "icon": "https://raw.githubusercontent.com/coder/coder/main/site/static/icon/discord.svg"}, {"name": "Hello Foobar", "target": "https://discord.gg/coder", "icon": "/emojis/1f3e1.png"}]' +``` + +For CLI, use, -```console -helm upgrade coder coder-v2/coder -n -f +```shell +export CODER_SUPPORT_LINKS='[{"name": "Hello GitHub", "target": "https://github.com/coder/coder", "icon": "bug"}, {"name": "Hello Slack", "target": "https://codercom.slack.com/archives/C014JH42DBJ", "icon": "https://raw.githubusercontent.com/coder/coder/main/site/static/icon/slack.svg"}, {"name": "Hello Discord", "target": "https://discord.gg/coder", "icon": "https://raw.githubusercontent.com/coder/coder/main/site/static/icon/discord.svg"}, {"name": "Hello Foobar", "target": "https://discord.gg/coder", "icon": "/emojis/1f3e1.png"}]' +coder-server ``` +
+ ## Up next - [Enterprise](../enterprise.md) diff --git a/docs/templates/icons.md b/docs/templates/icons.md index a9072c3f14a01..0dc129c90a738 100644 --- a/docs/templates/icons.md +++ b/docs/templates/icons.md @@ -36,7 +36,20 @@ come bundled with your Coder deployment. - [**Authentication Providers**](https://coder.com/docs/v2/latest/admin/external-auth): - - Use icons for external authentication providers to make them recognizable + - Use icons for external authentication providers to make them recognizable. + You can set an icon for each provider by setting the + `CODER_EXTERNAL_AUTH_X_ICON` environment variable, where `X` is the number + of the provider. + + ```env + CODER_EXTERNAL_AUTH_0_ICON=/icon/github.svg + CODER_EXTERNAL_AUTH_1_ICON=/icon/google.svg + ``` + +- [**Support Links**](../admin/appearance#support-links): + + - Use icons for support links to make them recognizable. You can set the + `icon` field for each link in `CODER_SUPPORT_LINKS` array. ## Bundled icons