kubernetes-sigs / aws-load-balancer-controller

A Kubernetes controller for Elastic Load Balancers
https://kubernetes-sigs.github.io/aws-load-balancer-controller/
Apache License 2.0
3.92k stars 1.46k forks source link

service.beta.kubernetes.io/aws-load-balancer-healthcheck-timeout is never applied #2952

Closed matti closed 1 year ago

matti commented 1 year ago

Describe the bug

service.beta.kubernetes.io/aws-load-balancer-healthcheck-timeout: is never applied and this is not documented at all.

Steps to reproduce

Following yaml

apiVersion: v1
kind: Service
metadata:
  name: test-lb
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-ip-address-type: dualstack
    service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: ip
    service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
    service.beta.kubernetes.io/aws-load-balancer-type: external
    service.beta.kubernetes.io/aws-load-balancer-healthcheck-protocol: "HTTP"
    service.beta.kubernetes.io/aws-load-balancer-healthcheck-port: "8080"
    service.beta.kubernetes.io/aws-load-balancer-healthcheck-healthy-threshold: "2"
    service.beta.kubernetes.io/aws-load-balancer-healthcheck-unhealthy-threshold: "2"
    service.beta.kubernetes.io/aws-load-balancer-healthcheck-timeout: "10"
    service.beta.kubernetes.io/aws-load-balancer-healthcheck-interval: "30"
    service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
    service.beta.kubernetes.io/aws-load-balancer-target-group-attributes: deregistration_delay.timeout_seconds=31,deregistration_delay.connection_termination.enabled=true,stickiness.enabled=false,load_balancing.cross_zone.enabled=true
spec:
  type: LoadBalancer
  selector:
    app: whoami
  ports:
    - name: http
      port: 80
      targetPort: 8000

sets the timeout to 6s instead of 10s (or any value)

image

this 6s is the default value.

Expected outcome

Values of 2s to 120s would work.

Environment

602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-load-balancer-controller:v2.4.3

eks 1.24

matti commented 1 year ago

huh?

https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues/1714#issuecomment-740315412

https://github.com/kubernetes-sigs/aws-load-balancer-controller/pull/1727

matti commented 1 year ago

and if it's hardcoded to 6s somewhere then please document it - this is so confusing that documentation says how it can be changed and in reality it can not.

kishorj commented 1 year ago

@matti, there were limitations on the AWS NLB side for timeout configuration. NLB target groups now support custom timeout values - this is a recent change. PR #2899 has the fix, and will be included in v2.4.6 patch release.

Duplicate of issue #2898

matti commented 1 year ago

whens that release coming out - has been over a month

kishorj commented 1 year ago

whens that release coming out - has been over a month

we will try for early next year. :)

I'm closing the issue since we are already tracking it.

matti commented 1 year ago

I don't understand why these issues are closed before the fix is released.

Looking forward for the fix in 2024!

carlos-neto-trustly commented 1 month ago

I faced the same problem. Yeah, it's a bug in the code. This parameter is ignored. This problem was solved in the following PR:

This fix are present in the version 2.4.6: