diff --git a/go.mod b/go.mod index 93229ece21..887c5366f0 100644 --- a/go.mod +++ b/go.mod @@ -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 @@ -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 ) diff --git a/go.sum b/go.sum index f1d72dbcfb..d660e54e0c 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/vendor/knative.dev/kn-plugin-event/pkg/cli/ics/constants.go b/vendor/knative.dev/kn-plugin-event/pkg/cli/ics/constants.go deleted file mode 100644 index 2daec77e7e..0000000000 --- a/vendor/knative.dev/kn-plugin-event/pkg/cli/ics/constants.go +++ /dev/null @@ -1,5 +0,0 @@ -package ics - -// ContainerBasename holds a OCI container base name. -// TODO: set value from .env file during the build. -var ContainerBasename = "quay.io/cardil" //nolint:gochecknoglobals diff --git a/vendor/knative.dev/kn-plugin-event/pkg/sender/in_cluster.go b/vendor/knative.dev/kn-plugin-event/pkg/sender/in_cluster.go index 811dff44f8..3647da0325 100644 --- a/vendor/knative.dev/kn-plugin-event/pkg/sender/in_cluster.go +++ b/vendor/knative.dev/kn-plugin-event/pkg/sender/in_cluster.go @@ -2,7 +2,6 @@ package sender import ( "fmt" - "regexp" cloudevents "github.com/cloudevents/sdk-go/v2" batchv1 "k8s.io/api/batch/v1" @@ -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 { @@ -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(), @@ -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 -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 9b432d0d03..acd0a1caf7 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -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 @@ -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