Skip to content

Commit

Permalink
Tune AWS load balancers to be consistent with other platforms
Browse files Browse the repository at this point in the history
GCP and Azure both hardcode LB timeouts - set AWS to match the
lower bound of Azure (2 failures @ 5s interval, 2 healthy).
By default AWS is 6 failures @ 10s which is a very long timeout
for the router.

In the future, if these attributes become customizable on GCP and
Azure, they should be consistent with our AWS settings.
  • Loading branch information
smarterclayton authored and openshift-cherrypick-robot committed Mar 3, 2020
1 parent d86b031 commit 5d9d0d5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/operator/controller/ingress/load_balancer_service.go
Expand Up @@ -40,6 +40,7 @@ var (
"service.beta.kubernetes.io/aws-load-balancer-internal": "0.0.0.0/0",
},
configv1.AzurePlatformType: {
// Azure load balancers are not customizable and are set to (2 fail @ 5s interval, 2 healthy)
"service.beta.kubernetes.io/azure-load-balancer-internal": "true",
},
// There are no required annotations for this platform as of
Expand Down Expand Up @@ -116,7 +117,14 @@ func desiredLoadBalancerService(ci *operatorv1.IngressController, deploymentRef
}
if infraConfig.Status.Platform == configv1.AWSPlatformType {
service.Annotations[awsLBProxyProtocolAnnotation] = "*"
// Set the load balancer for AWS to be as aggressive as Azure (2 fail @ 5s interval, 2 healthy)
service.Annotations["service.beta.kubernetes.io/aws-load-balancer-healthcheck-interval"] = "5"
service.Annotations["service.beta.kubernetes.io/aws-load-balancer-healthcheck-timeout"] = "4"
service.Annotations["service.beta.kubernetes.io/aws-load-balancer-healthcheck-unhealthy-threshold"] = "2"
service.Annotations["service.beta.kubernetes.io/aws-load-balancer-healthcheck-healthy-threshold"] = "2"
}
// Azure load balancers are not customizable and are set to (2 fail @ 5s interval, 2 healthy)
// GCP load balancers are not customizable and are set to (3 fail @ 8s interval, 1 healthy)

if infraConfig.Status.Platform == configv1.IBMCloudPlatformType {
service.Annotations[iksLBProxyProtocolAnnotations] = "public"
Expand Down

0 comments on commit 5d9d0d5

Please sign in to comment.