Skip to content

Commit

Permalink
[release-v1.1.0] Update kn-plugin-event (knative#1024)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsimansk authored Apr 13, 2022
1 parent 7832803 commit 2651644
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 21 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ replace (
k8s.io/code-generator => k8s.io/code-generator v0.21.4

// Inlined plugins
knative.dev/kn-plugin-event => github.com/openshift-knative/kn-plugin-event v0.27.1-0.20220331134246-2c22e325c977
knative.dev/kn-plugin-event => github.com/openshift-knative/kn-plugin-event v0.27.1-0.20220412125940-01b7cf265a69
knative.dev/kn-plugin-func => github.com/openshift-knative/kn-plugin-func v1.1.3-0.20220413141425-a3b388f3a2d8
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2119,8 +2119,8 @@ github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3
github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8=
github.com/opencontainers/selinux v1.10.0 h1:rAiKF8hTcgLI3w0DHm6i0ylVVcOrlgR1kK99DRLDhyU=
github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI=
github.com/openshift-knative/kn-plugin-event v0.27.1-0.20220331134246-2c22e325c977 h1:G/bBqKfxZdddNCn2TmtUsIYoJkqnugAvyLaEnWlKYRM=
github.com/openshift-knative/kn-plugin-event v0.27.1-0.20220331134246-2c22e325c977/go.mod h1:We6ISNJGglXUFJaY06o/9ZyFOESVJMw+WifpRqTOnXc=
github.com/openshift-knative/kn-plugin-event v0.27.1-0.20220412125940-01b7cf265a69 h1:122tH4tHwjx+YLdUQW9n3xhLCZvcRA+5VJhg2yWHWPA=
github.com/openshift-knative/kn-plugin-event v0.27.1-0.20220412125940-01b7cf265a69/go.mod h1:We6ISNJGglXUFJaY06o/9ZyFOESVJMw+WifpRqTOnXc=
github.com/openshift-knative/kn-plugin-func v1.1.3-0.20220413141425-a3b388f3a2d8 h1:brTiR2qD8lxt/eaxANpED9DZfuZ/Ccbxc6JqmKAAZvE=
github.com/openshift-knative/kn-plugin-func v1.1.3-0.20220413141425-a3b388f3a2d8/go.mod h1:DrRHVdD9Zj7hleSrzSYz01KjNijG+xVbjqOsrkA8v0M=
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
Expand Down
5 changes: 0 additions & 5 deletions vendor/knative.dev/kn-plugin-event/pkg/cli/ics/constants.go

This file was deleted.

13 changes: 2 additions & 11 deletions vendor/knative.dev/kn-plugin-event/pkg/sender/in_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package sender

import (
"fmt"
"regexp"

cloudevents "github.com/cloudevents/sdk-go/v2"
batchv1 "k8s.io/api/batch/v1"
Expand All @@ -11,6 +10,7 @@ import (
"knative.dev/kn-plugin-event/pkg/cli/ics"
"knative.dev/kn-plugin-event/pkg/event"
"knative.dev/kn-plugin-event/pkg/k8s"
"knative.dev/kn-plugin-event/pkg/metadata"
)

type inClusterSender struct {
Expand Down Expand Up @@ -44,7 +44,7 @@ func (i *inClusterSender) Send(ce cloudevents.Event) error {
RestartPolicy: corev1.RestartPolicyNever,
Containers: []corev1.Container{{
Name: "kn-event-sender",
Image: imageFor("kn-event-sender"),
Image: metadata.ResolveImage(),
Env: []corev1.EnvVar{{
Name: "K_SINK",
Value: url.String(),
Expand All @@ -63,12 +63,3 @@ func (i *inClusterSender) Send(ce cloudevents.Event) error {
}
return nil
}

func imageFor(artifact string) string {
basename := ics.ContainerBasename
r := regexp.MustCompile(".+[A-Za-z0-9]$")
if r.MatchString(basename) {
basename += "/"
}
return basename + artifact
}
4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1585,7 +1585,7 @@ knative.dev/eventing-kafka/pkg/common/constants
# knative.dev/hack v0.0.0-20220128200847-51a42b2eb63e
## explicit
knative.dev/hack
# knative.dev/kn-plugin-event v1.1.1 => github.com/openshift-knative/kn-plugin-event v0.27.1-0.20220331134246-2c22e325c977
# knative.dev/kn-plugin-event v1.1.1 => github.com/openshift-knative/kn-plugin-event v0.27.1-0.20220412125940-01b7cf265a69
## explicit
knative.dev/kn-plugin-event/internal/cli/cmd
knative.dev/kn-plugin-event/pkg/cli
Expand Down Expand Up @@ -1830,5 +1830,5 @@ sigs.k8s.io/yaml
# k8s.io/apimachinery => k8s.io/apimachinery v0.21.4
# k8s.io/client-go => k8s.io/client-go v0.21.4
# k8s.io/code-generator => k8s.io/code-generator v0.21.4
# knative.dev/kn-plugin-event => github.com/openshift-knative/kn-plugin-event v0.27.1-0.20220331134246-2c22e325c977
# knative.dev/kn-plugin-event => github.com/openshift-knative/kn-plugin-event v0.27.1-0.20220412125940-01b7cf265a69
# knative.dev/kn-plugin-func => github.com/openshift-knative/kn-plugin-func v1.1.3-0.20220413141425-a3b388f3a2d8

0 comments on commit 2651644

Please sign in to comment.