mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Shorten health check timeout for AWS NLB with externalTrafficPolicy: Local
This is a fix for issue #73362
This commit is contained in:
parent
dd5efc420b
commit
0b481e8412
@ -550,6 +550,11 @@ func (c *Cloud) ensureTargetGroup(targetGroup *elbv2.TargetGroup, serviceName ty
|
||||
// Account for externalTrafficPolicy = "Local"
|
||||
if mapping.HealthCheckPort != mapping.TrafficPort {
|
||||
input.HealthCheckPort = aws.String(strconv.Itoa(int(mapping.HealthCheckPort)))
|
||||
// Local traffic should have more aggressive health checking by default.
|
||||
// Min allowed by NLB is 10 seconds, and 2 threshold count
|
||||
input.HealthCheckIntervalSeconds = aws.Int64(10)
|
||||
input.HealthyThresholdCount = aws.Int64(2)
|
||||
input.UnhealthyThresholdCount = aws.Int64(2)
|
||||
}
|
||||
|
||||
result, err := c.elbv2.CreateTargetGroup(input)
|
||||
|
Loading…
Reference in New Issue
Block a user