|
| 1 | +<!-- |
| 2 | + DO NOT EDIT README.md directly. |
| 3 | + README.md is automatically generated from README.md.gotmpl |
| 4 | +--> |
| 5 | + |
| 6 | +# Sourcegraph Exexutor Helm Chart |
| 7 | + |
| 8 | +This chart contains two deployments, Sourcegraph Executors and a private Docker Registry. It is a supplemental chart for the parent [sourcegraph/sourcegraph] Helm Chart if you wish to deploy executors |
| 9 | + |
| 10 | +Use cases: |
| 11 | + |
| 12 | +- Deploy Sourcegraph Executors on Kubernetes |
| 13 | + |
| 14 | +## Requirements |
| 15 | + |
| 16 | +* [Helm 3 CLI](https://helm.sh/docs/intro/install/) |
| 17 | +* Kubernetes 1.19 or greater |
| 18 | + |
| 19 | +## Installation |
| 20 | + |
| 21 | +Add the Sourcegraph charts repo to Helm: |
| 22 | + |
| 23 | +```sh |
| 24 | +helm repo add sourcegraph https://helm.sourcegraph.com/release |
| 25 | +``` |
| 26 | + |
| 27 | +## Usage |
| 28 | + |
| 29 | +> The chart has to be installed in the same namespace as the parent [sourcegraph/sourcegraph] chart |
| 30 | +
|
| 31 | +## Rendering manifests for kubectl deployment |
| 32 | + |
| 33 | +Manifests rendered using the `helm template` command can be used for direct deployment using `kubectl`. |
| 34 | + |
| 35 | +## Configuration Options |
| 36 | + |
| 37 | +Reference the table below for available configuration parameters and consult [executor] documentation. |
| 38 | + |
| 39 | +In addition to the documented values, the `executor` and `private-docker-registry` services also supports the following values |
| 40 | + |
| 41 | +- `executor.affinity` - [learn more](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) |
| 42 | +- `executor.nodeSelector` - [learn more](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) |
| 43 | +- `executor.tolerations` - [learn more](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) |
| 44 | +- `executor.podSecurityContext` - [learn more](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) |
| 45 | +- `executor.env` - consult `values.yaml` |
| 46 | + |
| 47 | +- `privateDockerRegistry.affinity` - [learn more](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) |
| 48 | +- `privateDockerRegistry.nodeSelector` - [learn more](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) |
| 49 | +- `privateDockerRegistry.tolerations` - [learn more](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) |
| 50 | +- `privateDockerRegistry.podSecurityContext` - [learn more](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) |
| 51 | +- `privateDockerRegistry.env` - consult `values.yaml` file |
| 52 | + |
| 53 | +| Key | Type | Default | Description | |
| 54 | +|-----|------|---------|-------------| |
| 55 | +| dind.image.registry | string | `"index.docker.io"` | | |
| 56 | +| dind.image.repository | string | `"docker"` | | |
| 57 | +| dind.image.tag | string | `"20.10.22-dind"` | | |
| 58 | +| executor.enabled | bool | `true` | | |
| 59 | +| executor.env.EXECUTOR_FRONTEND_PASSWORD | object | `{"value":""}` | The shared secret configured in the Sourcegraph instance site config under executors.accessToken. Required. | |
| 60 | +| executor.env.EXECUTOR_FRONTEND_URL | object | `{"value":""}` | The external URL of the Sourcegraph instance. Required. | |
| 61 | +| executor.env.EXECUTOR_QUEUE_NAME | object | `{"value":""}` | The name of the queue to pull jobs from to. Possible values: batches and codeintel. Required. | |
| 62 | +| executor.image.defaultTag | string | `"4.4.1@sha256:ec8bd27e8599694cfb24341c564b0e4e8947f863d98c4f5b1cb6e67dd8697f53"` | | |
| 63 | +| executor.image.name | string | `"executor"` | | |
| 64 | +| privateDockerRegistry.image.registry | string | `"index.docker.io"` | | |
| 65 | +| privateDockerRegistry.image.repository | string | `"docker/regisry"` | | |
| 66 | +| privateDockerRegistry.image.tag | int | `2` | | |
| 67 | +| sourcegraph.affinity | object | `{}` | Affinity, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) | |
| 68 | +| sourcegraph.image.defaultTag | string | `"{{ .Chart.AppVersion }}"` | Global docker image tag | |
| 69 | +| sourcegraph.image.pullPolicy | string | `"IfNotPresent"` | Global docker image pull policy | |
| 70 | +| sourcegraph.image.repository | string | `"index.docker.io/sourcegraph"` | Global docker image registry or prefix | |
| 71 | +| sourcegraph.image.useGlobalTagAsDefault | bool | `false` | When set to true, sourcegraph.image.defaultTag is used as the default defaultTag for all services, instead of service-specific default defaultTags | |
| 72 | +| sourcegraph.imagePullSecrets | list | `[]` | Mount named secrets containing docker credentials | |
| 73 | +| sourcegraph.labels | object | `{}` | Add a global label to all resources | |
| 74 | +| sourcegraph.nameOverride | string | `""` | Set a custom name for the app.kubernetes.io/name annotation | |
| 75 | +| sourcegraph.nodeSelector | object | `{}` | NodeSelector, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) | |
| 76 | +| sourcegraph.podAnnotations | object | `{}` | Add extra annotations to attach to all pods | |
| 77 | +| sourcegraph.podLabels | object | `{}` | Add extra labels to attach to all pods | |
| 78 | +| sourcegraph.tolerations | list | `[]` | Tolerations, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) | |
| 79 | +| storageClass.allowedTopologies | object | `{}` | Persistent volumes topology configuration, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/storage-classes/#allowed-topologies) | |
| 80 | +| storageClass.create | bool | `false` | Enable creation of storageClass. Defaults to Google Cloud Platform. Disable if you have your own existing storage class | |
| 81 | +| storageClass.name | string | `"sourcegraph"` | Name of the storageClass. Use to customize to the existing storage class name | |
| 82 | +| storageClass.parameters | object | `{}` | Extra parameters of storageClass, consult your cloud provider persistent storage documentation | |
| 83 | +| storageClass.provisioner | string | `"kubernetes.io/gce-pd"` | Name of the storageClass provisioner, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/storage-classes/#provisioner) and consult your cloud provider persistent storage documentation | |
| 84 | +| storageClass.type | string | `"pd-ssd"` | Value of `type` key in storageClass `parameters`, consult your cloud provider persistent storage documentation | |
| 85 | + |
| 86 | +## Troubleshooting |
| 87 | + |
| 88 | +See a list of running executor pods |
| 89 | + |
| 90 | +```sh |
| 91 | +kubectl get pods -l app=executor |
| 92 | +``` |
| 93 | + |
| 94 | +Check logs of the executor container |
| 95 | + |
| 96 | +```sh |
| 97 | +kubectl logs -l app=executor -c executor |
| 98 | +``` |
| 99 | + |
| 100 | +[sourcegraph/sourcegraph]: ../sourcegraph/ |
| 101 | +[sourcegraph/sourcegraph-executor]: ./ |
| 102 | +[executor]: https://docs.sourcegraph.com/admin/executors |
0 commit comments