Merge remote-tracking branch 'origin/master' into feature/envoy

This commit is contained in:
Caleb Doxsey 2020-05-08 11:17:30 -06:00 committed by Travis Groth
parent 99e788a9b4
commit 02615b8b6c
48 changed files with 1283 additions and 561 deletions

View file

@ -11,10 +11,10 @@ import (
// A Cluster is used to configure a kubernetes cluster.
type Cluster struct {
workingDir string
Transport *http.Transport
transport http.RoundTripper
certs *TLSCerts
workingDir string
certs *TLSCerts
}
// New creates a new Cluster.
@ -32,7 +32,7 @@ func (cluster *Cluster) NewHTTPClient() *http.Client {
panic(err)
}
return &http.Client{
Transport: &loggingRoundTripper{cluster.transport},
Transport: &loggingRoundTripper{cluster.Transport},
CheckRedirect: func(req *http.Request, via []*http.Request) error {
return http.ErrUseLastResponse
},

View file

@ -15,8 +15,9 @@ import (
"time"
"github.com/google/go-jsonnet"
"github.com/pomerium/pomerium/integration/internal/httputil"
"github.com/rs/zerolog/log"
"github.com/pomerium/pomerium/integration/internal/netutil"
)
var requiredDeployments = []string{
@ -55,13 +56,14 @@ func (cluster *Cluster) Setup(ctx context.Context) error {
return err
}
cluster.transport = httputil.NewLocalRoundTripper(&http.Transport{
cluster.Transport = &http.Transport{
DialContext: netutil.NewLocalDialer((&net.Dialer{}), map[string]string{
"443": hostport,
}).DialContext,
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
},
}, map[string]string{
"443": hostport,
})
}
return nil
}