Skip to content

Commit f7a8dbc

Browse files
authored
Remove References To Legacy Kustomize In Procedural Docs (#1185)
closes https://linear.app/sourcegraph/issue/REL-995/remove-references-to-deploy-sourcegraph-legacy-kustomize-repo-in This PR removes references to the outdated and archived `deploy-sourcegraph` repo kustomize procedures: https://github.com/sourcegraph/deploy-sourcegraph ## Pull Request approval You will need to get your PR approved by at least one member of the Sourcegraph team. For reviews of docs formatting, styles, and component usage, please tag the docs team via the #docs Slack channel.
1 parent d277dce commit f7a8dbc

File tree

11 files changed

+201
-182
lines changed

11 files changed

+201
-182
lines changed

docs/admin/deploy/kubernetes/operations.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,17 +288,17 @@ The following instructions apply only if you are restoring your databases into a
288288

289289
If you are restoring a previously running environment, see the instructions for [restoring a previously running deployment](#restoring-sourcegraph-databases-into-an-existing-environment)
290290

291-
A. Copy the database dump files (eg. `sourcegraph_db.out`, `codeintel_db.out` and `codeinsights_db.out`) into the root of the `deploy-sourcegraph` directory
291+
A. Copy the database dump files (eg. `sourcegraph_db.out`, `codeintel_db.out` and `codeinsights_db.out`) into your deployment directory
292292

293-
B. Start the database services by running the following command from the root of the [deploy-sourcegraph](https://github.com/sourcegraph/deploy-sourcegraph) directory
293+
B. Start the database services by running the following command from your deployment directory:
294294

295295
```bash
296296
$ kubectl rollout restart deployment pgsql
297297
$ kubectl rollout restart deployment codeintel-db
298298
$ kubectl rollout restart deployment codeinsights-db
299299
```
300300

301-
C. Copy the database files into the pods by running the following command from the root of the [deploy-sourcegraph](https://github.com/sourcegraph/deploy-sourcegraph) directory
301+
C. Copy the database files into the pods by running the following commands:
302302

303303
```bash
304304
$ kubectl cp sourcegraph_db.out $NAMESPACE/$pgsql_POD_NAME:/tmp/sourcegraph_db.out
@@ -355,7 +355,7 @@ $ kubectl delete pv $codeintel-db_PV_NAME --force
355355
$ kubectl delete pv $codeinsights-db_PV_NAME --force
356356
```
357357

358-
C. Copy the database dump files (eg. `sourcegraph_db.out`, `codeintel_db.out` and `codeinsights_db.out`) into the root of the `deploy-sourcegraph` directory
358+
C. Copy the database dump files (eg. `sourcegraph_db.out`, `codeintel_db.out` and `codeinsights_db.out`) into your deployment directory
359359

360360
D. Start the database services only
361361

@@ -365,7 +365,7 @@ $ kubectl rollout restart deployment codeintel-db
365365
$ kubectl rollout restart deployment codeinsights-db
366366
```
367367

368-
E. Copy the database files into the pods by running the following command from the root of the [deploy-sourcegraph](https://github.com/sourcegraph/deploy-sourcegraph) directory
368+
E. Copy the database files into the pods by running the following commands:
369369

370370
```bash
371371
$ kubectl cp sourcegraph_db.out $NAMESPACE/$pgsql_POD_NAME:/tmp/sourcegraph_db.out

docs/admin/deploy/kubernetes/troubleshoot.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Run `kubectl get ingresses -A` to check if there is more than one ingress for `s
4040

4141
#### Error: error when creating "base/cadvisor/cadvisor.ClusterRoleBinding.yaml": subjects[0].namespace: Required value
4242

43-
Add `namespace: default` to the [base/cadvisor/cadvisor.ClusterRoleBinding.yaml](https://github.com/sourcegraph/deploy-sourcegraph/blob/master/base/cadvisor/cadvisor.ClusterRoleBinding.yaml) file under `subjects`.
43+
This error occurs when using legacy deployment manifests. For modern deployments using deploy-sourcegraph-k8s, cadvisor is configured as a DaemonSet with a ServiceAccount and doesn't require a ClusterRoleBinding. If you encounter this error, ensure you're using the latest [deploy-sourcegraph-k8s](https://github.com/sourcegraph/deploy-sourcegraph-k8s) repository.
4444

4545

4646
#### Multiple pods are stuck in Pending.

docs/admin/deploy/kubernetes/upgrade.mdx

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -76,47 +76,7 @@ Apply the new manifests from the ouput file `cluster.yaml` to your cluster:
7676

7777
---
7878

79-
### Upgrade with Legacy Kubernetes
8079

81-
The following procedure is for performing a **standard upgrade** with Sourcegraph instances in versions **prior to `v4.5.0`**, or which **have not** [**migrated**](/admin/deploy/kubernetes/kustomize/migrate) and still use [deploy-sourcegraph](https://github.com/sourcegraph/deploy-sourcegraph).
82-
83-
**Step 1**: Merge the new version of Sourcegraph into your release branch.
84-
85-
```sh
86-
cd $DEPLOY_SOURCEGRAPH_FORK
87-
# get updates
88-
git fetch upstream
89-
# to merge the upstream release tag into your release branch.
90-
git checkout release
91-
# Choose which version you want to deploy from https://github.com/sourcegraph/deploy-sourcegraph/tags
92-
git merge $NEW_VERSION
93-
```
94-
95-
---
96-
97-
**Step 2**: Update your install script `kubectl-apply-all.sh`
98-
99-
By default, the install script `kubectl-apply-all.sh` applies our base manifests using [`kubectl apply` command](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply) with a variety of arguments specific to the layout of the [deploy-sourcegraph reference repository](https://github.com/sourcegraph/deploy-sourcegraph).
100-
101-
If you have specific commands that should be run whenever you apply your manifests, you should modify this script accordingly.
102-
103-
For example, if you use [overlays to make changes to the manifests](https://github.com/sourcegraph/deploy-sourcegraph/tree/master/overlays), you should modify this script to apply the manifests from the `generated cluster` directory instead.
104-
105-
---
106-
107-
**Step 3**: Apply the updates to your cluster.
108-
109-
```sh
110-
$ ./kubectl-apply-all.sh
111-
```
112-
113-
**Step 4**: Monitor the status of the deployment to determine its success.
114-
115-
```sh
116-
$ kubectl get pods -o wide --watch
117-
```
118-
119-
---
12080

12181
## Multi-version upgrades
12282

@@ -129,7 +89,7 @@ To perform a multi-version upgrade via migrators [upgrade](/admin/updates/migrat
12989
- Check the `Site Admin > Updates` page to determine [upgrade readiness](/admin/updates/#upgrade-readiness).
13090

13191
2. **Pull and merge upstream changes**:
132-
- Follow the [standard legacy upgrade procedure](#upgrade-with-legacy-kubernetes) to pull and merge upstream changes from the version you are upgrading to to your `release` branch.
92+
- Follow the [standard upgrade procedure](#upgrade-with-kubernetes-kustomize) to pull and merge upstream changes from the version you are upgrading to to your `release` branch.
13393

13494
3. **Update cluster.yaml and scale down non-database deployments and replicas**:
13595
- In your cluster kustomization file (`instances/my-sourcegraph/kustomize.yaml`), uncomment the [multi-version-upgrade util](https://github.com/sourcegraph/deploy-sourcegraph-k8s/blob/main/instances/template/kustomization.template.yaml#L155). This will scale down all non-database deployments and statefulSets replicas to 0.
@@ -236,10 +196,6 @@ If you are rolling back more than a single version, then you must also [rollback
236196

237197
### Rollback with Kustomize
238198

239-
**For Sourcegraph version 4.5.0 and above, which have [migrated](/admin/deploy/kubernetes/kustomize/migrate) to [deploy-sourcegraph-k8s](https://github.com/sourcegraph/deploy-sourcegraph-k8s).**
240-
241-
For instances deployed using the [deploy-sourcegraph-k8s](https://github.com/sourcegraph/deploy-sourcegraph-k8s) repository:
242-
243199
```sh
244200
# Re-generate manifests
245201
kubectl kustomize instances/$YOUR_INSTANCE -o cluster-rollback.yaml
@@ -249,16 +205,6 @@ For instances deployed using the [deploy-sourcegraph-k8s](https://github.com/sou
249205
kubectl apply --prune -l deploy=sourcegraph -f cluster-rollback.yaml
250206
```
251207

252-
### Rollback without Kustomize
253-
254-
**For Sourcegraph version prior to 4.5.0 using our legacy [deploy-sourcegraph](https://github.com/sourcegraph/deploy-sourcegraph) manifests.**
255-
256-
For instances deployed using the old [deploy-sourcegraph](https://github.com/sourcegraph/deploy-sourcegraph) repository:
257-
258-
```sh
259-
$ ./kubectl-apply-all.sh
260-
```
261-
262208
### Rollback with `migrator downgrade`
263209

264210
For rolling back a multiversion upgrade use the `migrator` [downgrade](/admin/updates/migrator/migrator-operations#downgrade) command. Learn mor in our [downgrade docs](/admin/updates/migrator/downgrading).

docs/admin/faq.mdx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@ Docker image, you can deploy a reverse proxy such as [Caddy](https://caddyserver
4242

4343
If you are running Sourcegraph as a Kubernetes cluster, you have two additional options:
4444

45-
1. If you are using [NGINX
46-
ingress](https://github.com/sourcegraph/deploy-sourcegraph/blob/master/docs/configure#ingress-controller)
47-
(`kubectl get ingress | grep sourcegraph-frontend`), modify
48-
[`sourcegraph-frontend.Ingress.yaml`](https://github.com/sourcegraph/deploy-sourcegraph/blob/master/base/frontend/sourcegraph-frontend.Ingress.yaml)
49-
by [adding a rewrite rule](https://kubernetes.github.io/ingress-nginx/examples/rewrite/).
45+
1. If you are using NGINX ingress (`kubectl get ingress | grep sourcegraph-frontend`), modify
46+
[`sourcegraph-frontend.Ingress.yaml`](https://github.com/sourcegraph/deploy-sourcegraph-k8s/blob/main/base/sourcegraph/frontend/sourcegraph-frontend.Ingress.yaml)
47+
by [adding a rewrite rule](https://kubernetes.github.io/ingress-nginx/examples/rewrite/). You can also refer to the [ingress configuration examples](https://github.com/sourcegraph/deploy-sourcegraph-k8s/tree/main/examples/ingress-controller).
5048

5149
## What external HTTP checks are configured?
5250

docs/admin/how-to/precise-code-intel-worker-crashloopbackoff.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@ precise-code-intel-worker-9b69b5b59-z7xx4 0/1 CrashLoopBackOff 415
2222

2323
`kubectl get pods -o wide`
2424

25-
3. If MinIO is not deployed, create a fork of the [deploy-sourcegraph](https://github.com/sourcegraph/deploy-sourcegraph) repository and make sure you deploy MinIO (or blobstore in 3.4.2+).
26-
27-
25+
3. If blobstore is not deployed, make sure you include the blobstore components in your Sourcegraph deployment. For modern Sourcegraph versions (3.4.2+), blobstore replaces MinIO.
2826

2927
## Further resources
3028

3129
* [Sourcegraph - Kubernetes Configuration](/admin/deploy/kubernetes/configure)
32-
* [Deploy Sourcegraph - blobstore](https://github.com/sourcegraph/deploy-sourcegraph/tree/master/base/blobstore)
30+
* [Deploy Sourcegraph K8s - blobstore](https://github.com/sourcegraph/deploy-sourcegraph-k8s/tree/main/base/sourcegraph/blobstore)

0 commit comments

Comments
 (0)