If existing already, delete the default k3d cluster:
k3d cluster delete
Start a k3d cluster and port forward the loadbalancer:
k3d cluster create -p "30080:80@loadbalancer"
In the deploy-sourcegraph
repo:
./overlay-generate-cluster.sh low-resource generated-cluster
kubectl apply --prune -l deploy=sourcegraph -f generated-cluster --recursive
low-resources
is too low by default and frontend will OOM, so edit the frontend deployment and raise limits:
:
kubectl edit deployment/sourcegraph-frontend
Create an ingress so traffic can reach:
cat <<EOT >> ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: sourcegraph-frontend
annotations:
ingress.kubernetes.io/ssl-redirect: "false"
spec:
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: sourcegraph-frontend
port:
number: 30080
EOT
kubectl apply -f ingress.yaml
Navigate to http://localhost:30080
Codeintel-qa testing:
cat ../dev-private/enterprise/dev/external-services-config.json
In the Sourcegraph repo modify
dev/codeintel-qa/internal/env.go
(the env var doesn't work):Navigate into the sourcegraph repo and export tokens:
Run the tests: