Skip to content

Commit

Permalink
upgrade to latest dependencies (#2077)
Browse files Browse the repository at this point in the history
bumping knative.dev/eventing bb76b30...e874b89:
  > e874b89 upgrade to latest dependencies (# 6321)
  > fd10179 Update community files (# 6320)
bumping knative.dev/eventing-kafka 2d621fa...bdbcc86:
  > bdbcc86 Update community files (# 1149)
bumping knative.dev/pkg e2b4d74...00c122e:
  > 00c122e Add genreconcile for ConfigMap (# 2489)
  > 6bb6518 Update actions (# 2488)
  > 5b0e728 drop deprecated eventing repos (# 2463)
  > 75629c8 Update community files (# 2487)
  > ca82d2b Add `NewProxyAutoTLSTransport` and `DialTLSWithBackOff` to support TLS proxy (# 2479)
bumping knative.dev/hack 02c525c...6ffd841:
  > 6ffd841 Update community files (# 168)
bumping knative.dev/reconciler-test 490effc...55eab02:
  > 55eab02 upgrade to latest dependencies (# 326)
  > bec200e Update community files (# 325)

Signed-off-by: Knative Automation <automation@knative.team>
  • Loading branch information
knative-automation authored Apr 12, 2022
1 parent f29f12d commit 9714d76
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 26 deletions.
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ require (
k8s.io/apiserver v0.23.4
k8s.io/client-go v0.23.5
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
knative.dev/eventing v0.30.1-0.20220411014035-bb76b30d7cbc
knative.dev/eventing-kafka v0.30.1-0.20220411014620-2d621fa05a48
knative.dev/hack v0.0.0-20220411013954-02c525c25eb7
knative.dev/pkg v0.0.0-20220411013750-e2b4d748e59f
knative.dev/reconciler-test v0.0.0-20220411014048-490effc323f3
knative.dev/eventing v0.30.1-0.20220411142907-e874b89d6d56
knative.dev/eventing-kafka v0.30.1-0.20220411133507-bdbcc864cf94
knative.dev/hack v0.0.0-20220411131823-6ffd8417de7c
knative.dev/pkg v0.0.0-20220411234407-00c122e376d0
knative.dev/reconciler-test v0.0.0-20220411142808-55eab02440e9
sigs.k8s.io/yaml v1.3.0
)
24 changes: 13 additions & 11 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1413,34 +1413,36 @@ k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19V
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
knative.dev/control-protocol v0.0.0-20220321133447-b92711ba8bfd/go.mod h1:ROaAETMPMmrf+vXlCYkyBaooDl1P005FopSS5XFRtog=
knative.dev/eventing v0.30.1-0.20220322132012-a27ee9e2097c/go.mod h1:jefwGT1mmjQUnS1mvWH95mE1TtO9KbKzVelDCjE/4QU=
knative.dev/eventing v0.30.1-0.20220411014035-bb76b30d7cbc h1:hGcQ3J4RiC2I4t/wxe1M0bPsPZqTHRcs9t9rfHcWaYc=
knative.dev/eventing v0.30.1-0.20220411014035-bb76b30d7cbc/go.mod h1:EcpeHeVqNIwFrth5ghfCoNWx1AWGcWELdOGfqZgMwXk=
knative.dev/eventing-kafka v0.30.1-0.20220411014620-2d621fa05a48 h1:39IiJn5hL5loC79ueml2ddk7Y0/gavTFsC+BESOKl1U=
knative.dev/eventing-kafka v0.30.1-0.20220411014620-2d621fa05a48/go.mod h1:NOLTYCYqacXsr4WJLXeYfLCi+BzGAs645tY/hIr8nCM=
knative.dev/eventing v0.30.1-0.20220411142907-e874b89d6d56 h1:AEt76KgwdxCrJmnvtQdU3mO5FVY0qWce56EpaFLJSUE=
knative.dev/eventing v0.30.1-0.20220411142907-e874b89d6d56/go.mod h1:BGFxvInA40GsYeMBERaOjVq97kFJwubFO/A/dOdXtSg=
knative.dev/eventing-kafka v0.30.1-0.20220411133507-bdbcc864cf94 h1:pllOCoDOhNNJx4sTaSzERdldOwsI411IrV3MQhFCltI=
knative.dev/eventing-kafka v0.30.1-0.20220411133507-bdbcc864cf94/go.mod h1:NOLTYCYqacXsr4WJLXeYfLCi+BzGAs645tY/hIr8nCM=
knative.dev/hack v0.0.0-20220224013837-e1785985d364/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20220314052818-c9c3ea17a2e9/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20220318020218-14f832e506f8/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20220328133751-f06773764ce3/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20220407171644-0e0784b13cef/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20220411013954-02c525c25eb7 h1:+3Bg48BlD9gA+DM1qIcIZ9YgLEWOiUkmz2rRj60Lop4=
knative.dev/hack v0.0.0-20220411013954-02c525c25eb7/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20220411131823-6ffd8417de7c h1:aXsFXeky/GccNQxwf72CS4NR3EoqTqsCVNKQnblfwr0=
knative.dev/hack v0.0.0-20220411131823-6ffd8417de7c/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack/schema v0.0.0-20220314052818-c9c3ea17a2e9/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0=
knative.dev/hack/schema v0.0.0-20220407171644-0e0784b13cef/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0=
knative.dev/hack/schema v0.0.0-20220411013954-02c525c25eb7/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0=
knative.dev/pkg v0.0.0-20220301181942-2fdd5f232e77/go.mod h1:SsH9J6Gz+CvrHmoL0TELJXmMmohqKSQ5bpJvCv+1+ZI=
knative.dev/pkg v0.0.0-20220310195447-38af013b30ff/go.mod h1:SsH9J6Gz+CvrHmoL0TELJXmMmohqKSQ5bpJvCv+1+ZI=
knative.dev/pkg v0.0.0-20220316002959-3a4cc56708b9/go.mod h1:3r6srDeiuiG5DXSGfIe12r2U3Tj5JeeHnQaIXPe/4Zc=
knative.dev/pkg v0.0.0-20220318133418-7f16595277b2/go.mod h1:nKJ2L4o7or3j58eqMK843kbIM0SiYnAXXsisfEQECS8=
knative.dev/pkg v0.0.0-20220318185521-e6e3cf03d765/go.mod h1:nKJ2L4o7or3j58eqMK843kbIM0SiYnAXXsisfEQECS8=
knative.dev/pkg v0.0.0-20220329144915-0a1ec2e0d46c/go.mod h1:0A5D5tOLettuVoi5x+0SLGRfrvVemXXtLH247WupPJk=
knative.dev/pkg v0.0.0-20220407210145-4d62e1dbb943/go.mod h1:0A5D5tOLettuVoi5x+0SLGRfrvVemXXtLH247WupPJk=
knative.dev/pkg v0.0.0-20220411013750-e2b4d748e59f h1:xKE6bKJ92hMbLhnUpw9gaztaaTM4itj6kWQ5oUbSVOQ=
knative.dev/pkg v0.0.0-20220411013750-e2b4d748e59f/go.mod h1:0A5D5tOLettuVoi5x+0SLGRfrvVemXXtLH247WupPJk=
knative.dev/pkg v0.0.0-20220411053220-ca82d2bbb2da/go.mod h1:0A5D5tOLettuVoi5x+0SLGRfrvVemXXtLH247WupPJk=
knative.dev/pkg v0.0.0-20220411131850-75629c8ab60e/go.mod h1:0A5D5tOLettuVoi5x+0SLGRfrvVemXXtLH247WupPJk=
knative.dev/pkg v0.0.0-20220411234407-00c122e376d0 h1:dY5DItNU5gQGFddsxkGQvBt4Zu1cZWE7irhNV9rYHpU=
knative.dev/pkg v0.0.0-20220411234407-00c122e376d0/go.mod h1:0A5D5tOLettuVoi5x+0SLGRfrvVemXXtLH247WupPJk=
knative.dev/reconciler-test v0.0.0-20220303141206-84821d26ed1f/go.mod h1:K5pZJkenonlT9o+MtRaNsBP7BazGwjhqYPepuV1zdnU=
knative.dev/reconciler-test v0.0.0-20220314160418-3b7a0d7f7b4b/go.mod h1:RX+Piu5qCWSN3ciiJCOnWDEwd9v9hawbpW73z4HgKA8=
knative.dev/reconciler-test v0.0.0-20220321082547-afd9ca7f6603/go.mod h1:kqLx5ImxclqwC7SR1w+2pzuhqvkHMDVqDzEmbAixkII=
knative.dev/reconciler-test v0.0.0-20220407164846-93ef9639ad95/go.mod h1:dNSuxm0NYNN/t0zzLhdBBZsxKNDGmae92Uc53qNIRIM=
knative.dev/reconciler-test v0.0.0-20220411014048-490effc323f3 h1:3Mtp0bSNOnVjLHdRLQ6xg8tmkNIpPKuKU2zF30mOtAI=
knative.dev/reconciler-test v0.0.0-20220411014048-490effc323f3/go.mod h1:lpugBzYOTtwVbTS+UHDG8oCBEb6mRsBnJm7Lp/Yhcq4=
knative.dev/reconciler-test v0.0.0-20220411142808-55eab02440e9 h1:igM2d9OHjEabeX4WP1h5Ov95Kecl1x/7c8e5ZOqZAy0=
knative.dev/reconciler-test v0.0.0-20220411142808-55eab02440e9/go.mod h1:gH/ghOMDp7c2I2EAAhH4kYh0MI2hJ75OtiAMfeSl85o=
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
Expand Down
2 changes: 1 addition & 1 deletion vendor/knative.dev/pkg/hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ EXTERNAL_INFORMER_PKG="k8s.io/client-go/informers" \
k8s.io/api \
"${K8S_TYPES}" \
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt \
--force-genreconciler-kinds "Namespace,Deployment,Secret,Pod,CronJob,NetworkPolicy"
--force-genreconciler-kinds "Namespace,ConfigMap,Deployment,Secret,Pod,CronJob,NetworkPolicy"

OUTPUT_PKG="knative.dev/pkg/client/injection/apiextensions" \
VERSIONED_CLIENTSET_PKG="k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" \
Expand Down
13 changes: 13 additions & 0 deletions vendor/knative.dev/pkg/network/h2c.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,16 @@ 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 {
return &http2.Transport{
DisableCompression: disableCompression,
DialTLS: func(netw, addr string, tlsConf *tls.Config) (net.Conn, error) {
return DialTLSWithBackOff(context.Background(),
netw, addr, tlsConf)
},
TLSClientConfig: tlsConf,
}
}
47 changes: 43 additions & 4 deletions vendor/knative.dev/pkg/network/transports.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package network

import (
"context"
"crypto/tls"
"errors"
"fmt"
"net"
Expand Down Expand Up @@ -45,7 +46,7 @@ func newAutoTransport(v1, v2 http.RoundTripper) http.RoundTripper {
})
}

const sleepTO = 30 * time.Millisecond
const sleep = 30 * time.Millisecond

var backOffTemplate = wait.Backoff{
Duration: 50 * time.Millisecond,
Expand All @@ -63,19 +64,37 @@ var DialWithBackOff = NewBackoffDialer(backOffTemplate)
// between tries.
func NewBackoffDialer(backoffConfig wait.Backoff) func(context.Context, string, string) (net.Conn, error) {
return func(ctx context.Context, network, address string) (net.Conn, error) {
return dialBackOffHelper(ctx, network, address, backoffConfig, sleepTO)
return dialBackOffHelper(ctx, network, address, backoffConfig, nil)
}
}

func dialBackOffHelper(ctx context.Context, network, address string, bo wait.Backoff, sleep time.Duration) (net.Conn, error) {
// DialTLSWithBackOff is same with DialWithBackOff but takes tls config.
var DialTLSWithBackOff = NewTLSBackoffDialer(backOffTemplate)

// NewTLSBackoffDialer is same with NewBackoffDialer but takes tls config.
func NewTLSBackoffDialer(backoffConfig wait.Backoff) func(context.Context, string, string, *tls.Config) (net.Conn, error) {
return func(ctx context.Context, network, address string, tlsConf *tls.Config) (net.Conn, error) {
return dialBackOffHelper(ctx, network, address, backoffConfig, tlsConf)
}
}

func dialBackOffHelper(ctx context.Context, network, address string, bo wait.Backoff, tlsConf *tls.Config) (net.Conn, error) {
dialer := &net.Dialer{
Timeout: bo.Duration, // Initial duration.
KeepAlive: 5 * time.Second,
DualStack: true,
}
start := time.Now()
for {
c, err := dialer.DialContext(ctx, network, address)
var (
c net.Conn
err error
)
if tlsConf == nil {
c, err = dialer.DialContext(ctx, network, address)
} else {
c, err = tls.DialWithDialer(dialer, network, address, tlsConf)
}
if err != nil {
var errNet net.Error
if errors.As(err, &errNet) && errNet.Timeout() {
Expand Down Expand Up @@ -105,6 +124,19 @@ func newHTTPTransport(disableKeepAlives, disableCompression bool, maxIdle, maxId
return transport
}

func newHTTPSTransport(disableKeepAlives, disableCompression bool, maxIdle, maxIdlePerHost int, tlsConf *tls.Config) 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.TLSClientConfig = tlsConf
return transport
}

// NewProberTransport creates a RoundTripper that is useful for probing,
// since it will not cache connections.
func NewProberTransport() http.RoundTripper {
Expand All @@ -113,6 +145,13 @@ 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 {
return newAutoTransport(
newHTTPSTransport(false /*disable keep-alives*/, true /*disable auto-compression*/, maxIdle, maxIdlePerHost, tlsConf),
newH2Transport(true /*disable auto-compression*/, tlsConf))
}

// NewAutoTransport creates a RoundTripper that can use appropriate transport
// based on the request's HTTP version.
func NewAutoTransport(maxIdle, maxIdlePerHost int) http.RoundTripper {
Expand Down
10 changes: 5 additions & 5 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ k8s.io/utils/internal/third_party/forked/golang/net
k8s.io/utils/net
k8s.io/utils/pointer
k8s.io/utils/trace
# knative.dev/eventing v0.30.1-0.20220411014035-bb76b30d7cbc
# knative.dev/eventing v0.30.1-0.20220411142907-e874b89d6d56
## explicit
knative.dev/eventing/pkg/apis/config
knative.dev/eventing/pkg/apis/duck
Expand Down Expand Up @@ -1298,7 +1298,7 @@ knative.dev/eventing/test/upgrade/prober/wathola/fetcher
knative.dev/eventing/test/upgrade/prober/wathola/forwarder
knative.dev/eventing/test/upgrade/prober/wathola/receiver
knative.dev/eventing/test/upgrade/prober/wathola/sender
# knative.dev/eventing-kafka v0.30.1-0.20220411014620-2d621fa05a48
# knative.dev/eventing-kafka v0.30.1-0.20220411133507-bdbcc864cf94
## explicit
knative.dev/eventing-kafka/pkg/apis/bindings
knative.dev/eventing-kafka/pkg/apis/bindings/v1beta1
Expand Down Expand Up @@ -1362,11 +1362,11 @@ knative.dev/eventing-kafka/test/rekt/resources/resetoffset
knative.dev/eventing-kafka/test/upgrade
knative.dev/eventing-kafka/test/upgrade/continual
knative.dev/eventing-kafka/test/upgrade/installation
# knative.dev/hack v0.0.0-20220411013954-02c525c25eb7
# knative.dev/hack v0.0.0-20220411131823-6ffd8417de7c
## explicit
knative.dev/hack
knative.dev/hack/shell
# knative.dev/pkg v0.0.0-20220411013750-e2b4d748e59f
# knative.dev/pkg v0.0.0-20220411234407-00c122e376d0
## explicit
knative.dev/pkg/apiextensions/storageversion
knative.dev/pkg/apiextensions/storageversion/cmd/migrate
Expand Down Expand Up @@ -1469,7 +1469,7 @@ knative.dev/pkg/webhook/json
knative.dev/pkg/webhook/resourcesemantics
knative.dev/pkg/webhook/resourcesemantics/defaulting
knative.dev/pkg/webhook/resourcesemantics/validation
# knative.dev/reconciler-test v0.0.0-20220411014048-490effc323f3
# knative.dev/reconciler-test v0.0.0-20220411142808-55eab02440e9
## explicit
knative.dev/reconciler-test/cmd/eventshub
knative.dev/reconciler-test/pkg/environment
Expand Down

0 comments on commit 9714d76

Please sign in to comment.