Kong / kubernetes-ingress-controller

:gorilla: Kong for Kubernetes: The official Ingress Controller for Kubernetes.
https://docs.konghq.com/kubernetes-ingress-controller/
Apache License 2.0
2.16k stars 592 forks source link

Remove the validation for HTTPRouteTimeoutBackendRequest during admission. #5451

Open tao12345666333 opened 5 months ago

tao12345666333 commented 5 months ago

Is there an existing issue for this?

Problem Statement

When we start working with https://github.com/Kong/kubernetes-ingress-controller/issues/4914 We found there are some gaps here.

So we plan to provide experimental support for this feature, but with some added restrictions. https://github.com/Kong/kubernetes-ingress-controller/pull/5243#issuecomment-1895744188

e.g.

apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: timeout-example
spec:
  ...
  rules:
  - backendRefs:
    - name: some-service
      port: 8080
    timeouts:
      backendRequest: 5s
  - backendRefs:
    - name: some-service
      port: 8080

this one will be rejected.

apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: timeout-example
spec:
  ...
  rules:
  - backendRefs:
    - name: some-service
      port: 8080
    timeouts:
      backendRequest: 5s
  - backendRefs:
    - name: some-service
      port: 8080
    timeouts:
      backendRequest: 5s

this one will be allowed

This issue is used for tracking, we want to remove the restriction after we complete this feature (maybe the Gateway API's specification need to be modified and KIC need to change the implementation)

Proposed Solution

No response

Additional information

No response

Acceptance Criteria

No response

czeslavo commented 5 months ago

I'm moving this out of KIC 3.1 milestone as I believe this is to be done after we figure out how to handle granular timeout settings (allowing setting timeouts per rule and not enforcing the same timeout for every HTTPRoute's rule).