Skip to content

Commit

Permalink
rm timeout section from direct response docs (#4649)
Browse files Browse the repository at this point in the history
Signed-off-by: Arko Dasgupta <[email protected]>
  • Loading branch information
arkodg authored Nov 7, 2024
1 parent 7744978 commit f7e1600
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 243 deletions.
81 changes: 0 additions & 81 deletions site/content/en/docs/tasks/traffic/direct-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,87 +160,6 @@ spec:
{{% /tab %}}
{{< /tabpane >}}
```shell
curl --header "Host: timeout.example.com" http://${GATEWAY_HOST}/?delay=3s -I
```
```console
HTTP/1.1 200 OK
content-type: application/json
x-content-type-options: nosniff
date: Mon, 04 Mar 2024 02:34:21 GMT
content-length: 480
```
Then we set the request timeout to 2 seconds. In this case, Envoy Gateway will respond with a timeout.
{{< tabpane text=true >}}
{{% tab header="Apply from stdin" %}}
```shell
cat <<EOF | kubectl apply -f -
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: backend
spec:
hostnames:
- timeout.example.com
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: eg
rules:
- backendRefs:
- group: ""
kind: Service
name: backend
port: 3000
weight: 1
matches:
- path:
type: PathPrefix
value: /
timeouts:
request: "2s"
EOF
```

{{% /tab %}}
{{% tab header="Apply from file" %}}
Save and apply the following resource to your cluster:

```yaml
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: backend
spec:
hostnames:
- timeout.example.com
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: eg
rules:
- backendRefs:
- group: ""
kind: Service
name: backend
port: 3000
weight: 1
matches:
- path:
type: PathPrefix
value: /
timeouts:
request: "2s"
```
{{% /tab %}}
{{< /tabpane >}}
```shell
curl --verbose --header "Host: www.example.com" http://$GATEWAY_HOST/inline
```
Expand Down
81 changes: 0 additions & 81 deletions site/content/en/latest/tasks/traffic/direct-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,87 +160,6 @@ spec:
{{% /tab %}}
{{< /tabpane >}}
```shell
curl --header "Host: timeout.example.com" http://${GATEWAY_HOST}/?delay=3s -I
```
```console
HTTP/1.1 200 OK
content-type: application/json
x-content-type-options: nosniff
date: Mon, 04 Mar 2024 02:34:21 GMT
content-length: 480
```
Then we set the request timeout to 2 seconds. In this case, Envoy Gateway will respond with a timeout.
{{< tabpane text=true >}}
{{% tab header="Apply from stdin" %}}
```shell
cat <<EOF | kubectl apply -f -
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: backend
spec:
hostnames:
- timeout.example.com
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: eg
rules:
- backendRefs:
- group: ""
kind: Service
name: backend
port: 3000
weight: 1
matches:
- path:
type: PathPrefix
value: /
timeouts:
request: "2s"
EOF
```

{{% /tab %}}
{{% tab header="Apply from file" %}}
Save and apply the following resource to your cluster:

```yaml
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: backend
spec:
hostnames:
- timeout.example.com
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: eg
rules:
- backendRefs:
- group: ""
kind: Service
name: backend
port: 3000
weight: 1
matches:
- path:
type: PathPrefix
value: /
timeouts:
request: "2s"
```
{{% /tab %}}
{{< /tabpane >}}
```shell
curl --verbose --header "Host: www.example.com" http://$GATEWAY_HOST/inline
```
Expand Down
81 changes: 0 additions & 81 deletions site/content/en/v1.2/tasks/traffic/direct-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,87 +160,6 @@ spec:
{{% /tab %}}
{{< /tabpane >}}
```shell
curl --header "Host: timeout.example.com" http://${GATEWAY_HOST}/?delay=3s -I
```
```console
HTTP/1.1 200 OK
content-type: application/json
x-content-type-options: nosniff
date: Mon, 04 Mar 2024 02:34:21 GMT
content-length: 480
```
Then we set the request timeout to 2 seconds. In this case, Envoy Gateway will respond with a timeout.
{{< tabpane text=true >}}
{{% tab header="Apply from stdin" %}}
```shell
cat <<EOF | kubectl apply -f -
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: backend
spec:
hostnames:
- timeout.example.com
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: eg
rules:
- backendRefs:
- group: ""
kind: Service
name: backend
port: 3000
weight: 1
matches:
- path:
type: PathPrefix
value: /
timeouts:
request: "2s"
EOF
```

{{% /tab %}}
{{% tab header="Apply from file" %}}
Save and apply the following resource to your cluster:

```yaml
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: backend
spec:
hostnames:
- timeout.example.com
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: eg
rules:
- backendRefs:
- group: ""
kind: Service
name: backend
port: 3000
weight: 1
matches:
- path:
type: PathPrefix
value: /
timeouts:
request: "2s"
```
{{% /tab %}}
{{< /tabpane >}}
```shell
curl --verbose --header "Host: www.example.com" http://$GATEWAY_HOST/inline
```
Expand Down

0 comments on commit f7e1600

Please sign in to comment.