Skip to content

Commit

Permalink
upgrade to latest dependencies
Browse files Browse the repository at this point in the history
bumping knative.dev/pkg 0d0cd4e...d6ab729:
  > d6ab729 upgrade to latest dependencies (# 2870)
  > 283df0b Don't migrate storage version if CRD has one storage version (# 2861)
  > d0c133d Revert "Fix potential redefined error with kubeconfig flag (# 2855)" (# 2869)
  > 44a8a5e Use `DialTLSContextFunc` instead of `tls.Config` for `NewProxyAutoTLSTransport` (# 2842)
bumping knative.dev/networking 64434a8...2a7676e:
  > 2a7676e upgrade to latest dependencies (# 883)
  > b6cd712 upgrade to latest dependencies (# 882)

Signed-off-by: Knative Automation <automation@knative.team>
  • Loading branch information
knative-automation committed Oct 17, 2023
1 parent 0a41f16 commit 95cf48d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 26 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ require (
k8s.io/code-generator v0.28.1
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
knative.dev/hack v0.0.0-20231016131700-2c938d4918da
knative.dev/networking v0.0.0-20231016141047-64434a8361bf
knative.dev/pkg v0.0.0-20231016142534-0d0cd4e7dbef
knative.dev/networking v0.0.0-20231017124814-2a7676e912b7
knative.dev/pkg v0.0.0-20231017113806-d6ab72900ea5
sigs.k8s.io/gateway-api v0.8.1
sigs.k8s.io/yaml v1.3.0
)
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -680,10 +680,10 @@ k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrC
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/hack v0.0.0-20231016131700-2c938d4918da h1:xy+fvuz2LDOMsZ5UwXRaMF70NYUs9fsG+EF5/ierYBg=
knative.dev/hack v0.0.0-20231016131700-2c938d4918da/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/networking v0.0.0-20231016141047-64434a8361bf h1:XQ+IK+AzR/EKy/cV1NNtIEDakGfazDbIwvjs/6BunjI=
knative.dev/networking v0.0.0-20231016141047-64434a8361bf/go.mod h1:ygI25+T2udHcTEt5iobFtwqNcS1mNp4ziZYLuA4E6RI=
knative.dev/pkg v0.0.0-20231016142534-0d0cd4e7dbef h1:RTfs5rHxUy4wT1zLIsFeTkiZgJD3gKG3xdTezjOEato=
knative.dev/pkg v0.0.0-20231016142534-0d0cd4e7dbef/go.mod h1:khuxKBM4WqjcCIeCIm+4VDNBmzMsl0ZspXGMm5i/fFA=
knative.dev/networking v0.0.0-20231017124814-2a7676e912b7 h1:6+1icZuxiZO1paFZ4d/ysKWVG2M4WB7OxNJNyLG0P/E=
knative.dev/networking v0.0.0-20231017124814-2a7676e912b7/go.mod h1:1gcHoIVG47ekQWjkddqRq+/7tWRh+CB9W4k/NAcdRbk=
knative.dev/pkg v0.0.0-20231017113806-d6ab72900ea5 h1:9AvFZdEtuwKWDcTV1VSwmrgrRR9f38wbIAm+sNwLivQ=
knative.dev/pkg v0.0.0-20231017113806-d6ab72900ea5/go.mod h1:HHRXEd7ZlFpthgE+rwAZ6MUVnuJOAeolnaFSthXloUQ=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
Expand Down
8 changes: 2 additions & 6 deletions vendor/knative.dev/pkg/environment/client_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,8 @@ func (c *ClientConfig) InitFlags(fs *flag.FlagSet) {
fs.StringVar(&c.ServerURL, "server", "",
"The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.")

if f := fs.Lookup("kubeconfig"); f != nil {
c.Kubeconfig = f.Value.String()
} else {
fs.StringVar(&c.Kubeconfig, "kubeconfig", os.Getenv("KUBECONFIG"),
"Path to a kubeconfig. Only required if out-of-cluster.")
}
fs.StringVar(&c.Kubeconfig, "kubeconfig", os.Getenv("KUBECONFIG"),
"Path to a kubeconfig. Only required if out-of-cluster.")

fs.IntVar(&c.Burst, "kube-api-burst", int(envVarOrDefault("KUBE_API_BURST", 0)), "Maximum burst for throttle.")

Expand Down
8 changes: 3 additions & 5 deletions vendor/knative.dev/pkg/network/h2c.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,11 @@ func newH2CTransport(disableCompression bool) http.RoundTripper {

// newH2Transport constructs a neew H2 transport. That transport will handles HTTPS traffic
// with TLS config.
func newH2Transport(disableCompression bool, tlsConf *tls.Config) http.RoundTripper {
func newH2Transport(disableCompression bool, tlsContext DialTLSContextFunc) http.RoundTripper {
return &http2.Transport{
DisableCompression: disableCompression,
DialTLS: func(netw, addr string, tlsConf *tls.Config) (net.Conn, error) {
return DialTLSWithBackOff(context.Background(),
netw, addr, tlsConf)
DialTLSContext: func(ctx context.Context, network, addr string, cfg *tls.Config) (net.Conn, error) {
return tlsContext(ctx, network, addr)
},
TLSClientConfig: tlsConf,
}
}
15 changes: 8 additions & 7 deletions vendor/knative.dev/pkg/network/transports.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,17 @@ func newHTTPTransport(disableKeepAlives, disableCompression bool, maxIdle, maxId
return transport
}

func newHTTPSTransport(disableKeepAlives, disableCompression bool, maxIdle, maxIdlePerHost int, tlsConf *tls.Config) http.RoundTripper {
type DialTLSContextFunc func(ctx context.Context, network, addr string) (net.Conn, error)

func newHTTPSTransport(disableKeepAlives, disableCompression bool, maxIdle, maxIdlePerHost int, tlsContext DialTLSContextFunc) http.RoundTripper {
transport := http.DefaultTransport.(*http.Transport).Clone()
transport.DialContext = DialWithBackOff
transport.DisableKeepAlives = disableKeepAlives
transport.MaxIdleConns = maxIdle
transport.MaxIdleConnsPerHost = maxIdlePerHost
transport.ForceAttemptHTTP2 = false
transport.DisableCompression = disableCompression
transport.DialTLSContext = tlsContext

transport.TLSClientConfig = tlsConf
return transport
}

Expand All @@ -148,11 +149,11 @@ func NewProberTransport() http.RoundTripper {
NewH2CTransport())
}

// NewProxyAutoTLSTransport is same with NewProxyAutoTransport but it has tls.Config to create HTTPS request.
func NewProxyAutoTLSTransport(maxIdle, maxIdlePerHost int, tlsConf *tls.Config) http.RoundTripper {
// NewProxyAutoTLSTransport is same with NewProxyAutoTransport but it has DialTLSContextFunc to create HTTPS request.
func NewProxyAutoTLSTransport(maxIdle, maxIdlePerHost int, tlsContext DialTLSContextFunc) http.RoundTripper {
return newAutoTransport(
newHTTPSTransport(false /*disable keep-alives*/, true /*disable auto-compression*/, maxIdle, maxIdlePerHost, tlsConf),
newH2Transport(true /*disable auto-compression*/, tlsConf))
newHTTPSTransport(false /*disable keep-alives*/, true /*disable auto-compression*/, maxIdle, maxIdlePerHost, tlsContext),
newH2Transport(true /*disable auto-compression*/, tlsContext))
}

// NewAutoTransport creates a RoundTripper that can use appropriate transport
Expand Down
4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ k8s.io/utils/trace
# knative.dev/hack v0.0.0-20231016131700-2c938d4918da
## explicit; go 1.18
knative.dev/hack
# knative.dev/networking v0.0.0-20231016141047-64434a8361bf
# knative.dev/networking v0.0.0-20231017124814-2a7676e912b7
## explicit; go 1.18
knative.dev/networking/config
knative.dev/networking/pkg
Expand Down Expand Up @@ -931,7 +931,7 @@ knative.dev/networking/test/test_images/runtime/handlers
knative.dev/networking/test/test_images/timeout
knative.dev/networking/test/test_images/wsserver
knative.dev/networking/test/types
# knative.dev/pkg v0.0.0-20231016142534-0d0cd4e7dbef
# knative.dev/pkg v0.0.0-20231017113806-d6ab72900ea5
## explicit; go 1.18
knative.dev/pkg/apis
knative.dev/pkg/apis/duck
Expand Down

0 comments on commit 95cf48d

Please sign in to comment.