Skip to content

Commit 5847787

Browse files
authored
fix: add watch with timeouts and rename backend tls config (#327)
This pull request reorganizes the Gateway API configuration for ingress by moving related manifests from the `ingress` directory to a new `components/gateway-api` directory. It updates references throughout the codebase to use the new location, adds a dedicated kustomization for the component, and enhances the HTTPRoute configuration to better support watch streams and query parameters. **Gateway API configuration reorganization:** * Moved `kustomization.yaml`, `httproute.yaml` and `backend-tls-policy.yaml` from `config/ingress/gateway-api/` to `config/components/gateway-api/` and updated their contents and naming conventions for clarity. * Added a new `kustomization.yaml` in `config/components/gateway-api/` to manage the component's resources. * Removed the old kustomization and resource files from `config/ingress/gateway-api/`. **Configuration and documentation updates:** * Updated overlays and documentation to reference the new `components/gateway-api` directory instead of the old ingress location.
2 parents 4d6a26a + 284c1e7 commit 5847787

File tree

7 files changed

+53
-32
lines changed

7 files changed

+53
-32
lines changed

config/ingress/gateway-api/backend-tls-policy.yaml renamed to config/components/gateway-api/backend-tls-policy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: gateway.networking.k8s.io/v1alpha3
22
kind: BackendTLSPolicy
33
metadata:
4-
name: milo-apiserver-tls
4+
name: milo-apiserver-backend-tls
55
spec:
66
targetRefs:
77
- group: ""
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
apiVersion: gateway.networking.k8s.io/v1
2+
kind: HTTPRoute
3+
metadata:
4+
name: milo-apiserver
5+
spec:
6+
parentRefs:
7+
- name: default-gateway
8+
namespace: envoy-gateway-system
9+
rules:
10+
- matches:
11+
- path:
12+
type: PathPrefix
13+
value: "/"
14+
- queryParams:
15+
- type: Exact
16+
name: watch
17+
value: "true"
18+
timeouts:
19+
# Allow users to keep watch streams open for a long duration.
20+
request: 86400s
21+
backendRequest: 86400s
22+
backendRefs:
23+
- group: ""
24+
kind: Service
25+
name: milo-apiserver
26+
port: 6443
27+
retry: # Retry on 429s so that project storage initialization has time to complete
28+
codes: [429]
29+
attempts: 5
30+
backoff: 300ms
31+
- matches:
32+
- path:
33+
type: PathPrefix
34+
value: "/"
35+
backendRefs:
36+
- group: ""
37+
kind: Service
38+
name: milo-apiserver
39+
port: 6443
40+
retry: # Retry on 429s so that project storage initialization has time to complete
41+
codes: [429]
42+
attempts: 5
43+
backoff: 300ms
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: kustomize.config.k8s.io/v1alpha1
2+
kind: Component
3+
4+
resources:
5+
- httproute.yaml
6+
- backend-tls-policy.yaml

config/ingress/gateway-api/httproute.yaml

Lines changed: 0 additions & 22 deletions
This file was deleted.

config/ingress/gateway-api/kustomization.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

config/overlays/test-infra/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Manages TLS certificates for the test environment:
3030
## Shared Resources
3131

3232
### Gateway API Configuration
33-
This overlay uses the shared Gateway API configuration from `config/ingress/gateway-api/` which provides:
33+
This overlay uses the shared Gateway API configuration from `components/gateway-api/` which provides:
3434
- HTTPRoute for routing traffic to the API server
3535
- BackendTLSPolicy for TLS backend connections
3636

config/overlays/test-infra/kustomization.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ resources:
1414
- ../../apiserver
1515
- ../../controller-manager/overlays/core-control-plane
1616

17-
# Ingress configuration (shared Gateway API with Envoy)
18-
- ../../ingress/gateway-api
1917

2018
components:
2119
- components/auth
2220
- components/certificates
2321
- ../../components/certificates
2422
- ../../components/apiserver-audit-logging
23+
# Ingress configuration (shared Gateway API with Envoy)
24+
- ../../components/gateway-api
2525

2626
patches:
2727
# Configure API server for etcd connection

0 commit comments

Comments
 (0)