Skip to content

Commit

Permalink
upgrade to latest dependencies
Browse files Browse the repository at this point in the history
bumping knative.dev/reconciler-test ca17404...70df278:
  > 70df278 Knative Service forwarder for EventsHub (# 517) (# 566)
  > 7f95e17 eventshub RBAC resources independent to avoid deletion conflicts (# 538) (# 565)
  > 288a740 Fix unit tests (# 556)

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation committed Aug 3, 2023
1 parent 1b3281e commit 2fa5d33
Show file tree
Hide file tree
Showing 18 changed files with 443 additions and 35 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ require (
knative.dev/hack v0.0.0-20230417170854-f591fea109b3
knative.dev/hack/schema v0.0.0-20230417170854-f591fea109b3
knative.dev/pkg v0.0.0-20230418073056-dfad48eaa5d0
knative.dev/reconciler-test v0.0.0-20230728072509-ca174046aede
knative.dev/reconciler-test v0.0.0-20230803113521-70df278b667d
sigs.k8s.io/yaml v1.3.0
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1049,8 +1049,8 @@ knative.dev/hack/schema v0.0.0-20230417170854-f591fea109b3 h1:TUHxKhNDLCX/XaqNaX
knative.dev/hack/schema v0.0.0-20230417170854-f591fea109b3/go.mod h1:GeIb+PLd5mllawcpHEGF5J5fYTQrvgEO5liao8lUKUs=
knative.dev/pkg v0.0.0-20230418073056-dfad48eaa5d0 h1:EFQcoUo8I4bc+U3y6tR1B3ONYZSHWUdAfI7Vh7dae8g=
knative.dev/pkg v0.0.0-20230418073056-dfad48eaa5d0/go.mod h1:2qWPP9Gjh9Q7ETti+WRHnBnGCSCq+6q7m3p/nmUQviE=
knative.dev/reconciler-test v0.0.0-20230728072509-ca174046aede h1:m+oZ4iW4V2ILrTkkq1wxQYfyiiM5SopYedw8R1lm/iU=
knative.dev/reconciler-test v0.0.0-20230728072509-ca174046aede/go.mod h1:By7fsbkjKWbTmxwAs9lL1itxZI1otbhiEsAZmprEtvI=
knative.dev/reconciler-test v0.0.0-20230803113521-70df278b667d h1:cGtTbth6UZJuH8JAvE1KHQltNXVApxMNFCcnlRgnJKc=
knative.dev/reconciler-test v0.0.0-20230803113521-70df278b667d/go.mod h1:By7fsbkjKWbTmxwAs9lL1itxZI1otbhiEsAZmprEtvI=
pgregory.net/rapid v0.3.3 h1:jCjBsY4ln4Atz78QoBWxUEvAHaFyNDQg9+WU62aCn1U=
pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
Expand Down
6 changes: 6 additions & 0 deletions vendor/knative.dev/reconciler-test/cmd/eventshub/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"context"

"knative.dev/pkg/logging"
"knative.dev/reconciler-test/pkg/eventshub/forwarder"

"knative.dev/reconciler-test/pkg/eventshub"
"knative.dev/reconciler-test/pkg/eventshub/logger_vent"
Expand All @@ -45,6 +46,11 @@ func main() {
eventshub.SenderEventGenerator: func(ctx context.Context, logs *eventshub.EventLogs) error {
return sender.Start(ctx, logs, eventshub.WithClientTracing)
},
eventshub.ForwarderEventGenerator: func(ctx context.Context, logs *eventshub.EventLogs) error {
return forwarder.NewFromEnv(ctx, logs,
[]eventshub.HandlerFunc{eventshub.WithServerTracing},
[]eventshub.ClientOption{eventshub.WithClientTracing}).Start(ctx)
},
},
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .name }}
name: {{ .serviceName }}
namespace: {{ .namespace }}
spec:
selector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ metadata:
{{ end }}
{{ end }}
spec:
serviceAccountName: "{{ .namespace }}"
serviceAccountName: "{{ .name }}"
restartPolicy: "OnFailure"
{{ if .podSecurityContext }}
securityContext:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Copyright 2023 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: {{ .name }}
namespace: {{ .namespace }}
{{ if .annotations }}
annotations:
{{ range $key, $value := .annotations }}
{{ $key }}: "{{ $value }}"
{{ end }}
{{ end }}
spec:
template:
{{ if .podannotations }}
annotations:
{{ range $key, $value := .podannotations }}
{{ $key }}: "{{ $value }}"
{{ end }}
{{ end }}
spec:
serviceAccountName: "{{ .namespace }}"
containers:
- name: eventshub-forwarder
image: {{ .image }}
imagePullPolicy: "IfNotPresent"
env:
- name: "NAME"
value: {{ .name }}
- name: "NAMESPACE"
value: {{ .namespace }}
- name: "SINK"
value: {{ .sink }}
{{ range $key, $value := .envs }}
- name: {{printf "%q" $key}}
value: {{printf "%q" $value}}
{{ end }}
5 changes: 3 additions & 2 deletions vendor/knative.dev/reconciler-test/pkg/eventshub/event_log.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ func (e *EventLogs) Vent(observed EventInfo) error {
}

const (
ReceiverEventGenerator string = "receiver"
SenderEventGenerator string = "sender"
ReceiverEventGenerator string = "receiver"
SenderEventGenerator string = "sender"
ForwarderEventGenerator string = "forwarder"

RecorderEventLog string = "recorder"
LoggerEventLog string = "logger"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func ImageFromContext(ctx context.Context) string {
if e, ok := ctx.Value(eventshubImageKey{}).(string); ok {
return e
}
return "ko://" + cmdPackage()
return "ko://" + eventshubPackage()
}

// WithCustomImage allows you to specify a custom eventshub image to be used when invoking eventshub.Install
Expand All @@ -48,7 +48,7 @@ func registerImage(ctx context.Context) error {
return err
}

func cmdPackage() string {
func eventshubPackage() string {
this := reflect.TypeOf(eventshubImageKey{}).PkgPath()
root := path.Dir(path.Dir(this))
return path.Join(root, "cmd", "eventshub")
Expand Down
Loading

0 comments on commit 2fa5d33

Please sign in to comment.