envoyconfig: fix databroker health checks (#3706)

This commit is contained in:
Caleb Doxsey 2022-10-25 12:37:46 -06:00 committed by GitHub
parent b68dc1ff4f
commit 3f7a482815
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -67,7 +67,7 @@ func (b *Builder) BuildClusters(ctx context.Context, cfg *config.Config) ([]*env
}
if len(authorizeURLs) > 1 {
authorizeCluster.HealthChecks = grpcHealthChecks("pomerium-authorize")
authorizeCluster.OutlierDetection = grpcAuthorizeOutlierDetection()
authorizeCluster.OutlierDetection = grpcOutlierDetection()
}
databrokerCluster, err := b.buildInternalCluster(ctx, cfg.Options, "pomerium-databroker", databrokerURLs, upstreamProtocolHTTP2)
@ -75,8 +75,8 @@ func (b *Builder) BuildClusters(ctx context.Context, cfg *config.Config) ([]*env
return nil, err
}
if len(databrokerURLs) > 1 {
authorizeCluster.HealthChecks = grpcHealthChecks("pomerium-databroker")
authorizeCluster.OutlierDetection = grpcAuthorizeOutlierDetection()
databrokerCluster.HealthChecks = grpcHealthChecks("pomerium-databroker")
databrokerCluster.OutlierDetection = grpcOutlierDetection()
}
envoyAdminCluster, err := b.buildEnvoyAdminCluster(ctx, cfg)
@ -406,8 +406,8 @@ func (b *Builder) buildCluster(
return cluster.Validate()
}
// grpcAuthorizeOutlierDetection defines slightly more aggressive malfunction detection for authorize endpoints
func grpcAuthorizeOutlierDetection() *envoy_config_cluster_v3.OutlierDetection {
// grpcOutlierDetection defines slightly more aggressive malfunction detection for grpc endpoints
func grpcOutlierDetection() *envoy_config_cluster_v3.OutlierDetection {
return &envoy_config_cluster_v3.OutlierDetection{
Consecutive_5Xx: wrapperspb.UInt32(5),
Interval: durationpb.New(time.Second * 10),