Skip to content

Commit

Permalink
upgrade to latest dependencies
Browse files Browse the repository at this point in the history
bumping knative.dev/eventing cc3d254...193f2df:%0A  > 193f2df Eventing TLS: support `K_CA_CERTS` in adapter/v2 (# 6848)

Signed-off-by: Knative Automation <automation@knative.team>
  • Loading branch information
knative-automation committed Apr 19, 2023
1 parent 5b3037f commit ae15602
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ require (
github.com/davecgh/go-spew v1.1.1
github.com/google/gofuzz v1.2.0
github.com/kedacore/keda/v2 v2.8.1
knative.dev/eventing v0.36.1-0.20230418085055-cc3d254d555c
knative.dev/eventing v0.36.1-0.20230418180955-193f2dffd536
knative.dev/hack v0.0.0-20230417170854-f591fea109b3
knative.dev/pkg v0.0.0-20230418073056-dfad48eaa5d0
knative.dev/reconciler-test v0.0.0-20230418082056-9fbd79e5dbe1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1518,8 +1518,8 @@ k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 h1:GfD9OzL11kvZN5iArC6oTS7RTj7oJOIfnislxYlqTj8=
k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/eventing v0.36.1-0.20230418085055-cc3d254d555c h1:9XRvapQa0EA2Gu92v3JMsW0eiF2ZTEBPx5wvBCDKcHw=
knative.dev/eventing v0.36.1-0.20230418085055-cc3d254d555c/go.mod h1:LxPAmS/FakpbFZvC4kkBuV6QSL5EyhwQYV62XLQQaQw=
knative.dev/eventing v0.36.1-0.20230418180955-193f2dffd536 h1:HCvZKARYpR/4BNKVY5fCDxsKqCNH13BXTFR0mbAcD6Q=
knative.dev/eventing v0.36.1-0.20230418180955-193f2dffd536/go.mod h1:v5MzGGi/TfApMkYaRssEo2b5AOPlyzQV6a+H8169408=
knative.dev/hack v0.0.0-20230417170854-f591fea109b3 h1:+W4WBOq83tfGXKhtv8OB/uJeYqze3zh69GKiz1ucuqk=
knative.dev/hack v0.0.0-20230417170854-f591fea109b3/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/pkg v0.0.0-20230418073056-dfad48eaa5d0 h1:EFQcoUo8I4bc+U3y6tR1B3ONYZSHWUdAfI7Vh7dae8g=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package kncloudevents

import (
"context"
"crypto/tls"
"fmt"
"net"
"net/http"
Expand Down Expand Up @@ -78,6 +79,17 @@ func WithDrainQuietPeriod(duration time.Duration) HTTPMessageReceiverOption {
}
}

// WithTLSConfig configures the TLS config for the receiver.
func WithTLSConfig(cfg *tls.Config) HTTPMessageReceiverOption {
return func(h *HTTPMessageReceiver) {
if h.server == nil {
h.server = newServer()
}

h.server.TLSConfig = cfg
}
}

// WithWriteTimeout sets the HTTP server's WriteTimeout. It covers the time between end of reading
// Request Header to end of writing response.
func WithWriteTimeout(duration time.Duration) HTTPMessageReceiverOption {
Expand Down Expand Up @@ -123,7 +135,11 @@ func (recv *HTTPMessageReceiver) StartListen(ctx context.Context, handler http.H
errChan := make(chan error, 1)
go func() {
close(recv.Ready)
errChan <- recv.server.Serve(recv.listener)
if recv.server.TLSConfig == nil {
errChan <- recv.server.Serve(recv.listener)
} else {
errChan <- recv.server.ServeTLS(recv.listener, "", "")
}
}()

// wait for the server to return or ctx.Done().
Expand Down
4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1221,8 +1221,8 @@ k8s.io/utils/net
k8s.io/utils/pointer
k8s.io/utils/strings/slices
k8s.io/utils/trace
# knative.dev/eventing v0.36.1-0.20230418085055-cc3d254d555c
## explicit; go 1.18
# knative.dev/eventing v0.36.1-0.20230418180955-193f2dffd536
## explicit; go 1.19
knative.dev/eventing/cmd/event_display
knative.dev/eventing/cmd/heartbeats
knative.dev/eventing/pkg/apis/config
Expand Down

0 comments on commit ae15602

Please sign in to comment.