diff --git a/helm/templates/route.yaml b/helm/templates/route.yaml index c607788a7..d23792fc6 100644 --- a/helm/templates/route.yaml +++ b/helm/templates/route.yaml @@ -41,6 +41,10 @@ spec: - backendRefs: - name: {{ $serviceName }} port: {{ $servicePort }} + {{- with $route.timeouts }} + timeouts: + {{- toYaml . | nindent 8 }} + {{- end }} {{- with $route.filters }} filters: {{- toYaml . | nindent 8 }} diff --git a/helm/tests/route_test.yaml b/helm/tests/route_test.yaml index 56ef0d12e..cc7663287 100644 --- a/helm/tests/route_test.yaml +++ b/helm/tests/route_test.yaml @@ -66,6 +66,8 @@ tests: parentRefs: - name: gateway namespace: default + timeouts: + requests: 300s asserts: - hasDocuments: count: 2 @@ -183,3 +185,8 @@ tests: - path: type: PathPrefix value: / + - documentIndex: 1 + equal: + path: spec.rules[0].timeouts + value: + requests: 300s diff --git a/helm/values.yaml b/helm/values.yaml index c5f816b57..43c5ddaf0 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -636,6 +636,9 @@ routerSpec: # - name: X-Custom-Header # value: custom-value + # -- Timeouts applied to the route rule (https://gateway-api.sigs.k8s.io/api-types/httproute/#timeouts-optional) + timeouts: {} + # -- Additional custom rules that can be added to the route additionalRules: []