You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configure.md
+76-67Lines changed: 76 additions & 67 deletions
Original file line number
Diff line number
Diff line change
@@ -126,22 +126,22 @@ Add a network rule that allows ingress traffic to port 30080 (HTTP) on at least
126
126
127
127
1. Change the type of the `sourcegraph-frontend` service in [base/frontend/sourcegraph-frontend.Service.yaml](../base/frontend/sourcegraph-frontend.Service.yaml) from `ClusterIP` to `NodePort`:
128
128
129
-
```diff
130
-
spec:
131
-
ports:
132
-
- name: http
133
-
port: 30080
134
-
+ nodePort: 30080
135
-
- type: ClusterIP
136
-
+ type: NodePort
137
-
```
138
-
129
+
```diff
130
+
spec:
131
+
ports:
132
+
- name: http
133
+
port: 30080
134
+
+ nodePort: 30080
135
+
- type: ClusterIP
136
+
+ type: NodePort
137
+
```
138
+
139
139
1. Directly applying this change to the service [will fail](https://github.com/kubernetes/kubernetes/issues/42282). Instead, you must delete the old service and then create the new one (this will result in a few seconds of downtime):
@@ -196,9 +196,9 @@ For the impatient, site configuration changes can be applied immediately by chan
196
196
197
197
If you intend to make your Sourcegraph instance accessible on the Internet or another untrusted network, you should use TLS so that all traffic will be served over HTTPS.
198
198
199
-
### Ingress controller
199
+
### Ingress controller
200
200
201
-
If you exposed your Sourcegraph instance via an ingress controller as described in ["Ingress controller (recommended)"](#ingress-controller-recommended):
201
+
If you exposed your Sourcegraph instance via an ingress controller as described in ["Ingress controller (recommended)"](#ingress-controller-recommended):
202
202
203
203
1. Create a [TLS secret](https://kubernetes.io/docs/concepts/configuration/secret/) that contains your TLS certificate and private key.
204
204
@@ -218,7 +218,7 @@ If you exposed your Sourcegraph instance via an ingress controller as described
218
218
# base/frontend/sourcegraph-frontend.Ingress.yaml
219
219
tls:
220
220
- hosts:
221
-
- example.sourcegraph.com
221
+
- example.sourcegraph.com
222
222
secretName: sourcegraph-tls
223
223
```
224
224
@@ -246,7 +246,7 @@ private **and** you are okay with storing secrets in it).
246
246
247
247
### NGINX service
248
248
249
-
If you exposed your Sourcegraph instance via the altenative nginx service as described in ["nginx service"](#nginx-service), those instructions already walked you through setting up TLS/SSL.
249
+
If you exposed your Sourcegraph instance via the altenative nginx service as described in ["nginx service"](#nginx-service), those instructions already walked you through setting up TLS/SSL.
250
250
251
251
## Configure repository cloning via SSH
252
252
@@ -393,67 +393,76 @@ See [the official documentation](https://kubernetes.io/docs/concepts/configurati
393
393
394
394
## Configure a storage class
395
395
396
-
Sourcegraph expects there to be storage class named `sourcegraph` that it uses for all its persistent volume claims. This storage class must be configured before applying the base configuration to your cluster. The configuration details differ depending on your hosting provider, so you should:
397
-
398
-
1. Create a stub `base/sourcegraph.StorageClass.yaml`.
396
+
Sourcegraph expects there to be storage class named `sourcegraph` that it uses for all its persistent volume claims. This storage class must be configured before applying the base configuration to your cluster.
399
397
400
-
```yaml
401
-
# base/sourcegraph.StorageClass.yaml
402
-
kind: StorageClass
403
-
apiVersion: storage.k8s.io/v1
404
-
metadata:
405
-
name: sourcegraph
406
-
labels:
407
-
deploy: sourcegraph
408
-
#
409
-
# The values of the "provisioner" and "parameters" fields will differ depending on the cloud provider that you are using. Please read through https://kubernetes.io/docs/concepts/storage/storage-classes/ in order to know what values to add. 🚨 We recommend specifying SSDs as the disk type if possible. 🚨
410
-
#
411
-
# For example, if you are using GKE with a cluster whose nodes are all in the "us-central1-a" zone, you could use the following values:
412
-
#
413
-
# provisioner: kubernetes.io/gce-pd
414
-
# parameters:
415
-
# type: pd-ssd
416
-
# zones: us-central1-a
417
-
```
398
+
Create `base/sourcegraph.StorageClass.yaml` with the appropriate configuration for your cloud provider and commit the file to your fork.
418
399
419
-
1. Read through the [Kubernetes storage class documentation](https://kubernetes.io/docs/concepts/storage/storage-classes/), and fill in the `provisioner` and `parameters` fields in`base/sourcegraph.StorageClass.yaml` with the correct values for your hosting provider (e.x.: [GCP](https://kubernetes.io/docs/concepts/storage/storage-classes/#gce-pd), [AWS](https://kubernetes.io/docs/concepts/storage/storage-classes/#aws), [Azure](https://kubernetes.io/docs/concepts/storage/storage-classes/#azure-disk)).
400
+
### Google Cloud Platform (GCP)
420
401
421
-
- Note that if you're using GCP with Kubernetes `v1.9.*`, you should omit the `replication-type` parameter mentioned in [the documentation](https://kubernetes.io/docs/concepts/storage/storage-classes/#gce-pd) from your `base/sourcegraph.StorageClass.yaml` file. That field wasn't added until Kubernetes `v.1.10.*+`, and you'll see errors like the following if you try to use it with an older version:
402
+
```yaml
403
+
# base/sourcegraph.StorageClass.yaml
404
+
kind: StorageClass
405
+
apiVersion: storage.k8s.io/v1
406
+
metadata:
407
+
name: sourcegraph
408
+
labels:
409
+
deploy: sourcegraph
410
+
provisioner: kubernetes.io/gce-pd
411
+
parameters:
412
+
type: pd-ssd # This configures SSDs (recommended).
413
+
```
422
414
423
-
```
424
-
Failed to provision volume with StorageClass "sourcegraph": invalid option "replication-type" for volume plugin kubernetes.io/gce-pd
- **We highly recommend that the storage class use SSDs as the underlying disk type.** Using the snippets below will create a storage class backed by SSDs:
0 commit comments