Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Commit

Permalink
[0.26] Embed Kn Plugin Event at ffdcc78 (#920)
Browse files Browse the repository at this point in the history
  • Loading branch information
cardil authored Jan 4, 2022
1 parent 44a91d7 commit 9fb3b22
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 22 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
k8s.io/code-generator v0.21.4
knative.dev/eventing v0.26.1
knative.dev/hack v0.0.0-20210806075220-815cd312d65c
knative.dev/kn-plugin-event v0.26.0
knative.dev/kn-plugin-event v0.26.1
knative.dev/kn-plugin-func v0.20.0
knative.dev/kn-plugin-source-kafka v0.26.0
knative.dev/networking v0.0.0-20210916065741-5e884aff221e
Expand All @@ -29,6 +29,6 @@ require (

replace (
k8s.io/apimachinery => k8s.io/apimachinery v0.21.4
knative.dev/kn-plugin-event => github.com/openshift-knative/kn-plugin-event v0.26.2-0.20211209202740-89c860ca5062
knative.dev/kn-plugin-event => github.com/openshift-knative/kn-plugin-event v0.26.2-0.20211223134650-ffdcc78926e6
knative.dev/kn-plugin-func => github.com/openshift-knative/kn-plugin-func v0.20.0
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1154,8 +1154,8 @@ github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqi
github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo=
github.com/opencontainers/selinux v1.8.2 h1:c4ca10UMgRcvZ6h0K4HtS15UaVSBEaE+iln2LVpAuGc=
github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8=
github.com/openshift-knative/kn-plugin-event v0.26.2-0.20211209202740-89c860ca5062 h1:SolI+Rwqy058Dofm6naxk9y3vzQ4anT69UQWKoB0zHI=
github.com/openshift-knative/kn-plugin-event v0.26.2-0.20211209202740-89c860ca5062/go.mod h1:naLIG+DrwI78CKuuuJB8C0D1X/ySUzolzmgctV4+vZQ=
github.com/openshift-knative/kn-plugin-event v0.26.2-0.20211223134650-ffdcc78926e6 h1:zbhWpDoG+cqkzsKOuhwkgqYR9h2qQcAot53uhFT4wh4=
github.com/openshift-knative/kn-plugin-event v0.26.2-0.20211223134650-ffdcc78926e6/go.mod h1:naLIG+DrwI78CKuuuJB8C0D1X/ySUzolzmgctV4+vZQ=
github.com/openshift-knative/kn-plugin-func v0.20.0 h1:aAsgqZpDMALMl8McJB2nUMj/sCuYHhbcTvg8fLZlTfQ=
github.com/openshift-knative/kn-plugin-func v0.20.0/go.mod h1:1PbnyT3BJ3dvxDuMQk5ej0gHG+uy/ryH6AS71LhJf1k=
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 @@ -1327,7 +1327,7 @@ knative.dev/eventing-kafka/pkg/common/constants
# knative.dev/hack v0.0.0-20210806075220-815cd312d65c
## explicit
knative.dev/hack
# knative.dev/kn-plugin-event v0.26.0 => github.com/openshift-knative/kn-plugin-event v0.26.2-0.20211209202740-89c860ca5062
# knative.dev/kn-plugin-event v0.26.1 => github.com/openshift-knative/kn-plugin-event v0.26.2-0.20211223134650-ffdcc78926e6
## explicit
knative.dev/kn-plugin-event/internal/cli/cmd
knative.dev/kn-plugin-event/pkg/cli
Expand Down Expand Up @@ -1538,5 +1538,5 @@ sigs.k8s.io/structured-merge-diff/v4/value
## explicit
sigs.k8s.io/yaml
# k8s.io/apimachinery => k8s.io/apimachinery v0.21.4
# knative.dev/kn-plugin-event => github.com/openshift-knative/kn-plugin-event v0.26.2-0.20211209202740-89c860ca5062
# knative.dev/kn-plugin-event => github.com/openshift-knative/kn-plugin-event v0.26.2-0.20211223134650-ffdcc78926e6
# knative.dev/kn-plugin-func => github.com/openshift-knative/kn-plugin-func v0.20.0

0 comments on commit 9fb3b22

Please sign in to comment.