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

How to set timeout #472

Closed
vivianforzj opened this issue Nov 28, 2019 · 3 comments
Closed

How to set timeout #472

vivianforzj opened this issue Nov 28, 2019 · 3 comments

Comments

@vivianforzj
Copy link

Version

  1. kong version: 1.3.0, installed by helm chart
  2. kubectrl version:
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.5", GitCommit:"2166946f41b36dea2c4626f90a77706f426cdea2", GitTreeState:"clean", BuildDate:"2019-03-25T15:26:52Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.5", GitCommit:"2166946f41b36dea2c4626f90a77706f426cdea2", GitTreeState:"clean", BuildDate:"2019-03-25T15:19:22Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}

What happened

I install kong by helm, and use KongIngress as proxy, but the timeout settings does not work as expected.

The KongIngress yaml:

apiVersion: configuration.konghq.com/v1
kind: KongIngress
metadata:
  name: custom-kongingress
route:
  strip_path: false
upstream:
  algorithm: least-connections
proxy:
  protocol: http
  path: /
  connect_timeout: 600000
  retries: 3
  read_timeout: 600000
  write_timeout: 600000

and I use this KongIngress as ingress:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: web-ingress
  annotations:
    kubernetes.io/ingress.class: "kong"
    configuration.konghq.com: custom-kongingress
spec:
  rules:
    - http:
        paths:
          - path: /xxxx
            backend:
               serviceName: web
               servicePort: 80

I may use the timeout settings in a wrong way, so it does work. How can I set timeout correctly? Thanks.

@vivianforzj
Copy link
Author

@hbagdi hi, I create a new issue here. Please help check my yaml. Thank you.

@hbagdi
Copy link
Member

hbagdi commented Dec 2, 2019

Proxy timeouts are a configuration setting related to a Kubernetes service.
You need to apply the configuration.konghq.com annotation to the specific Kubernetes service (and not an Ingress resource) for this to take effect.

@vivianforzj
Copy link
Author

Yes, it works. Thanks.

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

2 participants