Skip to content

Support for multiple Istio HTTPRoute #673

Closed
@adrilo

Description

@adrilo

Hello,

I'm trying to set up Flagger in a service (Istio cluster) but I can't find how to handle multiple http routes in the virtual service (as defined here: https://istio.io/latest/docs/reference/config/networking/virtual-service/#HTTPRoute).
I'm using multiple http routes to set specific timeouts/retries per endpoint. Here is an example:

spec:
  gateways:
    - istio-system/istio-ilbgateway
    - mesh
  hosts:
    - "{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local"
  http:
    - match:
      - uri:
          exact: "/api/endpoint-grpc"
      route:
        - destination:
            host: "{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local"
      timeout: 50ms
      retries:
        attempts: 1
        perTryTimeout: 20ms
        retryOn: "connect-failure,gateway-error,refused-stream,cancelled,deadline-exceeded,unavailable,internal,resource-exhausted"
    - match:
      - uri:
          exact: "/api/endpoint-http"
      route:
        - destination:
            host: "{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local"
      timeout: 100ms
      retries:
        attempts: 1
        perTryTimeout: 45ms
        retryOn: "connect-failure,gateway-error,refused-stream"
      trafficPolicy:
        connectionPool:
          http:
            maxRetries: 30
    - route:
      - destination:
          host:  {{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local

Looking at the CRD, it does not seem possible to do that. Flagger only generates one HTTP route. The match, timeout, retries and trafficPolicy are global to all endpoints.

Did I get that right or did I miss something? If my analysis is correct, is adding this feature something already planned?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions