Skip to content

docs: update docs to set SupportLinks #11699

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

Merged
merged 9 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 34 additions & 44 deletions docs/admin/appearance.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,65 +48,55 @@ server.

![support links](../images/admin/support-links.png)

Custom links can be set in the deployment configuration using the
`-c <yamlFile>` 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.
<div class=tab>

#### 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 <coder-namespace> --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 <coder-namespace> -f <values-file.yaml>
```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
```

</div>

## Up next

- [Enterprise](../enterprise.md)
15 changes: 14 additions & 1 deletion docs/templates/icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down