KONG INGRESS not updating service timeouts

Hi,

I am trying to change connecti_timeout,read_timeout and write_timeout on services created on kubernetes. I created a kong ingress and applied to it as annotation on service but it does not take effect. I tried to add same annotation to ingress and still no effect. Can you please suggest how to update the timeouts.

kong ingress
kind: KongIngress
apiVersion: configuration.konghq.com/v1
metadata:
annotations:
kubernetes.io/ingress.class: “kong”
name: timeout-kong-ingress
proxy:
protocol: “http”
connect_timeout: 250000
read_timeout: 250000
write_timeout: 250000

service annotation

Blockquote

annotations:
konghq.com/override: timeout-kong-ingress
kubernetes.io/ingress.class: kong

Blockquote

curl output to adminapi/services -k
show connect_timeout : 60000
read_timeout: 60000
write_timeout: 60000

Which controller version are you using, and an you provide a complete set of resources that demonstrates this? You’ll want to use ``` around them to preserve the indentation.

This does work as expected for me on 2.2:

$ kubectl get kongingresses.configuration.konghq.com timeout-kong-ingress -oyaml; echo "---"; kubectl get svc httpbin -oyaml
apiVersion: configuration.konghq.com/v1
kind: KongIngress
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"configuration.konghq.com/v1","kind":"KongIngress","metadata":{"annotations":{},"name":"timeout-kong-ingress","namespace":"default"},"proxy":{"connect_timeout":250000,"protocol":"http","read_timeout":250000,"write_timeout":250000}}
  creationTimestamp: "2022-02-22T21:33:35Z"
  generation: 1
  name: timeout-kong-ingress
  namespace: default
  resourceVersion: "6031"
  uid: cd1a573a-8787-4e20-9910-a880c758479a
proxy:
  connect_timeout: 250000
  protocol: http
  read_timeout: 250000
  write_timeout: 250000
---
apiVersion: v1
kind: Service
metadata:
  annotations:
    konghq.com/override: timeout-kong-ingress
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"app":"httpbin"},"name":"httpbin","namespace":"default"},"spec":{"ports":[{"name":"http","port":80,"targetPort":80}],"selector":{"app":"httpbin"}}}
  creationTimestamp: "2022-02-22T21:33:14Z"
  labels:
    app: httpbin
  name: httpbin
  namespace: default
  resourceVersion: "6108"
  uid: e93da6db-ab6d-487e-bfc5-8114789d88a0
spec:
  clusterIP: 10.96.163.72
  clusterIPs:
  - 10.96.163.72
  ipFamilies:
  - IPv4
  ipFamilyPolicy: SingleStack
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: 80
  selector:
    app: httpbin
  sessionAffinity: None
  type: ClusterIP
status:
  loadBalancer: {}
$ curl -ks https://localhost:8449/services/default.httpbin.pnum-80 | jq
{
  "ca_certificates": null,
  "host": "httpbin.default.80.svc",
  "enabled": true,
  "name": "default.httpbin.pnum-80",
  "retries": 5,
  "protocol": "http",
  "write_timeout": 250000,
  "port": 80,
  "path": "/",
  "client_certificate": null,
  "id": "09876e68-e149-412e-83e0-8f6893732d04",
  "tls_verify": null,
  "tls_verify_depth": null,
  "updated_at": 1645565645,
  "connect_timeout": 250000,
  "created_at": 1645565645,
  "read_timeout": 250000,
  "tags": [
    "managed-by-ingress-controller"
  ]
}

Hi

I am using kong:2.5

I think my issue got resolved. I had to create kongingress in the namespace inside which my service was running. So i had to have kong ingress and service both in same namespace in order for the annotation to override my values.

Can you also please confirm if these values are in milliseconds or seconds?

Thank You

Milliseconds Admin API - v2.7.x | Kong Docs

Thank you for the help here