Contour: Document how to integrate with Linkerd

Created on 9 Jan 2020  路  5Comments  路  Source: projectcontour/contour

Now that Contour supports injecting HTTP headers, it should be possible to configure Contour as a Linkerd Ingress. We should verify and document how to do this.

aredocumentation good first issue help wanted

Most helpful comment

We could add a requestHeaders section to the virtualhost here maybe. Way back in IngressRoute design days, we thought of something similar to this.

The idea was to apply "defaults" to all the routes under that vhost. They could still override them, however, if someone wanted a default something (in this case header added), you could define it at the vhost level and Contour would apply to all the routes automatically down the tree.

All 5 comments

Linkerd blocks the proxy injection into Envoy pods see https://github.com/linkerd/linkerd2/issues/3910

With linkerd edge-20.3.1 linkerd no longer blocks the proxy injection into envoy / contour pods.

Using linkerd with contour/envoy works but a lot of configuration is required since you need to set the l5d-dst-override header explicitly for every route split.

Is it somehow possible to automatically add those headers? Either by adding a config flag to contour, similar to ambassador (add_linkerd_headers: true ) or by having variables when editing headers:

apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
  name: test
spec:
  routes:
  - requestHeadersPolicy:
      set:
      - name: l5d-dst-override
        value: ${SVC_NAME}.${SVC_NAMESPACE}.svc.cluster.local:${SVC_PORT}
    services:
    - name: test
      namespace: default
      port: 80

Thanks for checking on this @arminbuerkle.

I'm not sure that we would consider it in scope for Contour to have direct support for Linkerd headers. Perhaps you could do that with a modifying admission controller?

thanks @jpeach for the suggestion. An admission controller might be the way to go.

Regardless, are there any plans for contour to support variables like mentioned above for headers rewrite, or even prefix matching?

Other than that i _think_ this issue can be closed. Linkerd has a documentation of how to use it with contour.

We could add a requestHeaders section to the virtualhost here maybe. Way back in IngressRoute design days, we thought of something similar to this.

The idea was to apply "defaults" to all the routes under that vhost. They could still override them, however, if someone wanted a default something (in this case header added), you could define it at the vhost level and Contour would apply to all the routes automatically down the tree.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davecheney picture davecheney  路  6Comments

davecheney picture davecheney  路  4Comments

skriss picture skriss  路  3Comments

stevesloka picture stevesloka  路  6Comments

stevesloka picture stevesloka  路  6Comments