gitlab.sgdev.org

Overview

We use ArgoCD to sync the GitLab deployment by following GitOps practices. All configuration is tracked in sourcegraph/infrastructure repo.

The confiugration changes to dogfood/kubernetes/tooling/gitlab will be picked up by ArgoCD once it’s landed on the main branch.

Access

The admin credential can be found in 1password. If the credential doesn’t work, you may follow https://docs.gitlab.com/charts/quickstart/#sign-in-to-gitlab to recover admin access.

Google OAuth has been configured and you will be able to use your GSuite account to login.

Operation

How to install

This is only needed for initial deployment

cd into dogfood/kubernetes/argocd and run

kubectl apply -f ./tooling-gitlab.Application.yaml

Automated upgrade is configured for regular version upgrade using renovate in sourcegraph/infrastructure

Create a Pull Request to make neccessary changes and ask for review. Once the PR is merged, argocd will sync the new changes to the cluster.

How to upgrade/change (manual)

Only use this approach when ArgoCD is down

Switch context to dogfood cluster

kubectx gke_sourcegraph-dogfood_us-central1-f_dogfood

# or if you don't have kubectx installed
# also, you should check it out https://github.com/ahmetb/kubectx
kubectl config set current-context gke_sourcegraph-dogfood_us-central1-f_dogfood

Clean up cached charts directory to avoid stale content

rm -rf charts/

Diff

kustomize build --enable-helm ./ | kubectl diff -f -

Apply

kustomize build --enable-helm ./ | kubectl apply -f -