From f319fca2915b2bf45c5ba40f553b021274eb9d17 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Wed, 25 Aug 2021 12:02:39 -0700 Subject: [PATCH] Revert "refactor: move helm README to docs/helm.md" This reverts commit bc3fb5e22ff2e4ed7fa68b1d8d746b83924f6daf. --- ci/helm-chart/README.md | 162 ++++++++++++++++++++++++++++++++++++++++ docs/helm.md | 160 --------------------------------------- docs/install.md | 2 +- docs/manifest.json | 5 -- 4 files changed, 163 insertions(+), 166 deletions(-) create mode 100644 ci/helm-chart/README.md delete mode 100644 docs/helm.md diff --git a/ci/helm-chart/README.md b/ci/helm-chart/README.md new file mode 100644 index 000000000..2e576c3ec --- /dev/null +++ b/ci/helm-chart/README.md @@ -0,0 +1,162 @@ +# code-server + +![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) + +[code-server](https://github.com/cdr/code-server) code-server is VS Code running +on a remote server, accessible through the browser. + +This chart is community maintained by [@Matthew-Beckett](https://github.com/Matthew-Beckett) and [@alexgorbatchev](https://github.com/alexgorbatchev) + +## TL;DR; + +```console +$ git clone https://github.com/cdr/code-server +$ cd code-server +$ helm upgrade --install code-server ci/helm-chart +``` + +## Introduction + +This chart bootstraps a code-server deployment on a +[Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) +package manager. + +## Prerequisites + + - Kubernetes 1.6+ + +## Installing the Chart + +To install the chart with the release name `code-server`: + +```console +$ git clone https://github.com/cdr/code-server +$ cd code-server +$ helm upgrade --install code-server ci/helm-chart +``` + +The command deploys code-server on the Kubernetes cluster in the default +configuration. The [configuration](#configuration) section lists the parameters +that can be configured during installation. + +> **Tip**: List all releases using `helm list` + +## Uninstalling the Chart + +To uninstall/delete the `code-server` deployment: + +```console +$ helm delete code-server +``` + +The command removes all the Kubernetes components associated with the chart and +deletes the release. + +## Configuration + +The following table lists the configurable parameters of the code-server chart +and their default values. + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| extraArgs | list | `[]` | | +| extraConfigmapMounts | list | `[]` | | +| extraContainers | string | `""` | | +| extraInitContainers | string | `""` | | +| extraSecretMounts | list | `[]` | | +| extraVars | list | `[]` | | +| extraVolumeMounts | list | `[]` | | +| fullnameOverride | string | `""` | | +| hostnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"codercom/code-server"` | | +| image.tag | string | `"3.11.1"` | | +| imagePullSecrets | list | `[]` | | +| ingress.enabled | bool | `false` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| persistence.accessMode | string | `"ReadWriteOnce"` | | +| persistence.annotations | object | `{}` | | +| persistence.enabled | bool | `true` | | +| persistence.size | string | `"1Gi"` | | +| podAnnotations | object | `{}` | | +| podSecurityContext | object | `{}` | | +| replicaCount | int | `1` | | +| resources | object | `{}` | | +| securityContext.enabled | bool | `true` | | +| securityContext.fsGroup | int | `1000` | | +| securityContext.runAsUser | int | `1000` | | +| service.port | int | `8443` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `nil` | | +| tolerations | list | `[]` | | +| volumePermissions.enabled | bool | `true` | | +| volumePermissions.securityContext.runAsUser | int | `0` | | + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm +install`. For example, + +```console +$ helm upgrade --install code-server \ + ci/helm-chart \ + --set persistence.enabled=false +``` + +The above command sets the the persistence storage to false. + +Alternatively, a YAML file that specifies the values for the above parameters +can be provided while installing the chart. For example, + +```console +$ helm upgrade --install code-server ci/helm-chart -f values.yaml +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) + +# Extra Containers + +There are two parameters which allow to add more containers to pod. +Use `extraContainers` to add regular containers +and `extraInitContainers` to add init containers. You can read more +about init containers in [k8s documentation](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/). + +Both parameters accept strings and use them as a templates + +Example of using `extraInitContainers`: + +``` yaml +extraInitContainers: | + - name: customization + image: {{ .Values.image.repository }}:{{ .Values.image.tag }} + imagePullPolicy: IfNotPresent + env: + - name: SERVICE_URL + value: https://open-vsx.org/vscode/gallery + - name: ITEM_URL + value: https://open-vsx.org/vscode/item + command: + - sh + - -c + - | + code-server --install-extension ms-python.python + code-server --install-extension golang.Go + volumeMounts: + - name: data + mountPath: /home/coder + +``` + +With this yaml in file `init.yaml`, you can execute + +```console +$ helm upgrade --install code-server \ + ci/helm-chart \ + --values init.yaml +``` + +to deploy code-server with python and golang extensions preinstalled +before main container have started. \ No newline at end of file diff --git a/docs/helm.md b/docs/helm.md deleted file mode 100644 index bc34bca32..000000000 --- a/docs/helm.md +++ /dev/null @@ -1,160 +0,0 @@ -# code-server Helm Chart - -![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) - -[code-server](https://github.com/cdr/code-server) code-server is VS Code running -on a remote server, accessible through the browser. - -This chart is community maintained by [@Matthew-Beckett](https://github.com/Matthew-Beckett) and [@alexgorbatchev](https://github.com/alexgorbatchev) - -## TL;DR; - -```console -$ git clone https://github.com/cdr/code-server -$ cd code-server -$ helm upgrade --install code-server ci/helm-chart -``` - -## Introduction - -This chart bootstraps a code-server deployment on a -[Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) -package manager. - -## Prerequisites - -- Kubernetes 1.6+ - -## Installing the Chart - -To install the chart with the release name `code-server`: - -```console -$ git clone https://github.com/cdr/code-server -$ cd code-server -$ helm upgrade --install code-server ci/helm-chart -``` - -The command deploys code-server on the Kubernetes cluster in the default -configuration. The [configuration](#configuration) section lists the parameters -that can be configured during installation. - -> **Tip**: List all releases using `helm list` - -## Uninstalling the Chart - -To uninstall/delete the `code-server` deployment: - -```console -$ helm delete code-server -``` - -The command removes all the Kubernetes components associated with the chart and -deletes the release. - -## Configuration - -The following table lists the configurable parameters of the code-server chart -and their default values. - -## Values - -| Key | Type | Default | Description | -| ------------------------------------------- | ------ | ------------------------ | ----------- | -| affinity | object | `{}` | | -| extraArgs | list | `[]` | | -| extraConfigmapMounts | list | `[]` | | -| extraContainers | string | `""` | | -| extraInitContainers | string | `""` | | -| extraSecretMounts | list | `[]` | | -| extraVars | list | `[]` | | -| extraVolumeMounts | list | `[]` | | -| fullnameOverride | string | `""` | | -| hostnameOverride | string | `""` | | -| image.pullPolicy | string | `"Always"` | | -| image.repository | string | `"codercom/code-server"` | | -| image.tag | string | `"3.11.1"` | | -| imagePullSecrets | list | `[]` | | -| ingress.enabled | bool | `false` | | -| nameOverride | string | `""` | | -| nodeSelector | object | `{}` | | -| persistence.accessMode | string | `"ReadWriteOnce"` | | -| persistence.annotations | object | `{}` | | -| persistence.enabled | bool | `true` | | -| persistence.size | string | `"1Gi"` | | -| podAnnotations | object | `{}` | | -| podSecurityContext | object | `{}` | | -| replicaCount | int | `1` | | -| resources | object | `{}` | | -| securityContext.enabled | bool | `true` | | -| securityContext.fsGroup | int | `1000` | | -| securityContext.runAsUser | int | `1000` | | -| service.port | int | `8443` | | -| service.type | string | `"ClusterIP"` | | -| serviceAccount.create | bool | `true` | | -| serviceAccount.name | string | `nil` | | -| tolerations | list | `[]` | | -| volumePermissions.enabled | bool | `true` | | -| volumePermissions.securityContext.runAsUser | int | `0` | | - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, - -```console -$ helm upgrade --install code-server \ - ci/helm-chart \ - --set persistence.enabled=false -``` - -The above command sets the the persistence storage to false. - -Alternatively, a YAML file that specifies the values for the above parameters -can be provided while installing the chart. For example, - -```console -$ helm upgrade --install code-server ci/helm-chart -f values.yaml -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) - -# Extra Containers - -There are two parameters which allow to add more containers to pod. -Use `extraContainers` to add regular containers -and `extraInitContainers` to add init containers. You can read more -about init containers in [k8s documentation](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/). - -Both parameters accept strings and use them as a templates - -Example of using `extraInitContainers`: - -```yaml -extraInitContainers: | - - name: customization - image: {{ .Values.image.repository }}:{{ .Values.image.tag }} - imagePullPolicy: IfNotPresent - env: - - name: SERVICE_URL - value: https://open-vsx.org/vscode/gallery - - name: ITEM_URL - value: https://open-vsx.org/vscode/item - command: - - sh - - -c - - | - code-server --install-extension ms-python.python - code-server --install-extension golang.Go - volumeMounts: - - name: data - mountPath: /home/coder -``` - -With this yaml in file `init.yaml`, you can execute - -```console -$ helm upgrade --install code-server \ - ci/helm-chart \ - --values init.yaml -``` - -to deploy code-server with python and golang extensions preinstalled -before main container have started. diff --git a/docs/install.md b/docs/install.md index e325fd6c4..29725227a 100644 --- a/docs/install.md +++ b/docs/install.md @@ -224,7 +224,7 @@ alternative](https://hub.docker.com/r/linuxserver/code-server). ## Helm -You can install code-server using the [Helm package manager](https://coder.com/docs/code-server/latest/helm). +You can install code-server via [Helm](https://github.com/cdr/code-server/blob/main/ci/helm-chart/README.md). ## Windows diff --git a/docs/manifest.json b/docs/manifest.json index 33fd1d7da..01d47fffc 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -37,11 +37,6 @@ "description": "How to run code-server --link", "path": "./link.md" }, - { - "title": "Helm", - "description": "How to install code-server using the Helm package manager", - "path": "./helm.md" - }, { "title": "iPad", "description": "How to access your code-server installation using an iPad.",