Skip to content
Open
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
11 changes: 3 additions & 8 deletions helm/oauth2-proxy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: oauth2-proxy
version: 10.7.0
version: 10.8.0
apiVersion: v2
appVersion: 7.15.3
home: https://oauth2-proxy.github.io/oauth2-proxy/
Expand Down Expand Up @@ -31,12 +31,7 @@ kubeVersion: ">=1.16.0-0"
annotations:
artifacthub.io/changes: |
- kind: added
description: Add alpha-config.source and alpha-config.name helpers for centralized alpha config resolution
description: Add support for per-rule timeouts (request and backendRequest) on the Gateway API HTTPRoute
links:
- name: GitHub PR
url: https://github.com/oauth2-proxy/manifests/pull/405
- kind: added
description: Add deprecation guards for invalid alphaConfig combinations
links:
- name: GitHub PR
url: https://github.com/oauth2-proxy/manifests/pull/405
url: https://github.com/oauth2-proxy/manifests/pull/417
5 changes: 5 additions & 0 deletions helm/oauth2-proxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@ gatewayApi:
add:
- name: X-Auth-Request
value: "true"
timeouts:
request: 10s
backendRequest: 5s
labels:
app: oauth2-proxy
annotations:
Expand All @@ -381,6 +384,8 @@ gatewayApi:
If you don't specify custom rules, the chart will create a default rule that matches all paths with `PathPrefix: /` and routes to the oauth2-proxy service.
If you don't specify a sectionName, the rules will be applied to all listeners of the referenced Gateway.

Each rule can optionally define `timeouts.request` and `timeouts.backendRequest` strings, e.g. `"10s"`, `"500ms"`). See the [HTTPRoute timeouts](https://gateway-api.sigs.k8s.io/reference/api-types/httproute/#timeouts-optional) reference for details.

### Targeting Rules with Policies via `sectionName`

The optional `name` field on each rule (e.g. `rules[].name: oauth2`) lets policies such as `SecurityPolicy`, `BackendTrafficPolicy`, or any other Gateway API policy that supports `sectionName` target a specific HTTPRoute rule rather than the entire route. Example:
Expand Down
16 changes: 16 additions & 0 deletions helm/oauth2-proxy/ci/gateway-api-timeouts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Gateway API configuration with custom HTTPRoute rule timeouts
gatewayApi:
enabled: true
gatewayRef:
name: example-gateway
namespace: gateway-system
hostnames:
- oauth.example.com
rules:
- matches:
- path:
type: PathPrefix
value: /oauth2
timeouts:
request: 30s
backendRequest: 10s
4 changes: 4 additions & 0 deletions helm/oauth2-proxy/templates/httproute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ spec:
filters:
{{- toYaml .filters | nindent 4 }}
{{- end }}
{{- if .timeouts }}
timeouts:
{{- toYaml .timeouts | nindent 6 }}
{{- end }}
{{- end }}
{{- else }}
- matches:
Expand Down
6 changes: 6 additions & 0 deletions helm/oauth2-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,12 @@ gatewayApi:
# - path:
# type: PathPrefix
# value: /
# # Request timeouts for this rule (Gateway API Duration strings, e.g. "10s", "500ms")
# # backendRequest must not be greater than request.
# # https://gateway-api.sigs.k8s.io/reference/api-spec/main/spec/#httproutetimeouts
# timeouts:
# request: 10s
# backendRequest: 5s
rules: []
# Hostnames to match in the HTTPRoute
# hostnames:
Expand Down
Loading