Skip to content

Commit

Permalink
upgrade to latest dependencies (#207)
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Moore (via Sockpuppet) <mattmoor@vmware.com>
  • Loading branch information
mattmoor authored Sep 23, 2020
1 parent 0312098 commit 366952e
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 37 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ require (
k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
k8s.io/kubernetes v1.14.7
k8s.io/utils v0.0.0-20200603063816-c1c6865ac451
knative.dev/eventing v0.17.1-0.20200922073637-bfa066dc34b4
knative.dev/pkg v0.0.0-20200920210445-c46a18644992
knative.dev/test-infra v0.0.0-20200921012245-37f1a12adbd3
knative.dev/eventing v0.17.1-0.20200923112940-5741e8f987a1
knative.dev/pkg v0.0.0-20200921223636-6a12c7596267
knative.dev/test-infra v0.0.0-20200923011439-4ef663a0aa96
)

replace (
Expand Down
11 changes: 6 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1897,8 +1897,8 @@ k8s.io/utils v0.0.0-20200603063816-c1c6865ac451 h1:v8ud2Up6QK1lNOKFgiIVrZdMg7Mpm
k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
knative.dev/caching v0.0.0-20190719140829-2032732871ff/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg=
knative.dev/caching v0.0.0-20200116200605-67bca2c83dfa/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg=
knative.dev/eventing v0.17.1-0.20200922073637-bfa066dc34b4 h1:vaAaNXwkJJdH3ST12/FHHeOASP/gNLyky3XKLP5uN2g=
knative.dev/eventing v0.17.1-0.20200922073637-bfa066dc34b4/go.mod h1:4asnf9MTnRAPDUjuYrN9/R8tIpVUV3UpbtUMtrV+iDc=
knative.dev/eventing v0.17.1-0.20200923112940-5741e8f987a1 h1:ZZdBweyjI97oODZvuYqBhLrpYFxVNL1ZW2J4Kth12uY=
knative.dev/eventing v0.17.1-0.20200923112940-5741e8f987a1/go.mod h1:5WylXx2ZK+OI7Yb2vQ5uOUlODyd99GEKkWGKQOSvofY=
knative.dev/eventing-contrib v0.6.1-0.20190723221543-5ce18048c08b/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
knative.dev/eventing-contrib v0.11.2/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
knative.dev/pkg v0.0.0-20191101194912-56c2594e4f11/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
Expand All @@ -1909,16 +1909,17 @@ knative.dev/pkg v0.0.0-20200505191044-3da93ebb24c2/go.mod h1:Q6sL35DdGs8hIQZKdaC
knative.dev/pkg v0.0.0-20200515002500-16d7b963416f/go.mod h1:tMOHGbxtRz8zYFGEGpV/bpoTEM1o89MwYFC4YJXl3GY=
knative.dev/pkg v0.0.0-20200528142800-1c6815d7e4c9/go.mod h1:QgNZTxnwpB/oSpNcfnLVlw+WpEwwyKAvJlvR3hgeltA=
knative.dev/pkg v0.0.0-20200711004937-22502028e31a/go.mod h1:AqAJV6rYi8IGikDjJ/9ZQd9qKdkXVlesVnVjwx62YB8=
knative.dev/pkg v0.0.0-20200920210445-c46a18644992 h1:A/xDwv4/smT0WyaGfP5FD/6izpAERnHqcRHTfGUEDGE=
knative.dev/pkg v0.0.0-20200920210445-c46a18644992/go.mod h1:+plpr2nnFJ+uZ6SX/cfFFsghv92+OCJ9e+PmwTHeDaY=
knative.dev/pkg v0.0.0-20200921223636-6a12c7596267 h1:eq70UDf0nZe/FC9bEDTq3ENrL97/y+YmlYCGx6QVLo8=
knative.dev/pkg v0.0.0-20200921223636-6a12c7596267/go.mod h1:MCyt5KqLaai6ENUitOgRAQsu7Gw7cAIIiXQ2IS+O0NI=
knative.dev/test-infra v0.0.0-20200407185800-1b88cb3b45a5/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ=
knative.dev/test-infra v0.0.0-20200505052144-5ea2f705bb55/go.mod h1:WqF1Azka+FxPZ20keR2zCNtiQA1MP9ZB4BH4HuI+SIU=
knative.dev/test-infra v0.0.0-20200513011557-d03429a76034/go.mod h1:aMif0KXL4g19YCYwsy4Ocjjz5xgPlseYV+B95Oo4JGE=
knative.dev/test-infra v0.0.0-20200519015156-82551620b0a9/go.mod h1:A5b2OAXTOeHT3hHhVQm3dmtbuWvIDP7qzgtqxA3/2pE=
knative.dev/test-infra v0.0.0-20200707183444-aed09e56ddc7/go.mod h1:RjYAhXnZqeHw9+B0zsbqSPlae0lCvjekO/nw5ZMpLCs=
knative.dev/test-infra v0.0.0-20200918021244-22269d552166/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc=
knative.dev/test-infra v0.0.0-20200921012245-37f1a12adbd3 h1:abacWewpeP9QUByQAunuOA8F9hQ6Ryr2P63r38ns5sA=
knative.dev/test-infra v0.0.0-20200921012245-37f1a12adbd3/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc=
knative.dev/test-infra v0.0.0-20200923011439-4ef663a0aa96 h1:4+eWI9GEPxbCTHkGXnO66nmzxwNQ9LvrkIF8urXZKUE=
knative.dev/test-infra v0.0.0-20200923011439-4ef663a0aa96/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc=
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc=
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4=
mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ func (l *Listers) GetK8sServiceLister() corev1listers.ServiceLister {
return corev1listers.NewServiceLister(l.indexerFor(&corev1.Service{}))
}

func (l *Listers) GetSecretLister() corev1listers.SecretLister {
return corev1listers.NewSecretLister(l.indexerFor(&corev1.Secret{}))
}

func (l *Listers) GetNamespaceLister() corev1listers.NamespaceLister {
return corev1listers.NewNamespaceLister(l.indexerFor(&corev1.Namespace{}))
}
Expand Down
27 changes: 17 additions & 10 deletions vendor/knative.dev/pkg/metrics/resource_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,7 @@ func RegisterResourceView(views ...*view.View) error {
defer resourceViews.lock.Unlock()
for _, meter := range allMeters.meters {
// make a copy of views to avoid data races
viewCopy := make([]*view.View, 0, len(views))
for _, v := range views {
c := *v
viewCopy = append(viewCopy, &c)
}
viewCopy := copyViews(views)
if e := meter.m.Register(viewCopy...); e != nil {
err = e
}
Expand Down Expand Up @@ -213,11 +209,7 @@ func meterExporterForResource(r *resource.Resource) *meterExporter {
resourceViews.lock.Lock()
defer resourceViews.lock.Unlock()
// make a copy of views to avoid data races
viewsCopy := make([]*view.View, 0, len(resourceViews.views))
for _, v := range resourceViews.views {
c := *v
viewsCopy = append(viewsCopy, &c)
}
viewsCopy := copyViews(resourceViews.views)
mE.m.Register(viewsCopy...)
mE.o = stats.WithRecorder(mE.m)
allMeters.meters[key] = mE
Expand Down Expand Up @@ -295,6 +287,21 @@ func resourceFromKey(s string) *resource.Resource {
return r
}

func copyViews(views []*view.View) []*view.View {
viewsCopy := make([]*view.View, 0, len(resourceViews.views))
for _, v := range views {
c := *v
c.TagKeys = make([]tag.Key, len(v.TagKeys))
copy(c.TagKeys, v.TagKeys)
agg := *v.Aggregation
c.Aggregation = &agg
c.Aggregation.Buckets = make([]float64, len(v.Aggregation.Buckets))
copy(c.Aggregation.Buckets, v.Aggregation.Buckets)
viewsCopy = append(viewsCopy, &c)
}
return viewsCopy
}

// defaultMeterImpl is a pass-through to the default worker in OpenCensus.
type defaultMeterImpl struct{}

Expand Down
20 changes: 7 additions & 13 deletions vendor/knative.dev/pkg/network/transports.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,13 @@ func dialBackOffHelper(ctx context.Context, network, address string, bo wait.Bac
}

func newHTTPTransport(disableKeepAlives bool, maxIdle, maxIdlePerHost int) http.RoundTripper {
return &http.Transport{
// Those match net/http/transport.go
Proxy: http.ProxyFromEnvironment,
IdleConnTimeout: 90 * time.Second,
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
DisableKeepAlives: disableKeepAlives,

// Those are bespoke.
DialContext: DialWithBackOff,
MaxIdleConns: maxIdle,
MaxIdleConnsPerHost: maxIdlePerHost,
}
transport := http.DefaultTransport.(*http.Transport).Clone()
transport.DialContext = DialWithBackOff
transport.DisableKeepAlives = disableKeepAlives
transport.MaxIdleConns = maxIdle
transport.MaxIdleConnsPerHost = maxIdlePerHost
transport.ForceAttemptHTTP2 = false
return transport
}

// NewProberTransport creates a RoundTripper that is useful for probing,
Expand Down
3 changes: 0 additions & 3 deletions vendor/knative.dev/pkg/webhook/stats_reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ var (
resourceGroupKey = tag.MustNewKey("resource_group")
resourceVersionKey = tag.MustNewKey("resource_version")
resourceResourceKey = tag.MustNewKey("resource_resource")
resourceNameKey = tag.MustNewKey("resource_name")
resourceNamespaceKey = tag.MustNewKey("resource_namespace")
admissionAllowedKey = tag.MustNewKey("admission_allowed")
)
Expand Down Expand Up @@ -93,7 +92,6 @@ func (r *reporter) ReportRequest(req *admissionv1.AdmissionRequest, resp *admiss
tag.Insert(resourceGroupKey, req.Resource.Group),
tag.Insert(resourceVersionKey, req.Resource.Version),
tag.Insert(resourceResourceKey, req.Resource.Resource),
tag.Insert(resourceNameKey, req.Name),
tag.Insert(resourceNamespaceKey, req.Namespace),
tag.Insert(admissionAllowedKey, strconv.FormatBool(resp.Allowed)),
)
Expand All @@ -117,7 +115,6 @@ func RegisterMetrics() {
resourceVersionKey,
resourceResourceKey,
resourceNamespaceKey,
resourceNameKey,
admissionAllowedKey}

if err := view.Register(
Expand Down
6 changes: 3 additions & 3 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ k8s.io/utils/buffer
k8s.io/utils/integer
k8s.io/utils/pointer
k8s.io/utils/trace
# knative.dev/eventing v0.17.1-0.20200922073637-bfa066dc34b4
# knative.dev/eventing v0.17.1-0.20200923112940-5741e8f987a1
## explicit
knative.dev/eventing/pkg/apis/config
knative.dev/eventing/pkg/apis/configs
Expand Down Expand Up @@ -1160,7 +1160,7 @@ knative.dev/eventing/test/test_images/recordevents
knative.dev/eventing/test/test_images/request-sender
knative.dev/eventing/test/test_images/sequencestepper
knative.dev/eventing/test/test_images/transformevents
# knative.dev/pkg v0.0.0-20200920210445-c46a18644992
# knative.dev/pkg v0.0.0-20200921223636-6a12c7596267
## explicit
knative.dev/pkg/apis
knative.dev/pkg/apis/duck
Expand Down Expand Up @@ -1243,7 +1243,7 @@ knative.dev/pkg/webhook/certificates/resources
knative.dev/pkg/webhook/resourcesemantics
knative.dev/pkg/webhook/resourcesemantics/defaulting
knative.dev/pkg/webhook/resourcesemantics/validation
# knative.dev/test-infra v0.0.0-20200921012245-37f1a12adbd3
# knative.dev/test-infra v0.0.0-20200923011439-4ef663a0aa96
## explicit
knative.dev/test-infra/scripts
# sigs.k8s.io/structured-merge-diff/v3 v3.0.1-0.20200706213357-43c19bbb7fba
Expand Down

0 comments on commit 366952e

Please sign in to comment.