mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-01 18:33:19 +02:00
expose envoy cluster options in policy (#1804)
This commit is contained in:
parent
c5b67f6f54
commit
3a505d5573
13 changed files with 278 additions and 152 deletions
23
internal/controlplane/constants.go
Normal file
23
internal/controlplane/constants.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
package controlplane
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
envoy_config_cluster_v3 "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3"
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
)
|
||||
|
||||
var (
|
||||
errNoEndpoints = errors.New("cluster must have endpoints")
|
||||
defaultConnectionTimeout = ptypes.DurationProto(time.Second * 10)
|
||||
)
|
||||
|
||||
// newDefaultEnvoyClusterConfig creates envoy cluster with certain default values
|
||||
func newDefaultEnvoyClusterConfig() *envoy_config_cluster_v3.Cluster {
|
||||
return &envoy_config_cluster_v3.Cluster{
|
||||
ConnectTimeout: defaultConnectionTimeout,
|
||||
RespectDnsTtl: true,
|
||||
DnsLookupFamily: envoy_config_cluster_v3.Cluster_AUTO,
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue