Skip to content

Commit 070a122

Browse files
authored
Merge pull request #4043 from cdr/jsjoeio-revert-helm
Revert "refactor: move helm README to docs/helm.md"
2 parents c913386 + f319fca commit 070a122

File tree

4 files changed

+163
-166
lines changed

4 files changed

+163
-166
lines changed

ci/helm-chart/README.md

+162
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# code-server
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
101+
install`. For example,
102+
103+
```console
104+
$ helm upgrade --install code-server \
105+
ci/helm-chart \
106+
--set persistence.enabled=false
107+
```
108+
109+
The above command sets the the persistence storage to false.
110+
111+
Alternatively, a YAML file that specifies the values for the above parameters
112+
can be provided while installing the chart. For example,
113+
114+
```console
115+
$ helm upgrade --install code-server ci/helm-chart -f values.yaml
116+
```
117+
118+
> **Tip**: You can use the default [values.yaml](values.yaml)
119+
120+
# Extra Containers
121+
122+
There are two parameters which allow to add more containers to pod.
123+
Use `extraContainers` to add regular containers
124+
and `extraInitContainers` to add init containers. You can read more
125+
about init containers in [k8s documentation](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/).
126+
127+
Both parameters accept strings and use them as a templates
128+
129+
Example of using `extraInitContainers`:
130+
131+
``` yaml
132+
extraInitContainers: |
133+
- name: customization
134+
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
135+
imagePullPolicy: IfNotPresent
136+
env:
137+
- name: SERVICE_URL
138+
value: https://open-vsx.org/vscode/gallery
139+
- name: ITEM_URL
140+
value: https://open-vsx.org/vscode/item
141+
command:
142+
- sh
143+
- -c
144+
- |
145+
code-server --install-extension ms-python.python
146+
code-server --install-extension golang.Go
147+
volumeMounts:
148+
- name: data
149+
mountPath: /home/coder
150+
151+
```
152+
153+
With this yaml in file `init.yaml`, you can execute
154+
155+
```console
156+
$ helm upgrade --install code-server \
157+
ci/helm-chart \
158+
--values init.yaml
159+
```
160+
161+
to deploy code-server with python and golang extensions preinstalled
162+
before main container have started.

docs/helm.md

-160
This file was deleted.

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

229229
## Windows
230230

docs/manifest.json

-5
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@
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-
},
4540
{
4641
"title": "iPad",
4742
"description": "How to access your code-server installation using an iPad.",

0 commit comments

Comments
 (0)