Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use most recent gateway api conformance backend #2715

Merged
merged 3 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/kubernetes/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec:
spec:
serviceAccountName: backend
containers:
- image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
- image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
imagePullPolicy: IfNotPresent
name: backend
ports:
Expand Down
8 changes: 4 additions & 4 deletions examples/kubernetes/http-routing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ spec:
spec:
containers:
- name: example-backend
image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
env:
- name: POD_NAME
valueFrom:
Expand Down Expand Up @@ -119,7 +119,7 @@ spec:
spec:
containers:
- name: foo-backend
image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
env:
- name: POD_NAME
valueFrom:
Expand Down Expand Up @@ -186,7 +186,7 @@ spec:
spec:
containers:
- name: bar-backend
image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
env:
- name: POD_NAME
valueFrom:
Expand Down Expand Up @@ -233,7 +233,7 @@ spec:
spec:
containers:
- name: bar-canary-backend
image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
env:
- name: POD_NAME
valueFrom:
Expand Down
2 changes: 1 addition & 1 deletion examples/kubernetes/mergepatch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ spec:
spec:
serviceAccountName: backend
containers:
- image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
- image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
imagePullPolicy: IfNotPresent
name: backend
ports:
Expand Down
2 changes: 1 addition & 1 deletion examples/kubernetes/quickstart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ spec:
spec:
serviceAccountName: backend
containers:
- image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
- image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
imagePullPolicy: IfNotPresent
name: backend
ports:
Expand Down
4 changes: 2 additions & 2 deletions examples/kubernetes/tcp-routing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ spec:
version: v1
spec:
containers:
- image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
- image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
imagePullPolicy: IfNotPresent
name: backend-1
ports:
Expand Down Expand Up @@ -104,7 +104,7 @@ spec:
version: v1
spec:
containers:
- image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
- image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
imagePullPolicy: IfNotPresent
name: backend-2
ports:
Expand Down
2 changes: 1 addition & 1 deletion examples/kubernetes/tls-passthrough.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
spec:
containers:
- name: passthrough-echoserver
image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
ports:
- containerPort: 8443
env:
Expand Down
2 changes: 1 addition & 1 deletion examples/kubernetes/tls-termination.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
spec:
serviceAccountName: backend
containers:
- image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
- image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
imagePullPolicy: IfNotPresent
name: backend
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spec:
spec:
serviceAccountName: backend
containers:
- image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
- image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
imagePullPolicy: IfNotPresent
name: backend
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
spec:
serviceAccountName: backend
containers:
- image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
- image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
imagePullPolicy: IfNotPresent
name: backend
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spec:
spec:
serviceAccountName: backend
containers:
- image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
- image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
imagePullPolicy: IfNotPresent
name: backend
ports:
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/egctl/testdata/translate/in/quickstart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spec:
spec:
serviceAccountName: backend
containers:
- image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
- image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
imagePullPolicy: IfNotPresent
name: backend
ports:
Expand Down
105 changes: 6 additions & 99 deletions site/content/en/latest/user/circuit-breaker.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,109 +20,17 @@ This instantiated resource can be linked to a [Gateway][], [HTTPRoute][] or [GRP

### Install Envoy Gateway

* Follow the installation step from the [Quickstart Guide](../quickstart) to install Envoy Gateway. There is no need to apply the quickstart manifests.

### Install the httpbin backend

* We will use the [Httpbin project] as a backend in order to simulate a degraded service that responds slowly. Install `httpbin` and other Envoy Gateway resources (`GatewayClass`, `Gateway`, `HTTPRoute`) by applying the following manifests:

```shell
cat <<EOF | kubectl apply -f -
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
name: eg
spec:
controllerName: gateway.envoyproxy.io/gatewayclass-controller
---
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: eg
spec:
gatewayClassName: eg
listeners:
- name: http
protocol: HTTP
port: 80
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: httpbin
---
apiVersion: v1
kind: Service
metadata:
name: httpbin
labels:
app: httpbin
service: httpbin
spec:
ports:
- name: http
port: 80
targetPort: 80
selector:
app: httpbin
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: httpbin
spec:
replicas: 1
selector:
matchLabels:
app: httpbin
version: v1
template:
metadata:
labels:
app: httpbin
version: v1
spec:
serviceAccountName: httpbin
containers:
- image: docker.io/kennethreitz/httpbin
imagePullPolicy: IfNotPresent
name: httpbin
ports:
- containerPort: 80
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: httpbin
spec:
parentRefs:
- name: eg
hostnames:
- "www.example.com"
rules:
- backendRefs:
- group: ""
kind: Service
name: httpbin
port: 80
weight: 1
matches:
- path:
type: PathPrefix
value: /

EOF
```
* Follow the installation step from the [Quickstart Guide](../quickstart) to install Envoy Gateway and sample resources.

### Install the hey load testing tool
* The `hey` CLI will be used to generate load and measure response times. Follow the installation instruction from the [Hey project] docs.

## Test and customize circuit breaker settings

This example will simulate a degraded backend that responds within 10 seconds by calling the `/delayed/10` endpoint of httpbin. The hey tool will be used to generate 100 concurrent requests.
This example will simulate a degraded backend that responds within 10 seconds by adding the `?delay=10s` query parameter to API calls. The hey tool will be used to generate 100 concurrent requests.

```shell
hey -n 100 -c 100 -host "www.example.com" http://${GATEWAY_HOST}/delay/10
hey -n 100 -c 100 -host "www.example.com" http://${GATEWAY_HOST}/?delay=10s
```

```console
Expand Down Expand Up @@ -164,7 +72,7 @@ spec:
targetRef:
group: gateway.networking.k8s.io
kind: HTTPRoute
name: httpbin
name: backend
namespace: default
circuitBreaker:
maxPendingRequests: 0
Expand All @@ -175,7 +83,7 @@ EOF
Execute the load simulation again.

```shell
hey -n 100 -c 100 -host "www.example.com" http://${GATEWAY_HOST}/delay/10
hey -n 100 -c 100 -host "www.example.com" http://${GATEWAY_HOST}/?delay=10s
```

```console
Expand Down Expand Up @@ -212,5 +120,4 @@ With the new circuit breaker settings, and due to the slowness of the backend, o
[Gateway]: https://gateway-api.sigs.k8s.io/api-types/gateway/
[HTTPRoute]: https://gateway-api.sigs.k8s.io/api-types/httproute/
[GRPCRoute]: https://gateway-api.sigs.k8s.io/api-types/grpcroute/
[Hey project]: https://github.com/rakyll/hey
[Httpbin project]: https://github.com/postmanlabs/httpbin
[Hey project]: https://github.com/rakyll/hey
4 changes: 2 additions & 2 deletions site/content/en/latest/user/deployment-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ spec:
spec:
serviceAccountName: backend
containers:
- image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
- image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
imagePullPolicy: IfNotPresent
name: backend
ports:
Expand Down Expand Up @@ -281,7 +281,7 @@ spec:
spec:
serviceAccountName: backend
containers:
- image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
- image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
imagePullPolicy: IfNotPresent
name: backend
ports:
Expand Down
2 changes: 1 addition & 1 deletion site/content/en/latest/user/http-request-mirroring.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
spec:
serviceAccountName: backend-2
containers:
- image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
- image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
imagePullPolicy: IfNotPresent
name: backend-2
ports:
Expand Down
2 changes: 1 addition & 1 deletion site/content/en/latest/user/http-traffic-splitting.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ spec:
spec:
serviceAccountName: backend-2
containers:
- image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
- image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
imagePullPolicy: IfNotPresent
name: backend-2
ports:
Expand Down
4 changes: 2 additions & 2 deletions site/content/en/latest/user/tcp-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ spec:
version: v1
spec:
containers:
- image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
- image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
imagePullPolicy: IfNotPresent
name: backend-1
ports:
Expand Down Expand Up @@ -146,7 +146,7 @@ spec:
version: v1
spec:
containers:
- image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
- image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
imagePullPolicy: IfNotPresent
name: backend-2
ports:
Expand Down
14 changes: 7 additions & 7 deletions test/e2e/base/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ spec:
containers:
- name: infra-backend-v1
# From https://github.com/kubernetes-sigs/ingress-controller-conformance/tree/master/images/echoserver
image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
env:
- name: POD_NAME
valueFrom:
Expand Down Expand Up @@ -162,7 +162,7 @@ spec:
spec:
containers:
- name: infra-backend-v2
image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
env:
- name: POD_NAME
valueFrom:
Expand Down Expand Up @@ -208,7 +208,7 @@ spec:
spec:
containers:
- name: infra-backend-v3
image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
env:
- name: POD_NAME
valueFrom:
Expand Down Expand Up @@ -254,7 +254,7 @@ spec:
spec:
containers:
- name: tls-backend
image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
volumeMounts:
- name: secret-volume
mountPath: /etc/secret-volume
Expand Down Expand Up @@ -323,7 +323,7 @@ spec:
spec:
containers:
- name: app-backend-v1
image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
env:
- name: POD_NAME
valueFrom:
Expand Down Expand Up @@ -369,7 +369,7 @@ spec:
spec:
containers:
- name: app-backend-v2
image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
env:
- name: POD_NAME
valueFrom:
Expand Down Expand Up @@ -422,7 +422,7 @@ spec:
spec:
containers:
- name: web-backend
image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e
image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
env:
- name: POD_NAME
valueFrom:
Expand Down
Loading