mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-02 16:30:17 +02:00
Merge remote-tracking branch 'origin/master' into feature/envoy
This commit is contained in:
parent
99e788a9b4
commit
02615b8b6c
48 changed files with 1283 additions and 561 deletions
|
@ -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
|
||||
},
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue