Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we use a startup parameters in an ingress rule? #1498

Open
kenotsolutions opened this issue Aug 5, 2020 · 2 comments
Open

Can we use a startup parameters in an ingress rule? #1498

kenotsolutions opened this issue Aug 5, 2020 · 2 comments

Comments

@kenotsolutions
Copy link

Hi,

I could not find my question answer in the repository. Can we use a startup parameter in an ingress rule? for example, I would like to use this disable-http-keepalives for only below ingress rule. I can disable it from Kubernetes skipper deployment but If I can I would like to disable keep alive for only this ingress rule not for all the k8s env.

I put it under annotations but it did not work there.

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    disable-http-keepalives: "true"
    kubectl.kubernetes.io/last-applied-configuration: |
    kubernetes.io/ingress-class: skipper-https
    proxy-preserve-host: "true"
    zalando.org/skipper-routes: |
      test: PathRegexp("/test") -> setResponseHeader("X", "bar") -> inlineContent("<html><body>hello</body></html>") ->     name: test-ingress
  namespace: dev-test
spec:
  rules:
  - host: dev.test.com
    http:
      paths:
      - backend:
          serviceName: frontend
          servicePort: 80
        pathType: ImplementationSpecific
status:
  loadBalancer: {}
@aryszka
Copy link
Contributor

aryszka commented Aug 6, 2020

Hi Tolgay,

currently, this is not possible, because we use a shared connection pool and the individual routes currently don't have control on the connection states. But it's a good idea for a new feature.

How I would imagine, we could create a filter that instruments the proxy mechanism to use the connections in a specific way, like always create a new one and close after each request that are handled by a certain route. I don't know currently if this is feasible, but let's keep the issue open, maybe you or somebody else finds a way. PR welcome!

Note that we generate route objects from the ingresses, and the proxy component only deals with route objects.

Best,
Arpad

@szuecs
Copy link
Member

szuecs commented Nov 8, 2020

@aryszka what do you think about connection pool per backend?
We could have a map[backend]*http.Client for example. Unclear to me if people would like to change it even more fine granular like per route.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants