Skip to content

Commit 4682e60

Browse files
authored
docs: Add note about XDS service IP and steps for local debugging, README cleanup (#11260)
Signed-off-by: David Haifley <[email protected]>
1 parent a8dc3fd commit 4682e60

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

devel/debugging/local-controller.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ go run cmd/kgateway/main.go
2222

2323
> Note: `172.17.0.1` is IP address of the `docker0` bridge interface that allows pods running in `Kind` to access the host network, thereby allowing the Gateway proxy to connect to the xDS service running on the host.
2424
25+
> Additional note: Replacing `172.17.0.1` with `192.168.65.254`, as the value for `KGW_XDS_SERVICE_HOST` may help, if the gateway proxy pods in a local kind cluster are unable to connect to the xDS service running on the local machine. `192.168.65.254` is the IP address that `host.docker.internal` resolves to on gateway proxy pods when running in a local kind cluster.
26+
2527
## Vscode Debugger
2628

2729
Use the following `launch.json` configuration to run the controller in the debugger:
@@ -42,3 +44,43 @@ Use the following `launch.json` configuration to run the controller in the debug
4244
},
4345
}
4446
```
47+
48+
## Steps to run and inspect local builds:
49+
50+
Setup a local kind cluster:
51+
```sh
52+
VERSION=2.0.0-dev ./hack/kind/setup-kind.sh
53+
```
54+
55+
Install the required CRDs:
56+
```sh
57+
helm install kgateway-crds install/helm/kgateway-crds
58+
```
59+
60+
Create a namespace for testing:
61+
```sh
62+
kubectl create ns kgateway-system
63+
```
64+
65+
Run kgateway locally using one of the methods described above: either `go run` or the vscode debugger.
66+
67+
Create an example gateway:
68+
```sh
69+
kubectl -n kgateway-system apply -f examples/example-gw.yaml
70+
```
71+
72+
Create an example route:
73+
```sh
74+
kubectl -n kgateway-system apply -f examples/example-http-route.yaml
75+
```
76+
77+
Using a local web browser:
78+
- GET http://localhost:9097/snapshots/krt to inspect the KRT snapshot.
79+
- GET http://localhost:9097/snapshots/xds to inspect the XDS snapshot.
80+
81+
When finished testing:
82+
83+
```sh
84+
kubectl -n kgateway-system delete -f examples/example-gw.yaml
85+
kind delete cluster
86+
```

test/kubernetes/e2e/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Its sole responsibility is to create [TestInstallations](#testinstallation).
1212

1313
## TestInstallation
1414

15-
A [TestInstallation](./test.go) is the structure that manages a group of tests that run against an installation of Gloo Gateway, within a Kubernetes Cluster.
15+
A [TestInstallation](./test.go) is the structure that manages a group of tests that run against an installation within a Kubernetes Cluster.
1616

1717
We try to define a single `TestInstallation` per file in a `TestCluster`. This way, it is easy to identify what behaviors are expected for that installation.
1818

0 commit comments

Comments
 (0)