|
| 1 | +# code-server |
| 2 | + |
| 3 | +[code-server](https://github.com/cdr/code-server) code-server is VS Code running |
| 4 | +on a remote server, accessible through the browser. |
| 5 | + |
| 6 | +## TL;DR; |
| 7 | + |
| 8 | +```console |
| 9 | +$ git clone https://github.com/cdr/code-server.git |
| 10 | +$ helm install deployment/chart |
| 11 | +``` |
| 12 | + |
| 13 | +## Introduction |
| 14 | + |
| 15 | +This chart bootstraps a code-server deployment on a |
| 16 | +[Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) |
| 17 | +package manager. |
| 18 | + |
| 19 | +## Prerequisites |
| 20 | + |
| 21 | + - Kubernetes 1.6+ |
| 22 | + |
| 23 | +## Installing the Chart |
| 24 | + |
| 25 | +To install the chart with the release name `my-release`: |
| 26 | + |
| 27 | +```console |
| 28 | +$ helm install --name my-release deployment/chart |
| 29 | +``` |
| 30 | + |
| 31 | +The command deploys code-server on the Kubernetes cluster in the default |
| 32 | +configuration. The [configuration](#configuration) section lists the parameters |
| 33 | +that can be configured during installation. |
| 34 | + |
| 35 | +> **Tip**: List all releases using `helm list` |
| 36 | +
|
| 37 | +## Uninstalling the Chart |
| 38 | + |
| 39 | +To uninstall/delete the `my-release` deployment: |
| 40 | + |
| 41 | +```console |
| 42 | +$ helm delete my-release |
| 43 | +``` |
| 44 | + |
| 45 | +The command removes all the Kubernetes components associated with the chart and |
| 46 | +deletes the release. |
| 47 | + |
| 48 | +## Configuration |
| 49 | + |
| 50 | +The following table lists the configurable parameters of the nginx-ingress chart |
| 51 | +and their default values. |
| 52 | + |
| 53 | + |
| 54 | +The following table lists the configurable parameters of the code-server chart |
| 55 | +and their default values. |
| 56 | + |
| 57 | +| Parameter | Description | Default | |
| 58 | +| --------------------------------- | ------------------------------------------ | --------------------------------------------------------- | |
| 59 | +| `image.registry` | Code-server image registry | `docker.io` | |
| 60 | +| `image.repository` | Code-server Image name | `codercom/code-server` | |
| 61 | +| `image.tag` | Code-server Image tag | `{TAG_NAME}` | |
| 62 | +| `image.pullPolicy` | Code-server image pull policy | `IfNotPresent` | |
| 63 | +| `nameOverride` | String to partially override code-server.fullname template with a string (will prepend the release name) | `nil` | |
| 64 | +| `fullnameOverride` | String to fully override code-server.fullname template with a string | |
| 65 | +| `hostnameOverride` | String to fully override code-server container hostname | |
| 66 | +| `service.type` | Kubernetes Service type | `NodePort` | |
| 67 | +| `service.port` | Service HTTP port | `8443` | |
| 68 | +| `ingress.enabled` | Enable ingress controller resource | `false` | |
| 69 | +| `ingress.hosts[0].name` | Hostname to your code-server installation | `code-server.local` | |
| 70 | +| `ingress.hosts[0].path` | Path within the url structure | `/` | |
| 71 | +| `ingress.hosts[0].tls` | Utilize TLS backend in ingress | `false` | |
| 72 | +| `ingress.hosts[0].certManager` | Add annotations for cert-manager | `false` | |
| 73 | +| `ingress.hosts[0].tlsSecret` | TLS Secret (certificates) | `code-server.local-tls-secret` | |
| 74 | +| `ingress.hosts[0].annotations` | Annotations for this host's ingress record | `[]` | |
| 75 | +| `ingress.secrets[0].name` | TLS Secret Name | `nil` | |
| 76 | +| `ingress.secrets[0].certificate` | TLS Secret Certificate | `nil` | |
| 77 | +| `ingress.secrets[0].key` | TLS Secret Key | `nil` | |
| 78 | +| `extraArgs` | Additional code-server container arguments | `{}` | |
| 79 | +| `extraVars` | Optional environment variables for code-server | `{}` | |
| 80 | +| `volumePermissions.enabled` | Enable volume permissions init container | `true` | |
| 81 | +| `volumePermissions.securityContext.runAsUser` | User ID for the init container | `0` | |
| 82 | +| `securityContext.enabled` | Enable security context | `true` | |
| 83 | +| `securityContext.fsGroup` | Group ID for the container | `1000` | |
| 84 | +| `securityContext.runAsUser` | User ID for the container | `1000` | |
| 85 | +| `resources` | CPU/Memory resource requests/limits | `{}` | |
| 86 | +| `persistence.enabled` | Enable persistence using PVC | `true` | |
| 87 | +| `persistence.storageClass` | PVC Storage Class for code-server volume | `nil` | |
| 88 | +| `persistence.accessMode` | PVC Access Mode for code-server volume | `ReadWriteOnce` | |
| 89 | +| `persistence.size` | PVC Storage Request for code-server volume | `8Gi` | |
| 90 | +| `extraContainers` | Sidecar containers to add to the code-server pod | `{}` | |
| 91 | +| `extraSecretMounts` | Additional code-server server secret mounts | `[]` | |
| 92 | +| `extraVolumeMounts` | Additional code-server server volume mounts | `[]` | |
| 93 | +| `extraConfigmapMounts` | Additional code-server server configMap volume mounts | `[]` | |
| 94 | + |
| 95 | +Specify each parameter using the `--set key=value[,key=value]` argument to `helm |
| 96 | +install`. For example, |
| 97 | + |
| 98 | +```console |
| 99 | +$ helm install --name my-release \ |
| 100 | + --set persistence.enabled=false \ |
| 101 | + deployment/chart |
| 102 | +``` |
| 103 | + |
| 104 | +The above command sets the the persistence storage to false. |
| 105 | + |
| 106 | +Alternatively, a YAML file that specifies the values for the above parameters |
| 107 | +can be provided while installing the chart. For example, |
| 108 | + |
| 109 | +```console |
| 110 | +$ helm install --name my-release -f values.yaml deployment/chart |
| 111 | +``` |
| 112 | + |
| 113 | +> **Tip**: You can use the default [values.yaml](values.yaml) |
| 114 | +
|
| 115 | + |
0 commit comments