contour: IngressRoute support for custom request timeout

Describe the solution you’d like I’d like to be able to configure custom request timeouts per IngressRoute.

It seems from docs that you can use annotations on ingresses, but according to this comment

IngressRoutes don’t really use annotations for anything

Docs regarding IngressRoute contain no reference to a requests timeout config parameter.

Environment:

  • Kubernetes version: v1.10.3 (EKS)
  • Cloud provider or hardware configuration: AWS

Contour daemon set

apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  labels:
    app: contour
  name: contour
  namespace: heptio-contour
spec:
  selector:
    matchLabels:
      app: contour
  template:
    metadata:
      annotations:
        prometheus.io/format: prometheus
        prometheus.io/path: /stats
        prometheus.io/port: "9001"
        prometheus.io/scrape: "true"
      creationTimestamp: null
      labels:
        app: contour
    spec:
      containers:
      - args:
        - serve
        - --incluster
        command:
        - contour
        image: gcr.io/heptio-images/contour:latest
        imagePullPolicy: Always
        name: contour
        ports:
        - containerPort: 8000
          hostPort: 8000
          name: contour
          protocol: TCP
      - args:
        - --config-path /config/contour.yaml
        - --service-cluster cluster0
        - --service-node node0
        - --log-level info
        - --v2-config-only
        command:
        - envoy
        image: docker.io/envoyproxy/envoy-alpine:v1.7.0
        name: envoy
        ports:
        - containerPort: 8080
          hostPort: 8080
          name: http
          protocol: TCP
        - containerPort: 8443
          hostPort: 8443
          name: https
          protocol: TCP
        volumeMounts:
        - mountPath: /config
          name: contour-config
      dnsPolicy: ClusterFirst
      hostNetwork: true
      initContainers:
      - args:
        - bootstrap
        - /config/contour.yaml
        command:
        - contour
        image: gcr.io/heptio-images/contour:latest
        imagePullPolicy: Always
        name: envoy-initconfig
        volumeMounts:
        - mountPath: /config
          name: contour-config
      restartPolicy: Always
      serviceAccount: contour
      serviceAccountName: contour
      volumes:
      - emptyDir: {}
        name: contour-config

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (14 by maintainers)

Commits related to this issue

Most upvoted comments

I am willing to work on this if nobody is actively working. Will start with the design doc.

At a first pass thinking about how this configuration should be exposed I think Retry and Timeout parameters should be segregated into different types; eg.

route: match: /slow retry: count: 7 retryon: - 50x timeout: connect: 500ms response: 2s

On Sun, 27 Jan 2019 at 10:01, Robert Syvarth notifications@github.com wrote:

Great! I am mostly concerned with the RetryOn/NumRetries fields personally

  • we see in our cluster that envoy will often attempt a request on a closed connection (if a pod gets killed for example) and which returns a 503 immediately. We reduce our error rate pretty significantly by enabling the envoy-level retries.

I am not sure that retry logic error makes a ton of sense as a part of a generic timeout object, what do you think about just adding in these fields to the Route?

// RetryOn specifies the conditions under which retry takes place RetryOn string json:"retryOn,omitempty" // NumRetries defines the maximum number of retries Envoy should make before abandoning // and returning an error to the client NumRetries uint32 json:"numRetries,omitempty"

(thanks for all of the work on this project btw! Currently migrating our cluster over from Ambassador and really appreciate the k8s-native design being used here).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/heptio/contour/issues/815#issuecomment-457873640, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAcAxM3ZQG12UfWJhjEl6UgLvRF5kKrks5vHN5bgaJpZM4YrPZ2 .