Skip to content

Commit

Permalink
set upstream tls for extension and dnsname clusters
Browse files Browse the repository at this point in the history
Signed-off-by: Clay Kauzlaric <ckauzlaric@vmware.com>
  • Loading branch information
KauzClay committed Dec 8, 2023
1 parent 381f66f commit 2177ee7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/contour/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,7 @@ func (s *Server) getDAGBuilder(dbc dagBuilderConfig) *dag.Builder {
FieldLogger: s.log.WithField("context", "ExtensionServiceProcessor"),
ClientCertificate: dbc.clientCert,
ConnectTimeout: dbc.connectTimeout,
UpstreamTLS: dbc.upstreamTLS,
},
&dag.HTTPProxyProcessor{
EnableExternalNameService: dbc.enableExternalNameService,
Expand Down
5 changes: 5 additions & 0 deletions internal/dag/extension_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ type ExtensionServiceProcessor struct {

// ConnectTimeout defines how long the proxy should wait when establishing connection to upstream service.
ConnectTimeout time.Duration

// UpstreamTLS defines the TLS settings like min/max version
// and cipher suites for upstream connections.
UpstreamTLS *contour_api_v1alpha1.EnvoyTLS
}

var _ Processor = &ExtensionServiceProcessor{}
Expand Down Expand Up @@ -114,6 +118,7 @@ func (p *ExtensionServiceProcessor) buildExtensionService(
ClusterTimeoutPolicy: ctp,
SNI: "",
ClientCertificate: clientCertSecret,
UpstreamTLS: (*UpstreamTLS)(p.UpstreamTLS),
}

lbPolicy := loadBalancerPolicy(ext.Spec.LoadBalancerPolicy)
Expand Down
1 change: 1 addition & 0 deletions internal/dag/httpproxy_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ func (p *HTTPProxyProcessor) computeHTTPProxy(proxy *contour_api_v1.HTTPProxy) {
Port: port,
DNSLookupFamily: dnsLookupFamily,
UpstreamValidation: uv,
UpstreamTLS: (*UpstreamTLS)(p.UpstreamTLS),
},
CacheDuration: cacheDuration,
},
Expand Down

0 comments on commit 2177ee7

Please sign in to comment.