Skip to content

Commit

Permalink
Add set of supported plugins (#523)
Browse files Browse the repository at this point in the history
* Add kn-plugin-source-kafka

* Add kn-plugin-event

* Add kn-plugin-func
  • Loading branch information
dsimansk authored Nov 13, 2024
1 parent 9f73ee4 commit 0b23c43
Show file tree
Hide file tree
Showing 4,949 changed files with 954,411 additions and 5,514 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
241 changes: 204 additions & 37 deletions go.mod

Large diffs are not rendered by default.

2,094 changes: 2,015 additions & 79 deletions go.sum

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions hack/build.sh.d/func.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

# There no midstream image currently, fallback to upstream one.
readonly func_util_image="${KN_PLUGIN_FUNC_UTIL_IMAGE:-ghcr.io/knative/func-utils:latest}"
readonly default_node_builder_image="${DEFAULT_NODE_BUILDER_IMAGE:-registry.access.redhat.com/ubi8/nodejs-20-minimal}"
readonly default_quarkus_builder_image="${DEFAULT_QUARKUS_BUILDER_IMAGE:-registry.access.redhat.com/ubi8/openjdk-21}"
readonly default_python_builder_image="${DEFAULT_PYTHON_BUILDER_IMAGE:-registry.access.redhat.com/ubi8/python-39}"

export EXTERNAL_LD_FLAGS="${EXTERNAL_LD_FLAGS:-} \
-X knative.dev/func/pkg/k8s.SocatImage=${func_util_image} \
-X knative.dev/func/pkg/k8s.TarImage=${func_util_image} \
-X knative.dev/func/pkg/pipelines/tekton.FuncUtilImage=${func_util_image}
-X knative.dev/func/pkg/builders/s2i.DefaultNodeBuilder=${default_node_builder_image} \
-X knative.dev/func/pkg/builders/s2i.DefaultQuarkusBuilder=${default_quarkus_builder_image} \
-X knative.dev/func/pkg/builders/s2i.DefaultPythonBuilder=${default_python_builder_image}"
12 changes: 12 additions & 0 deletions hack/build.sh.d/kn-plugin-event.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

knEventVersion="$(grep 'knative.dev/kn-plugin-event ' "$(basedir)/go.mod" \
| head -n 1 \
| sed -sE 's/.* (v[0-9]+\.[0-9]+\.[0-9]+.*)/\1/')"
knEventRelease="${knEventVersion%.*}"
knEventRelease="${knEventRelease#v}"
readonly upstream_sender_image="registry.ci.openshift.org/knative/release-${knEventRelease}:client-plugin-event-sender"
readonly sender_image="${KN_PLUGIN_EVENT_SENDER_IMAGE:-${upstream_sender_image}}"
export EXTERNAL_LD_FLAGS="${EXTERNAL_LD_FLAGS:-} \
-X knative.dev/kn-plugin-event/pkg/metadata.Image=${sender_image} \
-X knative.dev/kn-plugin-event/pkg/metadata.Version=${knEventVersion}"
21 changes: 21 additions & 0 deletions openshift/release/kn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
plugins:
- name: kn-plugin-source-kafka
module: knative.dev/kn-plugin-source-kafka
pluginImportPath: knative.dev/kn-plugin-source-kafka/plugin
version: knative-v1.15.0
- name: kn-plugin-event
module: knative.dev/kn-plugin-event
pluginImportPath: knative.dev/kn-plugin-event/pkg/plugin
version: v1.15.0
replace:
- module: knative.dev/kn-plugin-event
moduleSource: github.com/openshift-knative/kn-plugin-event
version: release-1.15
- name: kn-plugin-func
module: knative.dev/func
pluginImportPath: knative.dev/func/plugin
version: v1.15.2
replace:
- module: knative.dev/func
moduleSource: github.com/openshift-knative/kn-plugin-func
version: release-v1.15
28 changes: 28 additions & 0 deletions pkg/kn/root/plugin_register.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
Copyright 2021 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
http://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.
*/

package root

import (
// Add #plugins# import here. Don't remove this line, it triggers an automatic replacement.
_ "knative.dev/func/plugin"
_ "knative.dev/kn-plugin-event/pkg/plugin"
_ "knative.dev/kn-plugin-source-kafka/plugin"
)

// RegisterInlinePlugins is an empty function which however forces the
// compiler to run all init() methods of the registered imports
func RegisterInlinePlugins() {}
26 changes: 26 additions & 0 deletions vendor/cloud.google.com/go/compute/metadata/CHANGES.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

202 changes: 202 additions & 0 deletions vendor/cloud.google.com/go/compute/metadata/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions vendor/cloud.google.com/go/compute/metadata/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0b23c43

Please sign in to comment.