Skip to content

Commit bc3fb5e

Browse files
jsjoeioTeffen Ellis
authored and
Teffen Ellis
committed
refactor: move helm README to docs/helm.md
1 parent 3e55e5e commit bc3fb5e

File tree

4 files changed

+166
-163
lines changed

4 files changed

+166
-163
lines changed

ci/helm-chart/README.md

-162
This file was deleted.

docs/helm.md

+160
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
# code-server Helm Chart
2+
3+
![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.11.1](https://img.shields.io/badge/AppVersion-3.11.1-informational?style=flat-square)
4+
5+
[code-server](https://github.com/cdr/code-server) code-server is VS Code running
6+
on a remote server, accessible through the browser.
7+
8+
This chart is community maintained by [@Matthew-Beckett](https://github.com/Matthew-Beckett) and [@alexgorbatchev](https://github.com/alexgorbatchev)
9+
10+
## TL;DR;
11+
12+
```console
13+
$ git clone https://github.com/cdr/code-server
14+
$ cd code-server
15+
$ helm upgrade --install code-server ci/helm-chart
16+
```
17+
18+
## Introduction
19+
20+
This chart bootstraps a code-server deployment on a
21+
[Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh)
22+
package manager.
23+
24+
## Prerequisites
25+
26+
- Kubernetes 1.6+
27+
28+
## Installing the Chart
29+
30+
To install the chart with the release name `code-server`:
31+
32+
```console
33+
$ git clone https://github.com/cdr/code-server
34+
$ cd code-server
35+
$ helm upgrade --install code-server ci/helm-chart
36+
```
37+
38+
The command deploys code-server on the Kubernetes cluster in the default
39+
configuration. The [configuration](#configuration) section lists the parameters
40+
that can be configured during installation.
41+
42+
> **Tip**: List all releases using `helm list`
43+
44+
## Uninstalling the Chart
45+
46+
To uninstall/delete the `code-server` deployment:
47+
48+
```console
49+
$ helm delete code-server
50+
```
51+
52+
The command removes all the Kubernetes components associated with the chart and
53+
deletes the release.
54+
55+
## Configuration
56+
57+
The following table lists the configurable parameters of the code-server chart
58+
and their default values.
59+
60+
## Values
61+
62+
| Key | Type | Default | Description |
63+
| ------------------------------------------- | ------ | ------------------------ | ----------- |
64+
| affinity | object | `{}` | |
65+
| extraArgs | list | `[]` | |
66+
| extraConfigmapMounts | list | `[]` | |
67+
| extraContainers | string | `""` | |
68+
| extraInitContainers | string | `""` | |
69+
| extraSecretMounts | list | `[]` | |
70+
| extraVars | list | `[]` | |
71+
| extraVolumeMounts | list | `[]` | |
72+
| fullnameOverride | string | `""` | |
73+
| hostnameOverride | string | `""` | |
74+
| image.pullPolicy | string | `"Always"` | |
75+
| image.repository | string | `"codercom/code-server"` | |
76+
| image.tag | string | `"3.11.1"` | |
77+
| imagePullSecrets | list | `[]` | |
78+
| ingress.enabled | bool | `false` | |
79+
| nameOverride | string | `""` | |
80+
| nodeSelector | object | `{}` | |
81+
| persistence.accessMode | string | `"ReadWriteOnce"` | |
82+
| persistence.annotations | object | `{}` | |
83+
| persistence.enabled | bool | `true` | |
84+
| persistence.size | string | `"1Gi"` | |
85+
| podAnnotations | object | `{}` | |
86+
| podSecurityContext | object | `{}` | |
87+
| replicaCount | int | `1` | |
88+
| resources | object | `{}` | |
89+
| securityContext.enabled | bool | `true` | |
90+
| securityContext.fsGroup | int | `1000` | |
91+
| securityContext.runAsUser | int | `1000` | |
92+
| service.port | int | `8443` | |
93+
| service.type | string | `"ClusterIP"` | |
94+
| serviceAccount.create | bool | `true` | |
95+
| serviceAccount.name | string | `nil` | |
96+
| tolerations | list | `[]` | |
97+
| volumePermissions.enabled | bool | `true` | |
98+
| volumePermissions.securityContext.runAsUser | int | `0` | |
99+
100+
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
101+
102+
```console
103+
$ helm upgrade --install code-server \
104+
ci/helm-chart \
105+
--set persistence.enabled=false
106+
```
107+
108+
The above command sets the the persistence storage to false.
109+
110+
Alternatively, a YAML file that specifies the values for the above parameters
111+
can be provided while installing the chart. For example,
112+
113+
```console
114+
$ helm upgrade --install code-server ci/helm-chart -f values.yaml
115+
```
116+
117+
> **Tip**: You can use the default [values.yaml](values.yaml)
118+
119+
# Extra Containers
120+
121+
There are two parameters which allow to add more containers to pod.
122+
Use `extraContainers` to add regular containers
123+
and `extraInitContainers` to add init containers. You can read more
124+
about init containers in [k8s documentation](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/).
125+
126+
Both parameters accept strings and use them as a templates
127+
128+
Example of using `extraInitContainers`:
129+
130+
```yaml
131+
extraInitContainers: |
132+
- name: customization
133+
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
134+
imagePullPolicy: IfNotPresent
135+
env:
136+
- name: SERVICE_URL
137+
value: https://open-vsx.org/vscode/gallery
138+
- name: ITEM_URL
139+
value: https://open-vsx.org/vscode/item
140+
command:
141+
- sh
142+
- -c
143+
- |
144+
code-server --install-extension ms-python.python
145+
code-server --install-extension golang.Go
146+
volumeMounts:
147+
- name: data
148+
mountPath: /home/coder
149+
```
150+
151+
With this yaml in file `init.yaml`, you can execute
152+
153+
```console
154+
$ helm upgrade --install code-server \
155+
ci/helm-chart \
156+
--values init.yaml
157+
```
158+
159+
to deploy code-server with python and golang extensions preinstalled
160+
before main container have started.

docs/install.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ alternative](https://hub.docker.com/r/linuxserver/code-server).
224224

225225
## Helm
226226

227-
You can install code-server via [Helm](https://github.com/cdr/code-server/blob/main/ci/helm-chart/README.md).
227+
You can install code-server using the [Helm package manager](https://coder.com/docs/code-server/latest/helm).
228228

229229
## Windows
230230

docs/manifest.json

+5
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
"description": "How to run code-server --link",
3838
"path": "./link.md"
3939
},
40+
{
41+
"title": "Helm",
42+
"description": "How to install code-server using the Helm package manager",
43+
"path": "./helm.md"
44+
},
4045
{
4146
"title": "iPad",
4247
"description": "How to access your code-server installation using an iPad.",

0 commit comments

Comments
 (0)