From 87fe01cbe575f1d9dc059c502ed3fe6cb6da32f0 Mon Sep 17 00:00:00 2001 From: afield Date: Wed, 2 Jun 2021 20:34:27 -0400 Subject: [PATCH 1/5] :open_file_folder: Update openshift specific files. --- Makefile | 82 + OWNERS | 13 +- OWNERS_ALIASES | 243 +- openshift/ci-operator/Dockerfile.in | 5 + openshift/ci-operator/build-image/Dockerfile | 13 + .../ci-operator/build-image/kubernetes.repo | 7 + openshift/ci-operator/generate-ci-config.sh | 133 + openshift/ci-operator/generate-dockerfiles.sh | 15 + .../apiserver_receive_adapter/Dockerfile | 5 + .../knative-images/appender/Dockerfile | 5 + .../channel_controller/Dockerfile | 5 + .../channel_dispatcher/Dockerfile | 5 + .../knative-images/chaosduck/Dockerfile | 5 + .../knative-images/controller/Dockerfile | 5 + .../knative-images/event_display/Dockerfile | 5 + .../knative-images/heartbeats/Dockerfile | 5 + .../heartbeats_receiver/Dockerfile | 5 + .../knative-images/migrate/Dockerfile | 5 + .../knative-images/mtbroker_filter/Dockerfile | 5 + .../mtbroker_ingress/Dockerfile | 5 + .../mtchannel_broker/Dockerfile | 5 + .../knative-images/mtping/Dockerfile | 5 + .../knative-images/pong/Dockerfile | 5 + .../knative-images/schema/Dockerfile | 5 + .../knative-images/sendevent/Dockerfile | 5 + .../sugar_controller/Dockerfile | 5 + .../knative-images/webhook/Dockerfile | 5 + .../knative-images/websocketsource/Dockerfile | 5 + .../event-flaker/Dockerfile | 5 + .../event-library/Dockerfile | 5 + .../event-sender/Dockerfile | 5 + .../knative-test-images/eventshub/Dockerfile | 5 + .../knative-test-images/heartbeats/Dockerfile | 5 + .../performance/Dockerfile | 5 + .../knative-test-images/print/Dockerfile | 5 + .../recordevents/Dockerfile | 5 + .../request-sender/Dockerfile | 5 + .../wathola-fetcher/Dockerfile | 5 + .../wathola-forwarder/Dockerfile | 5 + .../wathola-receiver/Dockerfile | 5 + .../wathola-sender/Dockerfile | 5 + openshift/ci-operator/source-image/Dockerfile | 1 + openshift/ci-operator/update-ci.sh | 73 + openshift/e2e-common.sh | 249 + openshift/e2e-conformance-tests.sh | 32 + openshift/e2e-rekt-tests.sh | 32 + openshift/e2e-tests-local.sh | 29 + openshift/e2e-tests.sh | 31 + .../013-sinkbinding_webhook_corrections.patch | 13 + .../015-sinkbinding_v1_tests_skip.patch | 12 + ...17-SourceCRDControllerFilterNonDucks.patch | 83 + ...rekt-test-apiserversource_data_plane.patch | 13 + .../patches/018-rekt-test-image-changes.patch | 112 + ...EventTransformationForSubscriptionV1.patch | 22 + ...9-remove-tracing-observability-yamls.patch | 144 + openshift/release/README.md | 109 + openshift/release/create-release-branch.sh | 25 + openshift/release/generate-release.sh | 58 + openshift/release/knative-eventing-ci.yaml | 4435 +++++++++++++++++ .../release/knative-eventing-mtbroker-ci.yaml | 433 ++ openshift/release/mirror-upstream-branches.sh | 37 + openshift/release/resolve.sh | 39 + openshift/release/update-to-head.sh | 42 + 63 files changed, 6458 insertions(+), 242 deletions(-) create mode 100644 Makefile create mode 100644 openshift/ci-operator/Dockerfile.in create mode 100644 openshift/ci-operator/build-image/Dockerfile create mode 100644 openshift/ci-operator/build-image/kubernetes.repo create mode 100755 openshift/ci-operator/generate-ci-config.sh create mode 100755 openshift/ci-operator/generate-dockerfiles.sh create mode 100644 openshift/ci-operator/knative-images/apiserver_receive_adapter/Dockerfile create mode 100644 openshift/ci-operator/knative-images/appender/Dockerfile create mode 100644 openshift/ci-operator/knative-images/channel_controller/Dockerfile create mode 100644 openshift/ci-operator/knative-images/channel_dispatcher/Dockerfile create mode 100644 openshift/ci-operator/knative-images/chaosduck/Dockerfile create mode 100644 openshift/ci-operator/knative-images/controller/Dockerfile create mode 100644 openshift/ci-operator/knative-images/event_display/Dockerfile create mode 100644 openshift/ci-operator/knative-images/heartbeats/Dockerfile create mode 100644 openshift/ci-operator/knative-images/heartbeats_receiver/Dockerfile create mode 100644 openshift/ci-operator/knative-images/migrate/Dockerfile create mode 100644 openshift/ci-operator/knative-images/mtbroker_filter/Dockerfile create mode 100644 openshift/ci-operator/knative-images/mtbroker_ingress/Dockerfile create mode 100644 openshift/ci-operator/knative-images/mtchannel_broker/Dockerfile create mode 100644 openshift/ci-operator/knative-images/mtping/Dockerfile create mode 100644 openshift/ci-operator/knative-images/pong/Dockerfile create mode 100644 openshift/ci-operator/knative-images/schema/Dockerfile create mode 100644 openshift/ci-operator/knative-images/sendevent/Dockerfile create mode 100644 openshift/ci-operator/knative-images/sugar_controller/Dockerfile create mode 100644 openshift/ci-operator/knative-images/webhook/Dockerfile create mode 100644 openshift/ci-operator/knative-images/websocketsource/Dockerfile create mode 100644 openshift/ci-operator/knative-test-images/event-flaker/Dockerfile create mode 100644 openshift/ci-operator/knative-test-images/event-library/Dockerfile create mode 100644 openshift/ci-operator/knative-test-images/event-sender/Dockerfile create mode 100644 openshift/ci-operator/knative-test-images/eventshub/Dockerfile create mode 100644 openshift/ci-operator/knative-test-images/heartbeats/Dockerfile create mode 100644 openshift/ci-operator/knative-test-images/performance/Dockerfile create mode 100644 openshift/ci-operator/knative-test-images/print/Dockerfile create mode 100644 openshift/ci-operator/knative-test-images/recordevents/Dockerfile create mode 100644 openshift/ci-operator/knative-test-images/request-sender/Dockerfile create mode 100644 openshift/ci-operator/knative-test-images/wathola-fetcher/Dockerfile create mode 100644 openshift/ci-operator/knative-test-images/wathola-forwarder/Dockerfile create mode 100644 openshift/ci-operator/knative-test-images/wathola-receiver/Dockerfile create mode 100644 openshift/ci-operator/knative-test-images/wathola-sender/Dockerfile create mode 100644 openshift/ci-operator/source-image/Dockerfile create mode 100755 openshift/ci-operator/update-ci.sh create mode 100644 openshift/e2e-common.sh create mode 100644 openshift/e2e-conformance-tests.sh create mode 100644 openshift/e2e-rekt-tests.sh create mode 100755 openshift/e2e-tests-local.sh create mode 100644 openshift/e2e-tests.sh create mode 100644 openshift/patches/013-sinkbinding_webhook_corrections.patch create mode 100644 openshift/patches/015-sinkbinding_v1_tests_skip.patch create mode 100644 openshift/patches/017-SourceCRDControllerFilterNonDucks.patch create mode 100644 openshift/patches/018-rekt-test-apiserversource_data_plane.patch create mode 100644 openshift/patches/018-rekt-test-image-changes.patch create mode 100644 openshift/patches/018-rekt-test-skip-TestEventTransformationForSubscriptionV1.patch create mode 100644 openshift/patches/019-remove-tracing-observability-yamls.patch create mode 100644 openshift/release/README.md create mode 100755 openshift/release/create-release-branch.sh create mode 100755 openshift/release/generate-release.sh create mode 100644 openshift/release/knative-eventing-ci.yaml create mode 100644 openshift/release/knative-eventing-mtbroker-ci.yaml create mode 100755 openshift/release/mirror-upstream-branches.sh create mode 100755 openshift/release/resolve.sh create mode 100755 openshift/release/update-to-head.sh diff --git a/Makefile b/Makefile new file mode 100644 index 00000000000..b4318651890 --- /dev/null +++ b/Makefile @@ -0,0 +1,82 @@ +#This makefile is used by ci-operator + +CGO_ENABLED=0 +GOOS=linux +CORE_IMAGES=$(shell find ./cmd -name main.go ! -path "./cmd/broker/*" ! -path "./cmd/mtbroker/*" | sed 's/main.go//') ./vendor/knative.dev/pkg/apiextensions/storageversion/cmd/migrate ./vendor/knative.dev/pkg/leaderelection/chaosduck +TEST_IMAGES=$(shell find ./test/test_images -mindepth 1 -maxdepth 1 -type d) ./vendor/knative.dev/reconciler-test/cmd/eventshub +KO_DOCKER_REPO=${DOCKER_REPO_OVERRIDE} +BRANCH= +TEST= +IMAGE= + +# Guess location of openshift/release repo. NOTE: override this if it is not correct. +OPENSHIFT=${CURDIR}/../../github.com/openshift/release + +install: + for img in $(CORE_IMAGES); do \ + go install $$img ; \ + done + go build -o $(GOPATH)/bin/mtbroker_ingress ./cmd/broker/ingress/ + go build -o $(GOPATH)/bin/mtbroker_filter ./cmd/broker/filter/ +.PHONY: install + +test-install: + for img in $(TEST_IMAGES); do \ + go install $$img ; \ + done +.PHONY: test-install + +test-e2e: + sh openshift/e2e-tests.sh +.PHONY: test-e2e + +test-conformance: + sh openshift/e2e-conformance-tests.sh +.PHONY: test-conformance + +test-reconciler: + sh openshift/e2e-rekt-tests.sh +.PHONY: test-reconciler + +# Requires ko 0.2.0 or newer. +test-images: + for img in $(TEST_IMAGES); do \ + ko resolve --tags=latest -RBf $$img ; \ + done +.PHONY: test-images + +test-image-single: + ko resolve --tags=latest -RBf test/test_images/$(IMAGE) +.PHONY: test-image-single + +# Run make DOCKER_REPO_OVERRIDE= test-e2e-local if test images are available +# in the given repository. Make sure you first build and push them there by running `make test-images`. +# Run make BRANCH= test-e2e-local if test images from the latest CI +# build for this branch should be used. Example: `make BRANCH=knative-v0.14.2 test-e2e-local`. +# If neither DOCKER_REPO_OVERRIDE nor BRANCH are defined the tests will use test images +# from the last nightly build. +# If TEST is defined then only the single test will be run. +test-e2e-local: + ./openshift/e2e-tests-local.sh $(TEST) +.PHONY: test-e2e-local + +# Generate Dockerfiles used by ci-operator. The files need to be committed manually. +generate-dockerfiles: + rm -rf openshift/ci-operator/knative-images/* + ./openshift/ci-operator/generate-dockerfiles.sh openshift/ci-operator/knative-images $(CORE_IMAGES) + ./openshift/ci-operator/generate-dockerfiles.sh openshift/ci-operator/knative-images mtbroker_ingress + ./openshift/ci-operator/generate-dockerfiles.sh openshift/ci-operator/knative-images mtbroker_filter + rm -rf openshift/ci-operator/knative-test-images/* + ./openshift/ci-operator/generate-dockerfiles.sh openshift/ci-operator/knative-test-images $(TEST_IMAGES) +.PHONY: generate-dockerfiles + +# Generate an aggregated knative release yaml file, as well as a CI file with replaced image references +generate-release: + ./openshift/release/generate-release.sh $(RELEASE) +.PHONY: generate-release + +# Update CI configuration in the $(OPENSHIFT) directory. +# NOTE: Makes changes outside this repository. +update-ci: + sh ./openshift/ci-operator/update-ci.sh $(OPENSHIFT) $(CORE_IMAGES) +.PHONY: update-ci diff --git a/OWNERS b/OWNERS index 43f1444c8a6..e0466c2e970 100644 --- a/OWNERS +++ b/OWNERS @@ -1,13 +1,8 @@ -# Approvers in this repo should also be added to the eventing-contrib -# approvers list. +# The OWNERS file is used by prow to automatically merge approved PRs. + approvers: -- technical-oversight-committee -- eventing-writers -- knative-release-leads +- eventing-approvers -# Reviewers are suggested from the reviewers list first, then the approvers -# list. To add reviewers while spreading the load among existing approvers, -# copy the approvers to the reviewers list too. reviewers: -- eventing-writers - eventing-reviewers + diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES index 224c78ae15f..bdf51e51323 100644 --- a/OWNERS_ALIASES +++ b/OWNERS_ALIASES @@ -1,244 +1,21 @@ -# This file is auto-generated from peribolos - aliases: - api-core-wg-leads: - - dprotaso - autoscaling-reviewers: - - taragu - autoscaling-wg-leads: - - markusthoemmes - - vagababov - autoscaling-writers: - - julz - - markusthoemmes - - vagababov - - yanweiguo - channel-wg-leads: - - matzew - - slinkydeveloper - client-reviewers: - - itsmurugappan - client-wg-leads: - - navidshaikh - - rhuss - client-writers: - - dsimansk - - maximilien - - navidshaikh - - rhuss - conformance-wg-leads: - - tayarani - conformance-writers: - - tayarani - docs-reviewers: - - RichardJJG - - jonatasbaldin - - mpetason - - omerbensaadon - - pmbanugo - - snneji - docs-wg-leads: [] - docs-writers: - - abrennan89 - - carieshmarie - - richieescarez - eventing-reviewers: - - aslom - - nlopezgi - - tayarani - - tommyreddad - eventing-triage: - - akashrv - - antoineco - - lberk - - n3wscott - - slinkydeveloper - - zhongduo - eventing-wg-leads: - - devguyio - - lionelvillard - - vaikas - eventing-writers: - - akashrv + eventing-approvers: + - alanfx - aliok - - antoineco - devguyio - - lberk - - lionelvillard - - matzew - - n3wscott - - pierDipi - - slinkydeveloper - - vaikas - - zhongduo - knative-admin: - - RichieEscarez - - bsnchan - - dprotaso - - duglin - - evankanderson - - julz - - knative-prow-releaser-robot - - knative-prow-robot - - knative-prow-updater-robot - - knative-test-reporter-robot - - markusthoemmes - - matzew - - mbehrendt - - pmorie - - rhuss - - ronavn - - thisisnotapril - - vaikas - knative-milestone-maintainers: - - ImJasonH - - ZhiminXiang - - andrew-su - - aslom - - chaodaiG - - chizhg - - csantanapr - - dprotaso - - evankanderson - - igsong - - julz - - lionelvillard - - markusthoemmes - - n3wscott - - nak3 - - navidshaikh - - nlopezgi - - rhuss - - shashwathi - - slinkydeveloper - - tanzeeb - - tcnghia - - vagababov - - vaikas - knative-release-leads: - - RichieEscarez - - dprotaso - - matzew - knative-robots: - - knative-prow-releaser-robot - - knative-prow-robot - - knative-prow-updater-robot - - knative-test-reporter-robot - networking-reviewers: - - JRBANCEL - - ZhiminXiang - - andrew-su - - arturenault - - markusthoemmes - - nak3 - - shashwathi - - tcnghia - - vagababov - - yanweiguo - networking-wg-leads: - - ZhiminXiang - - nak3 - networking-writers: - - JRBANCEL - - ZhiminXiang - - nak3 - - vagababov - operations-reviewers: - - Cynocracy - - aliok - - houshengbo - jcrossley3 + - lberk - markusthoemmes - matzew - - n3wscott - - trshafer - operations-wg-leads: - - houshengbo - operations-writers: - - Cynocracy + - mgencur + - skonto + eventing-reviewers: + - alanfx - aliok - - houshengbo + - devguyio - jcrossley3 + - lberk - markusthoemmes - matzew - - n3wscott - - trshafer - pkg-configmap-reviewers: - - dprotaso - - mattmoor - - vagababov - pkg-configmap-writers: - - dprotaso - - mattmoor - - vagababov - pkg-controller-reviewers: - - dprotaso - - mattmoor - - tcnghia - - vagababov - - whaught - pkg-controller-writers: - - dprotaso - - mattmoor - - tcnghia - - vagababov - productivity-reviewers: - - albertomilan - - efiturri - - evankanderson - - gerardo-lc - - joshua-bone - - steuhs - productivity-wg-leads: - - chizhg - - n3wscott - productivity-writers: - - chaodaiG - - chizhg - - coryrc - - n3wscott - security-wg-leads: - - evankanderson - - julz - security-writers: - - evankanderson - - julz - serving-observability-reviewers: + - mgencur - skonto - - yanweiguo - serving-observability-writers: - - yanweiguo - serving-reviewers: - - julz - - whaught - serving-writers: - - dprotaso - - julz - - markusthoemmes - - tcnghia - - vagababov - source-wg-leads: - - lionelvillard - - n3wscott - steering-committee: - - bsnchan - - mbehrendt - - pmorie - - thisisnotapril - - vaikas - technical-oversight-committee: - - dprotaso - - evankanderson - - julz - - markusthoemmes - - rhuss - trademark-committee: - - bsnchan - - duglin - - ronavn - ux-wg-leads: - - csantanapr - - omerbensaadon - ux-writers: - - csantanapr - - omerbensaadon diff --git a/openshift/ci-operator/Dockerfile.in b/openshift/ci-operator/Dockerfile.in new file mode 100644 index 00000000000..9e1ef71ca17 --- /dev/null +++ b/openshift/ci-operator/Dockerfile.in @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD ${bin} /usr/bin/${bin} +ENTRYPOINT ["/usr/bin/${bin}"] diff --git a/openshift/ci-operator/build-image/Dockerfile b/openshift/ci-operator/build-image/Dockerfile new file mode 100644 index 00000000000..f94585384ad --- /dev/null +++ b/openshift/ci-operator/build-image/Dockerfile @@ -0,0 +1,13 @@ +# Dockerfile to bootstrap build and test in openshift-ci + +FROM registry.ci.openshift.org/openshift/release:golang-1.15 + +# Add kubernetes repository +ADD openshift/ci-operator/build-image/kubernetes.repo /etc/yum.repos.d/ + +RUN yum install -y kubectl ansible httpd-tools + +RUN GO111MODULE=on go get github.com/mikefarah/yq/v3 + +# Allow runtime users to add entries to /etc/passwd +RUN chmod g+rw /etc/passwd diff --git a/openshift/ci-operator/build-image/kubernetes.repo b/openshift/ci-operator/build-image/kubernetes.repo new file mode 100644 index 00000000000..65eda50b5bf --- /dev/null +++ b/openshift/ci-operator/build-image/kubernetes.repo @@ -0,0 +1,7 @@ +[kubernetes] +name=Kubernetes +baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 +enabled=1 +gpgcheck=1 +repo_gpgcheck=1 +gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg diff --git a/openshift/ci-operator/generate-ci-config.sh b/openshift/ci-operator/generate-ci-config.sh new file mode 100755 index 00000000000..768f63556b1 --- /dev/null +++ b/openshift/ci-operator/generate-ci-config.sh @@ -0,0 +1,133 @@ +#!/bin/bash + +branch=${1-'knative-v0.6.0'} +openshift=${2-'4.3'} +promotion_disabled=${3-false} + +if [[ "$branch" == "knative-next" ]]; then + branch="knative-nightly" +fi + +cat < $target_dir/$image_base/Dockerfile + done +} + +generate_dockefiles $@ diff --git a/openshift/ci-operator/knative-images/apiserver_receive_adapter/Dockerfile b/openshift/ci-operator/knative-images/apiserver_receive_adapter/Dockerfile new file mode 100644 index 00000000000..13577301648 --- /dev/null +++ b/openshift/ci-operator/knative-images/apiserver_receive_adapter/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD apiserver_receive_adapter /usr/bin/apiserver_receive_adapter +ENTRYPOINT ["/usr/bin/apiserver_receive_adapter"] diff --git a/openshift/ci-operator/knative-images/appender/Dockerfile b/openshift/ci-operator/knative-images/appender/Dockerfile new file mode 100644 index 00000000000..47932a9e305 --- /dev/null +++ b/openshift/ci-operator/knative-images/appender/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD appender /usr/bin/appender +ENTRYPOINT ["/usr/bin/appender"] diff --git a/openshift/ci-operator/knative-images/channel_controller/Dockerfile b/openshift/ci-operator/knative-images/channel_controller/Dockerfile new file mode 100644 index 00000000000..761239d8cb3 --- /dev/null +++ b/openshift/ci-operator/knative-images/channel_controller/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD channel_controller /usr/bin/channel_controller +ENTRYPOINT ["/usr/bin/channel_controller"] diff --git a/openshift/ci-operator/knative-images/channel_dispatcher/Dockerfile b/openshift/ci-operator/knative-images/channel_dispatcher/Dockerfile new file mode 100644 index 00000000000..e442f3c4c87 --- /dev/null +++ b/openshift/ci-operator/knative-images/channel_dispatcher/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD channel_dispatcher /usr/bin/channel_dispatcher +ENTRYPOINT ["/usr/bin/channel_dispatcher"] diff --git a/openshift/ci-operator/knative-images/chaosduck/Dockerfile b/openshift/ci-operator/knative-images/chaosduck/Dockerfile new file mode 100644 index 00000000000..0b08fcb7ad4 --- /dev/null +++ b/openshift/ci-operator/knative-images/chaosduck/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD chaosduck /usr/bin/chaosduck +ENTRYPOINT ["/usr/bin/chaosduck"] diff --git a/openshift/ci-operator/knative-images/controller/Dockerfile b/openshift/ci-operator/knative-images/controller/Dockerfile new file mode 100644 index 00000000000..41cdd592d73 --- /dev/null +++ b/openshift/ci-operator/knative-images/controller/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD controller /usr/bin/controller +ENTRYPOINT ["/usr/bin/controller"] diff --git a/openshift/ci-operator/knative-images/event_display/Dockerfile b/openshift/ci-operator/knative-images/event_display/Dockerfile new file mode 100644 index 00000000000..eaf97dfd9d1 --- /dev/null +++ b/openshift/ci-operator/knative-images/event_display/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD event_display /usr/bin/event_display +ENTRYPOINT ["/usr/bin/event_display"] diff --git a/openshift/ci-operator/knative-images/heartbeats/Dockerfile b/openshift/ci-operator/knative-images/heartbeats/Dockerfile new file mode 100644 index 00000000000..26e419912e0 --- /dev/null +++ b/openshift/ci-operator/knative-images/heartbeats/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD heartbeats /usr/bin/heartbeats +ENTRYPOINT ["/usr/bin/heartbeats"] diff --git a/openshift/ci-operator/knative-images/heartbeats_receiver/Dockerfile b/openshift/ci-operator/knative-images/heartbeats_receiver/Dockerfile new file mode 100644 index 00000000000..d5f9f5d96af --- /dev/null +++ b/openshift/ci-operator/knative-images/heartbeats_receiver/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD heartbeats_receiver /usr/bin/heartbeats_receiver +ENTRYPOINT ["/usr/bin/heartbeats_receiver"] diff --git a/openshift/ci-operator/knative-images/migrate/Dockerfile b/openshift/ci-operator/knative-images/migrate/Dockerfile new file mode 100644 index 00000000000..251c5e64718 --- /dev/null +++ b/openshift/ci-operator/knative-images/migrate/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD migrate /usr/bin/migrate +ENTRYPOINT ["/usr/bin/migrate"] diff --git a/openshift/ci-operator/knative-images/mtbroker_filter/Dockerfile b/openshift/ci-operator/knative-images/mtbroker_filter/Dockerfile new file mode 100644 index 00000000000..737bef337e3 --- /dev/null +++ b/openshift/ci-operator/knative-images/mtbroker_filter/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD mtbroker_filter /usr/bin/mtbroker_filter +ENTRYPOINT ["/usr/bin/mtbroker_filter"] diff --git a/openshift/ci-operator/knative-images/mtbroker_ingress/Dockerfile b/openshift/ci-operator/knative-images/mtbroker_ingress/Dockerfile new file mode 100644 index 00000000000..05dc6d9c215 --- /dev/null +++ b/openshift/ci-operator/knative-images/mtbroker_ingress/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD mtbroker_ingress /usr/bin/mtbroker_ingress +ENTRYPOINT ["/usr/bin/mtbroker_ingress"] diff --git a/openshift/ci-operator/knative-images/mtchannel_broker/Dockerfile b/openshift/ci-operator/knative-images/mtchannel_broker/Dockerfile new file mode 100644 index 00000000000..040be2f362e --- /dev/null +++ b/openshift/ci-operator/knative-images/mtchannel_broker/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD mtchannel_broker /usr/bin/mtchannel_broker +ENTRYPOINT ["/usr/bin/mtchannel_broker"] diff --git a/openshift/ci-operator/knative-images/mtping/Dockerfile b/openshift/ci-operator/knative-images/mtping/Dockerfile new file mode 100644 index 00000000000..c2c082b1ea0 --- /dev/null +++ b/openshift/ci-operator/knative-images/mtping/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD mtping /usr/bin/mtping +ENTRYPOINT ["/usr/bin/mtping"] diff --git a/openshift/ci-operator/knative-images/pong/Dockerfile b/openshift/ci-operator/knative-images/pong/Dockerfile new file mode 100644 index 00000000000..48b82678585 --- /dev/null +++ b/openshift/ci-operator/knative-images/pong/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD pong /usr/bin/pong +ENTRYPOINT ["/usr/bin/pong"] diff --git a/openshift/ci-operator/knative-images/schema/Dockerfile b/openshift/ci-operator/knative-images/schema/Dockerfile new file mode 100644 index 00000000000..4be04fc2ded --- /dev/null +++ b/openshift/ci-operator/knative-images/schema/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD schema /usr/bin/schema +ENTRYPOINT ["/usr/bin/schema"] diff --git a/openshift/ci-operator/knative-images/sendevent/Dockerfile b/openshift/ci-operator/knative-images/sendevent/Dockerfile new file mode 100644 index 00000000000..6ea273a2ae7 --- /dev/null +++ b/openshift/ci-operator/knative-images/sendevent/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD sendevent /usr/bin/sendevent +ENTRYPOINT ["/usr/bin/sendevent"] diff --git a/openshift/ci-operator/knative-images/sugar_controller/Dockerfile b/openshift/ci-operator/knative-images/sugar_controller/Dockerfile new file mode 100644 index 00000000000..a16b3528a92 --- /dev/null +++ b/openshift/ci-operator/knative-images/sugar_controller/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD sugar_controller /usr/bin/sugar_controller +ENTRYPOINT ["/usr/bin/sugar_controller"] diff --git a/openshift/ci-operator/knative-images/webhook/Dockerfile b/openshift/ci-operator/knative-images/webhook/Dockerfile new file mode 100644 index 00000000000..a2a1000d057 --- /dev/null +++ b/openshift/ci-operator/knative-images/webhook/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD webhook /usr/bin/webhook +ENTRYPOINT ["/usr/bin/webhook"] diff --git a/openshift/ci-operator/knative-images/websocketsource/Dockerfile b/openshift/ci-operator/knative-images/websocketsource/Dockerfile new file mode 100644 index 00000000000..61bb70a6572 --- /dev/null +++ b/openshift/ci-operator/knative-images/websocketsource/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD websocketsource /usr/bin/websocketsource +ENTRYPOINT ["/usr/bin/websocketsource"] diff --git a/openshift/ci-operator/knative-test-images/event-flaker/Dockerfile b/openshift/ci-operator/knative-test-images/event-flaker/Dockerfile new file mode 100644 index 00000000000..a63f2c61dfe --- /dev/null +++ b/openshift/ci-operator/knative-test-images/event-flaker/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD event-flaker /usr/bin/event-flaker +ENTRYPOINT ["/usr/bin/event-flaker"] diff --git a/openshift/ci-operator/knative-test-images/event-library/Dockerfile b/openshift/ci-operator/knative-test-images/event-library/Dockerfile new file mode 100644 index 00000000000..c967b4e8c06 --- /dev/null +++ b/openshift/ci-operator/knative-test-images/event-library/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD event-library /usr/bin/event-library +ENTRYPOINT ["/usr/bin/event-library"] diff --git a/openshift/ci-operator/knative-test-images/event-sender/Dockerfile b/openshift/ci-operator/knative-test-images/event-sender/Dockerfile new file mode 100644 index 00000000000..3c852d6a68e --- /dev/null +++ b/openshift/ci-operator/knative-test-images/event-sender/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD event-sender /usr/bin/event-sender +ENTRYPOINT ["/usr/bin/event-sender"] diff --git a/openshift/ci-operator/knative-test-images/eventshub/Dockerfile b/openshift/ci-operator/knative-test-images/eventshub/Dockerfile new file mode 100644 index 00000000000..f5f93116c4d --- /dev/null +++ b/openshift/ci-operator/knative-test-images/eventshub/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD eventshub /usr/bin/eventshub +ENTRYPOINT ["/usr/bin/eventshub"] diff --git a/openshift/ci-operator/knative-test-images/heartbeats/Dockerfile b/openshift/ci-operator/knative-test-images/heartbeats/Dockerfile new file mode 100644 index 00000000000..26e419912e0 --- /dev/null +++ b/openshift/ci-operator/knative-test-images/heartbeats/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD heartbeats /usr/bin/heartbeats +ENTRYPOINT ["/usr/bin/heartbeats"] diff --git a/openshift/ci-operator/knative-test-images/performance/Dockerfile b/openshift/ci-operator/knative-test-images/performance/Dockerfile new file mode 100644 index 00000000000..e9f24436add --- /dev/null +++ b/openshift/ci-operator/knative-test-images/performance/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD performance /usr/bin/performance +ENTRYPOINT ["/usr/bin/performance"] diff --git a/openshift/ci-operator/knative-test-images/print/Dockerfile b/openshift/ci-operator/knative-test-images/print/Dockerfile new file mode 100644 index 00000000000..b7b1f9cf7bc --- /dev/null +++ b/openshift/ci-operator/knative-test-images/print/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD print /usr/bin/print +ENTRYPOINT ["/usr/bin/print"] diff --git a/openshift/ci-operator/knative-test-images/recordevents/Dockerfile b/openshift/ci-operator/knative-test-images/recordevents/Dockerfile new file mode 100644 index 00000000000..2599ee16b49 --- /dev/null +++ b/openshift/ci-operator/knative-test-images/recordevents/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD recordevents /usr/bin/recordevents +ENTRYPOINT ["/usr/bin/recordevents"] diff --git a/openshift/ci-operator/knative-test-images/request-sender/Dockerfile b/openshift/ci-operator/knative-test-images/request-sender/Dockerfile new file mode 100644 index 00000000000..b7fadf65008 --- /dev/null +++ b/openshift/ci-operator/knative-test-images/request-sender/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD request-sender /usr/bin/request-sender +ENTRYPOINT ["/usr/bin/request-sender"] diff --git a/openshift/ci-operator/knative-test-images/wathola-fetcher/Dockerfile b/openshift/ci-operator/knative-test-images/wathola-fetcher/Dockerfile new file mode 100644 index 00000000000..460de3344e0 --- /dev/null +++ b/openshift/ci-operator/knative-test-images/wathola-fetcher/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD wathola-fetcher /usr/bin/wathola-fetcher +ENTRYPOINT ["/usr/bin/wathola-fetcher"] diff --git a/openshift/ci-operator/knative-test-images/wathola-forwarder/Dockerfile b/openshift/ci-operator/knative-test-images/wathola-forwarder/Dockerfile new file mode 100644 index 00000000000..d974c68f274 --- /dev/null +++ b/openshift/ci-operator/knative-test-images/wathola-forwarder/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD wathola-forwarder /usr/bin/wathola-forwarder +ENTRYPOINT ["/usr/bin/wathola-forwarder"] diff --git a/openshift/ci-operator/knative-test-images/wathola-receiver/Dockerfile b/openshift/ci-operator/knative-test-images/wathola-receiver/Dockerfile new file mode 100644 index 00000000000..b931205d789 --- /dev/null +++ b/openshift/ci-operator/knative-test-images/wathola-receiver/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD wathola-receiver /usr/bin/wathola-receiver +ENTRYPOINT ["/usr/bin/wathola-receiver"] diff --git a/openshift/ci-operator/knative-test-images/wathola-sender/Dockerfile b/openshift/ci-operator/knative-test-images/wathola-sender/Dockerfile new file mode 100644 index 00000000000..e35db481dfe --- /dev/null +++ b/openshift/ci-operator/knative-test-images/wathola-sender/Dockerfile @@ -0,0 +1,5 @@ +# Do not edit! This file was generated via Makefile +FROM openshift/origin-base + +ADD wathola-sender /usr/bin/wathola-sender +ENTRYPOINT ["/usr/bin/wathola-sender"] diff --git a/openshift/ci-operator/source-image/Dockerfile b/openshift/ci-operator/source-image/Dockerfile new file mode 100644 index 00000000000..c6c622fb95d --- /dev/null +++ b/openshift/ci-operator/source-image/Dockerfile @@ -0,0 +1 @@ +FROM src diff --git a/openshift/ci-operator/update-ci.sh b/openshift/ci-operator/update-ci.sh new file mode 100755 index 00000000000..f3bd899047e --- /dev/null +++ b/openshift/ci-operator/update-ci.sh @@ -0,0 +1,73 @@ +#!/bin/bash +# A script that will update the mapping file in github.com/openshift/release + +set -e +readonly TMPDIR=$(mktemp -d knativeEventingPeriodicReporterXXXX -p /tmp/) + +fail() { echo; echo "$*"; exit 1; } + +cat >> "$TMPDIR"/reporterConfig < :rainbow: {{else}} :volcano: Job *{{.Spec.Job}}* ended with *{{.Status.State}}*. <{{.Status.URL}}|View logs> :volcano: {{end}}' +EOF + +# Deduce branch name and X.Y.Z version. +BRANCH=$(git rev-parse --abbrev-ref HEAD) +VERSION=$(echo $BRANCH | sed -E 's/^.*(v[0-9]+\.[0-9]+|next)|.*/\1/') +test -n "$VERSION" || fail "'$BRANCH' is not a release branch" + +# Set up variables for important locations in the openshift/release repo. +OPENSHIFT=$(realpath "$1"); shift +test -d "$OPENSHIFT/.git" || fail "'$OPENSHIFT' is not a git repo" +CONFIGDIR=$OPENSHIFT/ci-operator/config/openshift/knative-eventing +test -d "$CONFIGDIR" || fail "'$CONFIGDIR' is not a directory" +PERIODIC_CONFIGDIR=$OPENSHIFT/ci-operator/jobs/openshift/knative-eventing +test -d "$PERIODIC_CONFIGDIR" || fail "'$PERIODIC_CONFIGDIR' is not a directory" + +# Generate CI config files +CONFIG=$CONFIGDIR/openshift-knative-eventing-release-$VERSION +PERIODIC_CONFIG=$PERIODIC_CONFIGDIR/openshift-knative-eventing-release-$VERSION-periodics.yaml +CURDIR=$(dirname $0) +$CURDIR/generate-ci-config.sh knative-$VERSION 4.7 > ${CONFIG}__47.yaml +$CURDIR/generate-ci-config.sh knative-$VERSION 4.8 true > ${CONFIG}__48.yaml + +# Append missing lines to the mirror file. +VER=$(echo $VERSION | sed 's/\./_/;s/\.[0-9]\+$//') # X_Y form of version +MIRROR="$OPENSHIFT/core-services/image-mirroring/knative/mapping_knative_${VER}_quay" +[ -n "$(tail -c1 $MIRROR)" ] && echo >> $MIRROR # Make sure there's a newline +test_images=$(find ./openshift/ci-operator/knative-test-images -mindepth 1 -maxdepth 1 -type d | LC_COLLATE=posix sort) +for IMAGE in $test_images; do + NAME=knative-eventing-test-$(basename $IMAGE | sed 's/_/-/' | sed 's/_/-/' | sed 's/[_.]/-/' | sed 's/[_.]/-/' | sed 's/v0/upgrade-v0/') + + echo "Adding $NAME to mirror file as $VERSION tag" + LINE="registry.ci.openshift.org/openshift/knative-$VERSION:$NAME quay.io/openshift-knative/${NAME/knative-eventing-test-/}:$VERSION" + # Add $LINE if not already present + grep -q "^$LINE\$" $MIRROR || echo "$LINE" >> $MIRROR + + VER=$(echo $VER | sed 's/\_/./') + echo "Adding $NAME to mirror file as $VER tag" + LINE="registry.ci.openshift.org/openshift/knative-$VERSION:$NAME quay.io/openshift-knative/${NAME/knative-eventing-test-/}:$VER" + # Add $LINE if not already present + grep -q "^$LINE\$" $MIRROR || echo "$LINE" >> $MIRROR +done + +# Switch to openshift/release to generate PROW files +cd $OPENSHIFT +echo "Generating PROW files in $OPENSHIFT" +make jobs +make ci-operator-config +# We have to do this manually, see: https://docs.ci.openshift.org/docs/how-tos/notification/ +echo "==== Adding reporter_config to periodics ====" +# These version MUST match the ocp version we used above +for OCP_VERSION in 47; do + sed -i "/ name: periodic-ci-openshift-knative-eventing-release-${VERSION}-${OCP_VERSION}-e2e-aws-ocp-${OCP_VERSION}-continuous\n spec:/ r $TMPDIR/reporterConfig" "$PERIODIC_CONFIG" +done +echo "==== Changes made to $OPENSHIFT ====" +git status +echo "==== Commit changes to $OPENSHIFT and create a PR" diff --git a/openshift/e2e-common.sh b/openshift/e2e-common.sh new file mode 100644 index 00000000000..4f96587390f --- /dev/null +++ b/openshift/e2e-common.sh @@ -0,0 +1,249 @@ +#!/usr/bin/env bash + +export EVENTING_NAMESPACE="${EVENTING_NAMESPACE:-knative-eventing}" +export SYSTEM_NAMESPACE=$EVENTING_NAMESPACE +export ZIPKIN_NAMESPACE=$EVENTING_NAMESPACE +export KNATIVE_DEFAULT_NAMESPACE=$EVENTING_NAMESPACE +export CONFIG_TRACING_CONFIG="test/config/config-tracing.yaml" + +function scale_up_workers(){ + local cluster_api_ns="openshift-machine-api" + + oc get machineset -n ${cluster_api_ns} --show-labels + + # Get the name of the first machineset that has at least 1 replica + local machineset + machineset=$(oc get machineset -n ${cluster_api_ns} -o custom-columns="name:{.metadata.name},replicas:{.spec.replicas}" | grep " 1" | head -n 1 | awk '{print $1}') + # Bump the number of replicas to 6 (+ 1 + 1 == 8 workers) + oc patch machineset -n ${cluster_api_ns} "${machineset}" -p '{"spec":{"replicas":6}}' --type=merge + wait_until_machineset_scales_up ${cluster_api_ns} "${machineset}" 6 +} + +# Waits until the machineset in the given namespaces scales up to the +# desired number of replicas +# Parameters: $1 - namespace +# $2 - machineset name +# $3 - desired number of replicas +function wait_until_machineset_scales_up() { + echo -n "Waiting until machineset $2 in namespace $1 scales up to $3 replicas" + for _ in {1..150}; do # timeout after 15 minutes + local available + available=$(oc get machineset -n "$1" "$2" -o jsonpath="{.status.availableReplicas}") + if [[ ${available} -eq $3 ]]; then + echo -e "\nMachineSet $2 in namespace $1 successfully scaled up to $3 replicas" + return 0 + fi + echo -n "." + sleep 6 + done + echo - "Error: timeout waiting for machineset $2 in namespace $1 to scale up to $3 replicas" + return 1 +} + +# Loops until duration (car) is exceeded or command (cdr) returns non-zero +function timeout_non_zero() { + SECONDS=0; TIMEOUT=$1; shift + while eval $*; do + sleep 5 + [[ $SECONDS -gt $TIMEOUT ]] && echo "ERROR: Timed out" && return 1 + done + return 0 +} + +function install_tracing { + deploy_zipkin + enable_eventing_tracing +} + +function deploy_zipkin { + logger.info "Installing Zipkin in namespace ${ZIPKIN_NAMESPACE}" + cat < ci + cat openshift/release/knative-eventing-mtbroker-ci.yaml >> ci + + sed -i -e "s|registry.ci.openshift.org/openshift/knative-.*:knative-eventing-controller|${IMAGE_FORMAT//\$\{component\}/knative-eventing-controller}|g" ci + sed -i -e "s|registry.ci.openshift.org/openshift/knative-.*:knative-eventing-ping|${IMAGE_FORMAT//\$\{component\}/knative-eventing-ping}|g" ci + sed -i -e "s|registry.ci.openshift.org/openshift/knative-.*:knative-eventing-mtping|${IMAGE_FORMAT//\$\{component\}/knative-eventing-mtping}|g" ci + sed -i -e "s|registry.ci.openshift.org/openshift/knative-.*:knative-eventing-apiserver-receive-adapter|${IMAGE_FORMAT//\$\{component\}/knative-eventing-apiserver-receive-adapter}|g" ci + sed -i -e "s|registry.ci.openshift.org/openshift/knative-.*:knative-eventing-webhook|${IMAGE_FORMAT//\$\{component\}/knative-eventing-webhook}|g" ci + sed -i -e "s|registry.ci.openshift.org/openshift/knative-.*:knative-eventing-channel-controller|${IMAGE_FORMAT//\$\{component\}/knative-eventing-channel-controller}|g" ci + sed -i -e "s|registry.ci.openshift.org/openshift/knative-.*:knative-eventing-channel-dispatcher|${IMAGE_FORMAT//\$\{component\}/knative-eventing-channel-dispatcher}|g" ci + sed -i -e "s|registry.ci.openshift.org/openshift/knative-.*:knative-eventing-mtbroker-ingress|${IMAGE_FORMAT//\$\{component\}/knative-eventing-mtbroker-ingress}|g" ci + sed -i -e "s|registry.ci.openshift.org/openshift/knative-.*:knative-eventing-mtbroker-filter|${IMAGE_FORMAT//\$\{component\}/knative-eventing-mtbroker-filter}|g" ci + sed -i -e "s|registry.ci.openshift.org/openshift/knative-.*:knative-eventing-mtchannel-broker|${IMAGE_FORMAT//\$\{component\}/knative-eventing-mtchannel-broker}|g" ci + sed -i -e "s|registry.ci.openshift.org/openshift/knative-.*:knative-eventing-sugar-controller|${IMAGE_FORMAT//\$\{component\}/knative-eventing-sugar-controller}|g" ci + + oc apply -f ci || return 1 + rm ci + + # Wait for 5 pods to appear first + timeout_non_zero 900 '[[ $(oc get pods -n $EVENTING_NAMESPACE --no-headers | wc -l) -lt 5 ]]' || return 1 + wait_until_pods_running $EVENTING_NAMESPACE || return 1 + + # Assert that there are no images used that are not CI images (which should all be using the $INTERNAL_REGISTRY) + # (except for the knative-eventing-operator) + #oc get pod -n knative-eventing -o yaml | grep image: | grep -v knative-eventing-operator | grep -v ${INTERNAL_REGISTRY} && return 1 || true +} + +function uninstall_knative_eventing(){ + header "Uninstalling Knative Eventing" + + cat openshift/release/knative-eventing-ci.yaml > ci + cat openshift/release/knative-eventing-mtbroker-ci.yaml >> ci + + oc delete -f ci --ignore-not-found=true || return 1 + rm ci +} + +function run_e2e_rekt_tests(){ + header "Running E2E Reconciler Tests" + oc get ns ${SYSTEM_NAMESPACE} 2>/dev/null || SYSTEM_NAMESPACE="knative-eventing" + sed "s/namespace: ${KNATIVE_DEFAULT_NAMESPACE}/namespace: ${SYSTEM_NAMESPACE}/g" ${CONFIG_TRACING_CONFIG} | oc replace -f - + + oc -n knative-eventing set env deployment/mt-broker-controller BROKER_INJECTION_DEFAULT=true || return 1 + wait_until_pods_running $EVENTING_NAMESPACE || return 2 + + + go_test_e2e -timeout=30m -parallel=20 ./test/rekt || failed=$? + return $failed +} + +function run_e2e_tests(){ + header "Running E2E tests with Multi Tenant Channel Based Broker" + oc get ns ${SYSTEM_NAMESPACE} 2>/dev/null || SYSTEM_NAMESPACE="knative-eventing" + sed "s/namespace: ${KNATIVE_DEFAULT_NAMESPACE}/namespace: ${SYSTEM_NAMESPACE}/g" ${CONFIG_TRACING_CONFIG} | oc replace -f - + local test_name="${1:-}" + local run_command="" + local failed=0 + local channels=messaging.knative.dev/v1:Channel,messaging.knative.dev/v1:InMemoryChannel + local sources=sources.knative.dev/v1beta2:PingSource,sources.knative.dev/v1:ApiServerSource,sources.knative.dev/v1:ContainerSource + + local common_opts=" -channels=$channels -sources=$sources --kubeconfig $KUBECONFIG --imagetemplate $TEST_IMAGE_TEMPLATE" + if [ -n "$test_name" ]; then + local run_command="-run ^(${test_name})$" + fi + + oc -n knative-eventing set env deployment/mt-broker-controller BROKER_INJECTION_DEFAULT=true || return 1 + wait_until_pods_running $EVENTING_NAMESPACE || return 2 + + go_test_e2e -timeout=50m -parallel=20 ./test/e2e \ + "$run_command" \ + -brokerclass=MTChannelBasedBroker \ + $common_opts || failed=$? + + return $failed +} + +function run_conformance_tests(){ + header "Running Conformance tests with Multi Tenant Channel Based Broker" + oc get ns ${SYSTEM_NAMESPACE} 2>/dev/null || SYSTEM_NAMESPACE="knative-eventing" + sed "s/namespace: ${KNATIVE_DEFAULT_NAMESPACE}/namespace: ${SYSTEM_NAMESPACE}/g" ${CONFIG_TRACING_CONFIG} | oc replace -f - + local test_name="${1:-}" + local run_command="" + local failed=0 + local channels=messaging.knative.dev/v1:Channel,messaging.knative.dev/v1:InMemoryChannel + local sources=sources.knative.dev/v1beta2:PingSource,sources.knative.dev/v1:ApiServerSource,sources.knative.dev/v1:ContainerSource + + local common_opts=" -channels=$channels -sources=$sources --kubeconfig $KUBECONFIG --imagetemplate $TEST_IMAGE_TEMPLATE" + if [ -n "$test_name" ]; then + local run_command="-run ^(${test_name})$" + fi + + oc -n knative-eventing set env deployment/mt-broker-controller BROKER_INJECTION_DEFAULT=true || return 1 + wait_until_pods_running $EVENTING_NAMESPACE || return 2 + + go_test_e2e -timeout=30m -parallel=12 ./test/conformance \ + "$run_command" \ + -brokerclass=MTChannelBasedBroker \ + $common_opts || failed=$? + + return $failed +} diff --git a/openshift/e2e-conformance-tests.sh b/openshift/e2e-conformance-tests.sh new file mode 100644 index 00000000000..5a05577a0f3 --- /dev/null +++ b/openshift/e2e-conformance-tests.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +# shellcheck disable=SC1090 +source "$(dirname "$0")/../vendor/knative.dev/hack/e2e-tests.sh" +source "$(dirname "$0")/e2e-common.sh" + +set -Eeuox pipefail + +export TEST_IMAGE_TEMPLATE="${IMAGE_FORMAT//\$\{component\}/knative-eventing-test-{{.Name}}}" + +env + +scale_up_workers || exit 1 + +failed=0 + +(( !failed )) && install_serverless || failed=1 + +(( !failed )) && install_knative_eventing || failed=1 + +(( !failed )) && install_tracing || failed=1 + +(( !failed )) && run_conformance_tests || failed=1 + +(( !failed )) && uninstall_knative_eventing || failed=1 + +(( failed )) && dump_cluster_state + +(( failed )) && exit 1 + +success + diff --git a/openshift/e2e-rekt-tests.sh b/openshift/e2e-rekt-tests.sh new file mode 100644 index 00000000000..3438ec43952 --- /dev/null +++ b/openshift/e2e-rekt-tests.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +# shellcheck disable=SC1090 +source "$(dirname "$0")/../vendor/knative.dev/hack/e2e-tests.sh" +source "$(dirname "$0")/e2e-common.sh" + +set -Eeuox pipefail + +export TEST_IMAGE_TEMPLATE="${IMAGE_FORMAT//\$\{component\}/knative-eventing-test-{{.Name}}}" + +env + +scale_up_workers || exit 1 + +failed=0 + +(( !failed )) && install_serverless || failed=1 + +(( !failed )) && install_knative_eventing || failed=1 + +(( !failed )) && install_tracing || failed=1 + +(( !failed )) && run_e2e_rekt_tests || failed=1 + +(( !failed )) && uninstall_knative_eventing || failed=1 + +(( failed )) && dump_cluster_state + +(( failed )) && exit 1 + +success + diff --git a/openshift/e2e-tests-local.sh b/openshift/e2e-tests-local.sh new file mode 100755 index 00000000000..b6edb806e69 --- /dev/null +++ b/openshift/e2e-tests-local.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +# shellcheck disable=SC1090 +source "$(dirname "$0")/../vendor/knative.dev/hack/e2e-tests.sh" +source "$(dirname "$0")/e2e-common.sh" + +set -Eeuox pipefail + +if [ -n "${TEMPLATE:-}" ]; then + export TEST_IMAGE_TEMPLATE="$TEMPLATE" +elif [ -n "${DOCKER_REPO_OVERRIDE:-}" ]; then + export TEST_IMAGE_TEMPLATE="${DOCKER_REPO_OVERRIDE}/{{.Name}}" +elif [ -n "${BRANCH:-}" ]; then + export TEST_IMAGE_TEMPLATE="registry.ci.openshift.org/openshift/${BRANCH}:knative-eventing-test-{{.Name}}" +else + export TEST_IMAGE_TEMPLATE="registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-test-{{.Name}}" +fi + +env + +failed=0 + +(( !failed )) && run_e2e_tests "${TEST:-}" || failed=1 + +(( failed )) && dump_cluster_state + +(( failed )) && exit 1 + +success diff --git a/openshift/e2e-tests.sh b/openshift/e2e-tests.sh new file mode 100644 index 00000000000..18598504bf4 --- /dev/null +++ b/openshift/e2e-tests.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +# shellcheck disable=SC1090 +source "$(dirname "$0")/../vendor/knative.dev/hack/e2e-tests.sh" +source "$(dirname "$0")/e2e-common.sh" + +set -Eeuox pipefail + +export TEST_IMAGE_TEMPLATE="${IMAGE_FORMAT//\$\{component\}/knative-eventing-test-{{.Name}}}" + +env + +scale_up_workers || exit 1 + +failed=0 + +(( !failed )) && install_serverless || failed=1 + +(( !failed )) && install_knative_eventing || failed=1 + +(( !failed )) && install_tracing || failed=1 + +(( !failed )) && run_e2e_tests || failed=1 + +(( !failed )) && uninstall_knative_eventing || failed=1 + +(( failed )) && dump_cluster_state + +(( failed )) && exit 1 + +success diff --git a/openshift/patches/013-sinkbinding_webhook_corrections.patch b/openshift/patches/013-sinkbinding_webhook_corrections.patch new file mode 100644 index 00000000000..0b2fc7dd145 --- /dev/null +++ b/openshift/patches/013-sinkbinding_webhook_corrections.patch @@ -0,0 +1,13 @@ +diff --git a/config/core/deployments/webhook.yaml b/config/core/deployments/webhook.yaml +index a8dfef10b..71bbce864 100644 +--- a/config/core/deployments/webhook.yaml ++++ b/config/core/deployments/webhook.yaml +@@ -81,7 +81,7 @@ spec: + # will NOT be considered by the sinkbinding webhook. + # The default is `exclusion`. + - name: SINK_BINDING_SELECTION_MODE +- value: "exclusion" ++ value: "inclusion" + - name: POD_NAME + valueFrom: + fieldRef: diff --git a/openshift/patches/015-sinkbinding_v1_tests_skip.patch b/openshift/patches/015-sinkbinding_v1_tests_skip.patch new file mode 100644 index 00000000000..8c8f24fc404 --- /dev/null +++ b/openshift/patches/015-sinkbinding_v1_tests_skip.patch @@ -0,0 +1,12 @@ +diff --git a/test/e2e/source_sinkbinding_v1_test.go b/test/e2e/source_sinkbinding_v1_test.go +index 456069539..8328b6b83 100644 +--- a/test/e2e/source_sinkbinding_v1_test.go ++++ b/test/e2e/source_sinkbinding_v1_test.go +@@ -126,6 +126,7 @@ func TestSinkBindingV1Deployment(t *testing.T) { + } + + func TestSinkBindingV1CronJob(t *testing.T) { ++ t.Skip("SRVKE-500: Skipping since we set bindings to inclusion") + const ( + sinkBindingName = "e2e-sink-binding" + deploymentName = "e2e-sink-binding-cronjob" diff --git a/openshift/patches/017-SourceCRDControllerFilterNonDucks.patch b/openshift/patches/017-SourceCRDControllerFilterNonDucks.patch new file mode 100644 index 00000000000..41863cbf455 --- /dev/null +++ b/openshift/patches/017-SourceCRDControllerFilterNonDucks.patch @@ -0,0 +1,83 @@ +From 98030ddb62e1330830cd912b3c46f1ac0454c78b Mon Sep 17 00:00:00 2001 +From: Lukas Berk +Date: Tue, 17 Nov 2020 22:09:57 -0500 +Subject: [PATCH] source.crd controller: filter out non duck crds (#980) + +knative.dev/pkg controller runtime doesn't allow for global level +resync and leaderelection functions to filter out objects set by +filter funcs. In the case of the crd controller -- this means our +reconciliation process picks up unrelated objets to try and create +duck controllers. Add an extra check in the reconcile process +equivalent to the informer filterFunc +--- + pkg/reconciler/source/crd/crd.go | 7 +++++++ + pkg/reconciler/source/crd/crd_test.go | 21 ++++++++++++++++++--- + 2 files changed, 25 insertions(+), 3 deletions(-) + +diff --git a/pkg/reconciler/source/crd/crd.go b/pkg/reconciler/source/crd/crd.go +index acf4f0cb0..3215de54d 100644 +--- a/pkg/reconciler/source/crd/crd.go ++++ b/pkg/reconciler/source/crd/crd.go +@@ -31,6 +31,7 @@ import ( + "knative.dev/pkg/logging" + pkgreconciler "knative.dev/pkg/reconciler" + ++ "knative.dev/eventing/pkg/apis/sources" + "knative.dev/eventing/pkg/reconciler/source/duck" + ) + +@@ -60,6 +61,12 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, crd *v1.CustomResourceDe + // 2. Dynamically create a controller for it, if not present already. Such controller is in charge of reconciling + // duckv1.Source resources with that particular GVR.. + ++ filterFunc := pkgreconciler.LabelFilterFunc(sources.SourceDuckLabelKey, sources.SourceDuckLabelValue, false) ++ if ok := filterFunc(crd); !ok { ++ logging.FromContext(ctx).Errorw("Passed crd does not have source duck label", zap.String("CRD", crd.Name)) ++ return nil //Avoid requeuing object ++ } ++ + gvr, gvk, err := r.resolveGroupVersions(crd) + if err != nil { + logging.FromContext(ctx).Errorw("Error while resolving GVR and GVK", zap.String("CRD", crd.Name), zap.Error(err)) +diff --git a/pkg/reconciler/source/crd/crd_test.go b/pkg/reconciler/source/crd/crd_test.go +index 890a31075..70db91375 100644 +--- a/pkg/reconciler/source/crd/crd_test.go ++++ b/pkg/reconciler/source/crd/crd_test.go +@@ -158,6 +158,23 @@ func TestAllCases(t *testing.T) { + Key: crdName, + Ctx: ctx, + }, ++ { ++ Name: "crd missing duck label", ++ Objects: []runtime.Object{ ++ NewCustomResourceDefinition(crdName, ++ WithCustomResourceDefinitionGroup(crdGroup), ++ WithCustomResourceDefinitionNames(apiextensionsv1.CustomResourceDefinitionNames{ ++ Kind: crdKind, ++ Plural: crdPlural, ++ }), ++ WithCustomResourceDefinitionVersions([]apiextensionsv1.CustomResourceDefinitionVersion{{ ++ Name: crdVersionServed, ++ Served: true, ++ }})), ++ }, ++ Key: crdName, ++ Ctx: ctx, ++ }, + } + + logger := logtesting.TestLogger(t) +@@ -184,9 +201,7 @@ func TestControllerRunning(t *testing.T) { + Name: "reconcile succeeded", + Objects: []runtime.Object{ + NewCustomResourceDefinition(crdName, +- WithCustomResourceDefinitionLabels(map[string]string{ +- sources.SourceDuckLabelKey: sources.SourceDuckLabelValue, +- }), ++ WithCustomResourceDefinitionLabels(map[string]string{sources.SourceDuckLabelKey: sources.SourceDuckLabelValue}), + WithCustomResourceDefinitionGroup(crdGroup), + WithCustomResourceDefinitionNames(apiextensionsv1.CustomResourceDefinitionNames{ + Kind: crdKind, +-- +2.26.3 + diff --git a/openshift/patches/018-rekt-test-apiserversource_data_plane.patch b/openshift/patches/018-rekt-test-apiserversource_data_plane.patch new file mode 100644 index 00000000000..1fa02c6395f --- /dev/null +++ b/openshift/patches/018-rekt-test-apiserversource_data_plane.patch @@ -0,0 +1,13 @@ +diff --git a/test/rekt/features/apiserversource/data_plane.go b/test/rekt/features/apiserversource/data_plane.go +index 037281409..1c7a734dd 100644 +--- a/test/rekt/features/apiserversource/data_plane.go ++++ b/test/rekt/features/apiserversource/data_plane.go +@@ -37,7 +37,7 @@ import ( + ) + + const ( +- exampleImage = "ko://knative.dev/eventing/test/test_images/print" ++ exampleImage = "registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-test-print" + ) + + func DataPlane_SinkTypes() *feature.FeatureSet { diff --git a/openshift/patches/018-rekt-test-image-changes.patch b/openshift/patches/018-rekt-test-image-changes.patch new file mode 100644 index 00000000000..f781f2c2b88 --- /dev/null +++ b/openshift/patches/018-rekt-test-image-changes.patch @@ -0,0 +1,112 @@ +diff --git a/test/rekt/broker_test.go b/test/rekt/broker_test.go +index 2f13b88de..53a92020c 100644 +--- a/test/rekt/broker_test.go ++++ b/test/rekt/broker_test.go +@@ -54,6 +54,7 @@ func TestBrokerAsMiddleware(t *testing.T) { + + // TestBrokerDLQ + func TestBrokerWithDLQ(t *testing.T) { ++ t.Skip("skipping for test reasons...") + class := eventing.MTChannelBrokerClassValue + + ctx, env := global.Environment( +diff --git a/test/rekt/resources/containersource/containersource.yaml b/test/rekt/resources/containersource/containersource.yaml +index f480b459b..51ebb5c82 100644 +--- a/test/rekt/resources/containersource/containersource.yaml ++++ b/test/rekt/resources/containersource/containersource.yaml +@@ -42,7 +42,7 @@ spec: + spec: + containers: + - name: heartbeats +- image: ko://knative.dev/eventing/test/test_images/heartbeats ++ image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-test-heartbeats + args: + - --period=1 + env: +diff --git a/test/rekt/resources/containersource/containersource_test.go b/test/rekt/resources/containersource/containersource_test.go +index 501541bca..c2b81583a 100644 +--- a/test/rekt/resources/containersource/containersource_test.go ++++ b/test/rekt/resources/containersource/containersource_test.go +@@ -47,7 +47,7 @@ func Example_min() { + // spec: + // containers: + // - name: heartbeats +- // image: ko://knative.dev/eventing/test/test_images/heartbeats ++ // image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-test-heartbeats + // args: + // - --period=1 + // env: +@@ -106,7 +106,7 @@ func Example_full() { + // spec: + // containers: + // - name: heartbeats +- // image: ko://knative.dev/eventing/test/test_images/heartbeats ++ // image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-test-heartbeats + // args: + // - --period=1 + // env: +diff --git a/test/rekt/resources/eventlibrary/eventlibrary.yaml b/test/rekt/resources/eventlibrary/eventlibrary.yaml +index 7cd5e8e57..96777f69f 100644 +--- a/test/rekt/resources/eventlibrary/eventlibrary.yaml ++++ b/test/rekt/resources/eventlibrary/eventlibrary.yaml +@@ -23,7 +23,7 @@ spec: + restartPolicy: "Never" + containers: + - name: library +- image: ko://knative.dev/eventing/test/test_images/event-library ++ image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-test-event-library + imagePullPolicy: "IfNotPresent" + + --- +diff --git a/test/rekt/resources/eventlibrary/eventlibrary_test.go b/test/rekt/resources/eventlibrary/eventlibrary_test.go +index 0e1464ddf..fe3b19c2e 100644 +--- a/test/rekt/resources/eventlibrary/eventlibrary_test.go ++++ b/test/rekt/resources/eventlibrary/eventlibrary_test.go +@@ -24,7 +24,7 @@ import ( + + func Example() { + images := map[string]string{ +- "ko://knative.dev/eventing/test/test_images/event-library": "gcr.io/knative-samples/helloworld-go", ++ "registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-test-event-library": "gcr.io/knative-samples/helloworld-go", + } + cfg := map[string]interface{}{ + "name": "foo", +diff --git a/test/rekt/resources/flaker/flaker.yaml b/test/rekt/resources/flaker/flaker.yaml +index 207c3d681..8821bb577 100644 +--- a/test/rekt/resources/flaker/flaker.yaml ++++ b/test/rekt/resources/flaker/flaker.yaml +@@ -23,7 +23,7 @@ spec: + restartPolicy: "Never" + containers: + - name: flaker +- image: ko://knative.dev/eventing/test/test_images/event-flaker ++ image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-test-event-flaker + imagePullPolicy: "IfNotPresent" + env: + - name: "K_SINK" +diff --git a/test/rekt/resources/flaker/flaker_test.go b/test/rekt/resources/flaker/flaker_test.go +index aee4d23c2..3d797342a 100644 +--- a/test/rekt/resources/flaker/flaker_test.go ++++ b/test/rekt/resources/flaker/flaker_test.go +@@ -24,7 +24,7 @@ import ( + + func Example() { + images := map[string]string{ +- "ko://knative.dev/eventing/test/test_images/event-flaker": "gcr.io/knative-samples/helloworld-go", ++ "registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-test-event-flaker": "gcr.io/knative-samples/helloworld-go", + } + cfg := map[string]interface{}{ + "name": "foo", +diff --git a/vendor/knative.dev/reconciler-test/pkg/eventshub/103-pod.yaml b/vendor/knative.dev/reconciler-test/pkg/eventshub/103-pod.yaml +index fdf1bfe80..121012453 100644 +--- a/vendor/knative.dev/reconciler-test/pkg/eventshub/103-pod.yaml ++++ b/vendor/knative.dev/reconciler-test/pkg/eventshub/103-pod.yaml +@@ -24,7 +24,7 @@ spec: + restartPolicy: "Never" + containers: + - name: eventshub +- image: ko://knative.dev/reconciler-test/cmd/eventshub ++ image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-test-eventshub + imagePullPolicy: "IfNotPresent" + env: + - name: "SYSTEM_NAMESPACE" diff --git a/openshift/patches/018-rekt-test-skip-TestEventTransformationForSubscriptionV1.patch b/openshift/patches/018-rekt-test-skip-TestEventTransformationForSubscriptionV1.patch new file mode 100644 index 00000000000..a54ae1ccf67 --- /dev/null +++ b/openshift/patches/018-rekt-test-skip-TestEventTransformationForSubscriptionV1.patch @@ -0,0 +1,22 @@ +From c529ba75353c9fd1ab30c1d04b07637f0a15c8f7 Mon Sep 17 00:00:00 2001 +From: Matthias Wessendorf +Date: Wed, 2 Jun 2021 08:50:38 +0200 +Subject: [PATCH] Trying to skip the failing test for more investigations + +Signed-off-by: Matthias Wessendorf +--- + test/rekt/channel_test.go | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/test/rekt/channel_test.go b/test/rekt/channel_test.go +index 3973c8f2b8..7e38a08b35 100644 +--- a/test/rekt/channel_test.go ++++ b/test/rekt/channel_test.go +@@ -192,6 +192,7 @@ EventSource ---> Channel ---> Subscription ---> Channel ---> Subscription ----> + -----------> Service(Transformation) + */ + func TestEventTransformationForSubscriptionV1(t *testing.T) { ++ t.Skip("skipping for now...") + t.Parallel() + + ctx, env := global.Environment( diff --git a/openshift/patches/019-remove-tracing-observability-yamls.patch b/openshift/patches/019-remove-tracing-observability-yamls.patch new file mode 100644 index 00000000000..a5baa1627f5 --- /dev/null +++ b/openshift/patches/019-remove-tracing-observability-yamls.patch @@ -0,0 +1,144 @@ +diff --git a/config/channels/in-memory-channel/configmaps/observability.yaml b/config/channels/in-memory-channel/configmaps/observability.yaml +deleted file mode 100644 +index cad2fc51e..000000000 +--- a/config/channels/in-memory-channel/configmaps/observability.yaml ++++ /dev/null +@@ -1,73 +0,0 @@ +-# 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 +-# +-# 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: v1 +-kind: ConfigMap +-metadata: +- name: config-observability +- namespace: knative-eventing +- labels: +- eventing.knative.dev/release: devel +- knative.dev/config-propagation: original +- knative.dev/config-category: eventing +- annotations: +- knative.dev/example-checksum: "f46cf09d" +-data: +- _example: | +- ################################ +- # # +- # EXAMPLE CONFIGURATION # +- # # +- ################################ +- +- # This block is not actually functional configuration, +- # but serves to illustrate the available configuration +- # options and document them in a way that is accessible +- # to users that `kubectl edit` this config map. +- # +- # These sample configuration options may be copied out of +- # this example block and unindented to be in the data block +- # to actually change the configuration. +- +- # metrics.backend-destination field specifies the system metrics destination. +- # It supports either prometheus (the default) or stackdriver. +- # Note: Using stackdriver will incur additional charges +- metrics.backend-destination: prometheus +- +- # metrics.request-metrics-backend-destination specifies the request metrics +- # destination. If non-empty, it enables queue proxy to send request metrics. +- # Currently supported values: prometheus, stackdriver. +- metrics.request-metrics-backend-destination: prometheus +- +- # metrics.stackdriver-project-id field specifies the stackdriver project ID. This +- # field is optional. When running on GCE, application default credentials will be +- # used if this field is not provided. +- metrics.stackdriver-project-id: "" +- +- # metrics.allow-stackdriver-custom-metrics indicates whether it is allowed to send metrics to +- # Stackdriver using "global" resource type and custom metric type if the +- # metrics are not supported by "knative_broker", "knative_trigger", and "knative_source" resource types. +- # Setting this flag to "true" could cause extra Stackdriver charge. +- # If metrics.backend-destination is not Stackdriver, this is ignored. +- metrics.allow-stackdriver-custom-metrics: "false" +- +- # profiling.enable indicates whether it is allowed to retrieve runtime profiling data from +- # the pods via an HTTP server in the format expected by the pprof visualization tool. When +- # enabled, the Knative Eventing pods expose the profiling data on an alternate HTTP port 8008. +- # The HTTP context root for profiling is then /debug/pprof/. +- profiling.enable: "false" +- +- # sink-event-error-reporting.enable whether the adapter reports a kube event to the CRD indicating +- # a failure to send a cloud event to the sink. +- sink-event-error-reporting.enable: "false" +diff --git a/config/channels/in-memory-channel/configmaps/tracing.yaml b/config/channels/in-memory-channel/configmaps/tracing.yaml +deleted file mode 100644 +index a699f1321..000000000 +--- a/config/channels/in-memory-channel/configmaps/tracing.yaml ++++ /dev/null +@@ -1,59 +0,0 @@ +-# 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 +-# +-# 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: v1 +-kind: ConfigMap +-metadata: +- name: config-tracing +- namespace: knative-eventing +- labels: +- eventing.knative.dev/release: devel +- knative.dev/config-propagation: original +- knative.dev/config-category: eventing +- annotations: +- knative.dev/example-checksum: "4002b4c2" +-data: +- _example: | +- ################################ +- # # +- # EXAMPLE CONFIGURATION # +- # # +- ################################ +- # This block is not actually functional configuration, +- # but serves to illustrate the available configuration +- # options and document them in a way that is accessible +- # to users that `kubectl edit` this config map. +- # +- # These sample configuration options may be copied out of +- # this example block and unindented to be in the data block +- # to actually change the configuration. +- # +- # This may be "zipkin" or "stackdriver", the default is "none" +- backend: "none" +- +- # URL to zipkin collector where traces are sent. +- # This must be specified when backend is "zipkin" +- zipkin-endpoint: "http://zipkin.istio-system.svc.cluster.local:9411/api/v2/spans" +- +- # The GCP project into which stackdriver metrics will be written +- # when backend is "stackdriver". If unspecified, the project-id +- # is read from GCP metadata when running on GCP. +- stackdriver-project-id: "my-project" +- +- # Enable zipkin debug mode. This allows all spans to be sent to the server +- # bypassing sampling. +- debug: "false" +- +- # Percentage (0-1) of requests to trace +- sample-rate: "0.1" diff --git a/openshift/release/README.md b/openshift/release/README.md new file mode 100644 index 00000000000..73ac76ed6b3 --- /dev/null +++ b/openshift/release/README.md @@ -0,0 +1,109 @@ +# Release creation + +**Note 1** Run all scripts from the root of the repository. + +**Note 2** The main branch in this repo is used as a stash for +openshift-specific files needed for CI. Those files are copied to release +branches which is where CI operates. + +## Setting up your clone + +**Note** Your clone must be in `$GOPATH/src/knative.dev/eventing` *not* +`github.com/knative/eventing` or `openshift/knative-eventing` + +You must have remotes named "upstream" and "openshift" for the scripts +in this repo to work, like this: + +``` +git remote add openshift git@github.com:openshift/knative-eventing.git +git remote add upstream git@github.com:knative/eventing.git +``` + +## Branching +**On the main branch** create a release branch and then push it upstream: + +```bash +./openshift/release/create-release-branch.sh vX.Y.Z release-vX.Y.Z +git push -v openshift refs/heads/release-vX.Y.Z\:refs/heads/release-vX.Y.Z +``` + +This creates and checks out "release-vX.Y.Z" based on tag "vX.Y.Z" and adds +OpenShift specific files that we need to run CI. + +All remaining steps must be done **on the release branch**. + +## Building image and docker files + +On the release branch, build the images and docker files. + +``` +make install && make generate-dockerfiles +``` + +If any are new/changed, check them in. + +## Update CI configuration + +To enable CI, you need to update files on the master branch of github.com/openshift/release. +This command will update the files, assuming that you have an openshift/release clone +in the same tree as this repository; if not add OPENSHIFT= + +``` +make update-ci VERSION=X.Y.Z +``` + +This creates and modifies files in the openshift/release repo, verify that those files +are as expected, commit and create a PR for them. That will start a CI job. + +## Add/Verify periodic reporter_config + +In the `openshift/release` periodic files, we need to add/verify that +the reporter config for slack has been added. There is a +`reporter_config` per OCP release. + +For example, for `knative-eventing-v0.20.0` we added two `reporter_config`'s to +`ci-operator/jobs/openshift/knative-eventing/openshift-knative-eventing-release-v0.20.0-periodics.yaml` + +``` yaml + name: periodic-ci-openshift-knative-eventing-release-v0.20.0-47-e2e-aws-ocp-47-continuous + reporter_config: + slack: + channel: '#knative-eventing' + job_states_to_report: + - success + - failure + - error + report_template: '{{if eq .Status.State "success"}} :rainbow: Job *{{.Spec.Job}}* ended with *{{.Status.State}}*. <{{.Status.URL}}|View logs> :rainbow: {{else}} :volcano: Job *{{.Spec.Job}}* ended with *{{.Status.State}}*. <{{.Status.URL}}|View logs> :volcano: {{end}}' +``` + +and + +``` yaml + name: periodic-ci-openshift-knative-eventing-release-v0.20.0-46-e2e-aws-ocp-46-continuous + reporter_config: + slack: + channel: '#knative-eventing' + job_states_to_report: + - success + - failure + - error + report_template: '{{if eq .Status.State "success"}} :rainbow: Job *{{.Spec.Job}}* ended with *{{.Status.State}}*. <{{.Status.URL}}|View logs> :rainbow: {{else}} :volcano: Job *{{.Spec.Job}}* ended with *{{.Status.State}}*. <{{.Status.URL}}|View logs> :volcano: {{end}}' +``` + +Add these if needed. + +## Update this README + +If you find that any of the steps are incorrect or out of date. + +# Updating a branch that follow upstream's HEAD + +This is done via the nightly Jenkins job to create the release-next branch: + +```bash +./openshift/release/update-to-head.sh release-vX.Y.Z +``` + +This pulls the latest main from upstream, rebase the current fixes on the +release-vX.Y.Z branch and updates the Openshift specific files if necessary. + diff --git a/openshift/release/create-release-branch.sh b/openshift/release/create-release-branch.sh new file mode 100755 index 00000000000..82089e13782 --- /dev/null +++ b/openshift/release/create-release-branch.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Usage: create-release-branch.sh v0.4.1 release-0.4 + +set -e # Exit immediately on error. + +release=$1 +target=$2 + +# Fetch the latest tags and checkout a new branch from the wanted tag. +git fetch upstream --tags +git checkout -b "$target" "$release" + +# Copy the openshift extra files from the OPENSHIFT/main branch. +git fetch openshift main +git checkout openshift/main -- openshift OWNERS_ALIASES OWNERS Makefile +make generate-dockerfiles +make RELEASE=$release generate-release +git add openshift OWNERS_ALIASES OWNERS Makefile +git commit -m "Add openshift specific files." + +# Apply patches . +git apply openshift/patches/* +make RELEASE=$release generate-release +git commit -am ":fire: Apply carried patches." diff --git a/openshift/release/generate-release.sh b/openshift/release/generate-release.sh new file mode 100755 index 00000000000..e3fe1d75c91 --- /dev/null +++ b/openshift/release/generate-release.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +source $(dirname $0)/resolve.sh + +release=$1 + +output_file="openshift/release/knative-eventing-ci.yaml" + +if [ "$release" == "ci" ]; then + image_prefix="registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-" + tag="" +else + image_prefix="registry.ci.openshift.org/openshift/knative-${release}:knative-eventing-" + tag="" +fi + +# the core parts +resolve_resources config/ $output_file $image_prefix $tag + +# Sugar Controller +resolve_resources config/sugar/ crd-sugar-resolved.yaml $image_prefix $tag +cat crd-sugar-resolved.yaml >> $output_file +rm crd-sugar-resolved.yaml + +# InMemoryChannel folders... +# The root folder +resolve_resources config/channels/in-memory-channel/ crd-channel-resolved.yaml $image_prefix $tag +cat crd-channel-resolved.yaml >> $output_file +rm crd-channel-resolved.yaml + +# The configmaps folder +resolve_resources config/channels/in-memory-channel/configmaps crd-channel-resolved.yaml $image_prefix $tag +cat crd-channel-resolved.yaml >> $output_file +rm crd-channel-resolved.yaml + +# The deployments folder +resolve_resources config/channels/in-memory-channel/deployments crd-channel-resolved.yaml $image_prefix $tag +cat crd-channel-resolved.yaml >> $output_file +rm crd-channel-resolved.yaml + +# The resources folder +resolve_resources config/channels/in-memory-channel/resources crd-channel-resolved.yaml $image_prefix $tag +cat crd-channel-resolved.yaml >> $output_file +rm crd-channel-resolved.yaml + +# The roles folder +resolve_resources config/channels/in-memory-channel/roles crd-channel-resolved.yaml $image_prefix $tag +cat crd-channel-resolved.yaml >> $output_file +rm crd-channel-resolved.yaml + +# The webhooks folder +resolve_resources config/channels/in-memory-channel/webhooks crd-channel-resolved.yaml $image_prefix $tag +cat crd-channel-resolved.yaml >> $output_file +rm crd-channel-resolved.yaml + +# the MT Broker: +output_file="openshift/release/knative-eventing-mtbroker-ci.yaml" +resolve_resources config/brokers/mt-channel-broker/ $output_file $image_prefix $tag diff --git a/openshift/release/knative-eventing-ci.yaml b/openshift/release/knative-eventing-ci.yaml new file mode 100644 index 00000000000..e719b8f224d --- /dev/null +++ b/openshift/release/knative-eventing-ci.yaml @@ -0,0 +1,4435 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: knative-eventing + labels: + eventing.knative.dev/release: devel +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: addressable-resolver + labels: + eventing.knative.dev/release: devel +aggregationRule: + clusterRoleSelectors: + - matchLabels: + duck.knative.dev/addressable: "true" +rules: [] # Rules are automatically filled in by the controller manager. +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: service-addressable-resolver + labels: + eventing.knative.dev/release: devel + duck.knative.dev/addressable: "true" +rules: +- apiGroups: + - "" + resources: + - services + verbs: + - get + - list + - watch +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: serving-addressable-resolver + labels: + eventing.knative.dev/release: devel + duck.knative.dev/addressable: "true" +rules: +- apiGroups: + - serving.knative.dev + resources: + - routes + - routes/status + - services + - services/status + verbs: + - get + - list + - watch +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: channel-addressable-resolver + labels: + eventing.knative.dev/release: devel + duck.knative.dev/addressable: "true" +rules: +- apiGroups: + - messaging.knative.dev + resources: + - channels + - channels/status + verbs: + - get + - list + - watch +- apiGroups: + - messaging.knative.dev + resources: + - channels/finalizers + verbs: + - update +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: broker-addressable-resolver + labels: + eventing.knative.dev/release: devel + duck.knative.dev/addressable: "true" +rules: +- apiGroups: + - eventing.knative.dev + resources: + - brokers + - brokers/status + verbs: + - get + - list + - watch +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: messaging-addressable-resolver + labels: + eventing.knative.dev/release: devel + duck.knative.dev/addressable: "true" +rules: +- apiGroups: + - messaging.knative.dev + resources: + - sequences + - sequences/status + - parallels + - parallels/status + verbs: + - get + - list + - watch +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: flows-addressable-resolver + labels: + eventing.knative.dev/release: devel + duck.knative.dev/addressable: "true" +rules: +- apiGroups: + - flows.knative.dev + resources: + - sequences + - sequences/status + - parallels + - parallels/status + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: eventing-broker-filter + labels: + eventing.knative.dev/release: devel +rules: + - apiGroups: + - "" + resources: + - "configmaps" + verbs: + - "get" + - "list" + - "watch" + - apiGroups: + - "eventing.knative.dev" + resources: + - "triggers" + - "triggers/status" + verbs: + - "get" + - "list" + - "watch" +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: eventing-broker-ingress + labels: + eventing.knative.dev/release: devel +rules: + - apiGroups: + - "" + resources: + - "configmaps" + verbs: + - "get" + - "list" + - "watch" +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: eventing-config-reader + labels: + eventing.knative.dev/release: devel +rules: + - apiGroups: + - "" + resources: + - "configmaps" + verbs: + - "get" + - "list" + - "watch" +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: channelable-manipulator + labels: + eventing.knative.dev/release: devel +aggregationRule: + clusterRoleSelectors: + - matchLabels: + duck.knative.dev/channelable: "true" +rules: [] # Rules are automatically filled in by the controller manager. +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: meta-channelable-manipulator + labels: + eventing.knative.dev/release: devel + duck.knative.dev/channelable: "true" +rules: +- apiGroups: + - messaging.knative.dev + resources: + - channels + - channels/status + verbs: + - create + - get + - list + - watch + - update + - patch +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: knative-eventing-namespaced-admin + labels: + eventing.knative.dev/release: devel + rbac.authorization.k8s.io/aggregate-to-admin: "true" +rules: + - apiGroups: ["eventing.knative.dev"] + resources: ["*"] + verbs: ["*"] +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: knative-messaging-namespaced-admin + labels: + eventing.knative.dev/release: devel + rbac.authorization.k8s.io/aggregate-to-admin: "true" +rules: + - apiGroups: ["messaging.knative.dev"] + resources: ["*"] + verbs: ["*"] +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: knative-flows-namespaced-admin + labels: + eventing.knative.dev/release: devel + rbac.authorization.k8s.io/aggregate-to-admin: "true" +rules: + - apiGroups: ["flows.knative.dev"] + resources: ["*"] + verbs: ["*"] +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: knative-sources-namespaced-admin + labels: + eventing.knative.dev/release: devel + rbac.authorization.k8s.io/aggregate-to-admin: "true" +rules: + - apiGroups: ["sources.knative.dev"] + resources: ["*"] + verbs: ["*"] +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: knative-bindings-namespaced-admin + labels: + eventing.knative.dev/release: devel + rbac.authorization.k8s.io/aggregate-to-admin: "true" +rules: + - apiGroups: ["bindings.knative.dev"] + resources: ["*"] + verbs: ["*"] +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: knative-eventing-namespaced-edit + labels: + rbac.authorization.k8s.io/aggregate-to-edit: "true" + eventing.knative.dev/release: devel +rules: + - apiGroups: ["eventing.knative.dev", "messaging.knative.dev", "sources.knative.dev", "flows.knative.dev", "bindings.knative.dev"] + resources: ["*"] + verbs: ["create", "update", "patch", "delete"] +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: knative-eventing-namespaced-view + labels: + rbac.authorization.k8s.io/aggregate-to-view: "true" + eventing.knative.dev/release: devel +rules: + - apiGroups: ["eventing.knative.dev", "messaging.knative.dev", "sources.knative.dev", "flows.knative.dev", "bindings.knative.dev"] + resources: ["*"] + verbs: ["get", "list", "watch"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: knative-eventing-controller + labels: + eventing.knative.dev/release: devel +rules: + - apiGroups: + - "" + resources: + - "namespaces" + - "secrets" + - "configmaps" + - "services" + - "endpoints" + - "events" + - "serviceaccounts" + - "pods" + verbs: &everything + - "get" + - "list" + - "create" + - "update" + - "delete" + - "patch" + - "watch" + - apiGroups: + - "apps" + resources: + - "deployments" + verbs: *everything + - apiGroups: + - "apps" + resources: + - "deployments/finalizers" + verbs: + - "update" + - apiGroups: + - "rbac.authorization.k8s.io" + resources: + - "rolebindings" + verbs: *everything + - apiGroups: + - "eventing.knative.dev" + resources: + - "brokers" + - "brokers/status" + - "triggers" + - "triggers/status" + - "eventtypes" + - "eventtypes/status" + verbs: *everything + - apiGroups: + - "eventing.knative.dev" + resources: + - "brokers/finalizers" + - "triggers/finalizers" + verbs: + - "update" + - apiGroups: + - "messaging.knative.dev" + resources: + - "sequences" + - "sequences/status" + - "channels" + - "channels/status" + - "parallels" + - "parallels/status" + - "subscriptions" + - "subscriptions/status" + verbs: *everything + - apiGroups: + - "flows.knative.dev" + resources: + - "sequences" + - "sequences/status" + - "parallels" + - "parallels/status" + verbs: *everything + - apiGroups: + - "messaging.knative.dev" + resources: + - "sequences/finalizers" + - "parallels/finalizers" + - "channels/finalizers" + verbs: + - "update" + - apiGroups: + - "flows.knative.dev" + resources: + - "sequences/finalizers" + - "parallels/finalizers" + verbs: + - "update" + - apiGroups: + - "apiextensions.k8s.io" + resources: + - "customresourcedefinitions" + verbs: + - "get" + - "list" + - "watch" + - apiGroups: + - "coordination.k8s.io" + resources: + - "leases" + verbs: *everything +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: knative-eventing-pingsource-mt-adapter + labels: + eventing.knative.dev/release: devel +rules: + - apiGroups: + - "" + resources: + - "configmaps" + verbs: + - "get" + - "list" + - "watch" + - apiGroups: + - sources.knative.dev + resources: + - pingsources + - pingsources/status + verbs: + - get + - list + - watch + - patch + - apiGroups: + - sources.knative.dev + resources: + - pingsources/finalizers + verbs: + - "patch" + - apiGroups: + - "" + resources: + - events + verbs: + - "create" + - "patch" + - apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: podspecable-binding + labels: + eventing.knative.dev/release: devel +aggregationRule: + clusterRoleSelectors: + - matchLabels: + duck.knative.dev/podspecable: "true" +rules: [] # Rules are automatically filled in by the controller manager. +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: builtin-podspecable-binding + labels: + eventing.knative.dev/release: devel + duck.knative.dev/podspecable: "true" +rules: + - apiGroups: + - "apps" + resources: + - "deployments" + - "daemonsets" + - "statefulsets" + - "replicasets" + verbs: + - "list" + - "watch" + - "patch" + - apiGroups: + - "batch" + resources: + - "jobs" + verbs: + - "list" + - "watch" + - "patch" +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: source-observer + labels: + eventing.knative.dev/release: devel +aggregationRule: + clusterRoleSelectors: + - matchLabels: + duck.knative.dev/source: "true" +rules: [] # Rules are automatically filled in by the controller manager. +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: eventing-sources-source-observer + labels: + eventing.knative.dev/release: devel + duck.knative.dev/source: "true" +rules: + - apiGroups: + - sources.knative.dev + resources: + - apiserversources + - pingsources + - sinkbindings + - containersources + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: knative-eventing-sources-controller + labels: + eventing.knative.dev/release: devel +rules: + - apiGroups: + - "" + resources: + - "secrets" + - "configmaps" + - "services" + verbs: &everything + - "get" + - "list" + - "create" + - "update" + - "delete" + - "patch" + - "watch" + - apiGroups: + - "apps" + resources: + - "deployments" + verbs: *everything + - apiGroups: + - "sources.knative.dev" + resources: + - "sinkbindings" + - "sinkbindings/status" + - "sinkbindings/finalizers" + - "apiserversources" + - "apiserversources/status" + - "apiserversources/finalizers" + - "pingsources" + - "pingsources/status" + - "pingsources/finalizers" + - "containersources" + - "containersources/status" + - "containersources/finalizers" + verbs: *everything + - apiGroups: + - serving.knative.dev + resources: + - services + verbs: *everything + - apiGroups: + - eventing.knative.dev + resources: + - eventtypes + verbs: *everything + - apiGroups: + - "" + resources: + - events + verbs: *everything + - apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: knative-eventing-webhook + labels: + eventing.knative.dev/release: devel +rules: + - apiGroups: + - "" + resources: + - "configmaps" + verbs: + - "get" + - "list" + - "watch" + - apiGroups: + - "" + resources: + - "namespaces" + verbs: + - "get" + - "create" + - "update" + - "list" + - "watch" + - "patch" + - apiGroups: + - "apps" + resources: + - "deployments" + verbs: + - "get" + - apiGroups: + - "apps" + resources: + - "deployments/finalizers" + verbs: + - update + - apiGroups: + - "admissionregistration.k8s.io" + resources: + - "mutatingwebhookconfigurations" + - "validatingwebhookconfigurations" + verbs: &everything + - "get" + - "list" + - "create" + - "update" + - "delete" + - "patch" + - "watch" + - apiGroups: + - "sources.knative.dev" + resources: + - "sinkbindings" + - "sinkbindings/status" + - "sinkbindings/finalizers" + verbs: *everything + - apiGroups: + - "coordination.k8s.io" + resources: + - "leases" + verbs: *everything + - apiGroups: ["apiextensions.k8s.io"] + resources: ["customresourcedefinitions"] + verbs: ["get", "list", "create", "update", "delete", "patch", "watch"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + namespace: knative-eventing + name: knative-eventing-webhook + labels: + eventing.knative.dev/release: devel +rules: + - apiGroups: + - "" + resources: + - "secrets" + verbs: + - "get" + - "create" + - "update" + - "list" + - "watch" + - "patch" +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: eventing-controller + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: eventing-controller + labels: + eventing.knative.dev/release: devel +subjects: + - kind: ServiceAccount + name: eventing-controller + namespace: knative-eventing +roleRef: + kind: ClusterRole + name: knative-eventing-controller + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: eventing-controller-resolver + labels: + eventing.knative.dev/release: devel +subjects: + - kind: ServiceAccount + name: eventing-controller + namespace: knative-eventing +roleRef: + kind: ClusterRole + name: addressable-resolver + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: eventing-controller-source-observer + labels: + eventing.knative.dev/release: devel +subjects: + - kind: ServiceAccount + name: eventing-controller + namespace: knative-eventing +roleRef: + kind: ClusterRole + name: source-observer + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: eventing-controller-sources-controller + labels: + eventing.knative.dev/release: devel +subjects: + - kind: ServiceAccount + name: eventing-controller + namespace: knative-eventing +roleRef: + kind: ClusterRole + name: knative-eventing-sources-controller + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: eventing-controller-manipulator + labels: + eventing.knative.dev/release: devel +subjects: + - kind: ServiceAccount + name: eventing-controller + namespace: knative-eventing +roleRef: + kind: ClusterRole + name: channelable-manipulator + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: pingsource-mt-adapter + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: knative-eventing-pingsource-mt-adapter + labels: + eventing.knative.dev/release: devel +subjects: + - kind: ServiceAccount + name: pingsource-mt-adapter + namespace: knative-eventing +roleRef: + kind: ClusterRole + name: knative-eventing-pingsource-mt-adapter + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: eventing-webhook + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: eventing-webhook + labels: + eventing.knative.dev/release: devel +subjects: + - kind: ServiceAccount + name: eventing-webhook + namespace: knative-eventing +roleRef: + kind: ClusterRole + name: knative-eventing-webhook + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + namespace: knative-eventing + name: eventing-webhook + labels: + eventing.knative.dev/release: devel +subjects: + - kind: ServiceAccount + name: eventing-webhook + namespace: knative-eventing +roleRef: + kind: Role + name: knative-eventing-webhook + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: eventing-webhook-resolver + labels: + eventing.knative.dev/release: devel +subjects: + - kind: ServiceAccount + name: eventing-webhook + namespace: knative-eventing +roleRef: + kind: ClusterRole + name: addressable-resolver + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: eventing-webhook-podspecable-binding + labels: + eventing.knative.dev/release: devel +subjects: + - kind: ServiceAccount + name: eventing-webhook + namespace: knative-eventing +roleRef: + kind: ClusterRole + name: podspecable-binding + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + labels: + eventing.knative.dev/release: devel + eventing.knative.dev/source: "true" + duck.knative.dev/source: "true" + knative.dev/crd-install: "true" + annotations: + registry.knative.dev/eventTypes: | + [ + { "type": "dev.knative.apiserver.resource.add" }, + { "type": "dev.knative.apiserver.resource.delete" }, + { "type": "dev.knative.apiserver.resource.update" }, + { "type": "dev.knative.apiserver.ref.add" }, + { "type": "dev.knative.apiserver.ref.delete" }, + { "type": "dev.knative.apiserver.ref.update" } + ] + name: apiserversources.sources.knative.dev +spec: + group: sources.knative.dev + versions: + - name: v1 + served: true + storage: true + subresources: + status: {} + schema: + openAPIV3Schema: + description: 'ApiServerSource is an event source that brings Kubernetes API server events into Knative.' + type: object + properties: + spec: + type: object + required: + - resources + properties: + ceOverrides: + description: CloudEventOverrides defines overrides to control the output format and modifications of the event sent to the sink. + type: object + properties: + extensions: + description: Extensions specify what attribute are added or overridden on the outbound event. Each `Extensions` key-value pair are set on the event as an attribute extension independently. + type: object + x-kubernetes-preserve-unknown-fields: true + mode: + description: EventMode controls the format of the event. `Reference` sends a dataref event type for the resource under watch. `Resource` send the full resource lifecycle event. Defaults to `Reference` + type: string + owner: + description: ResourceOwner is an additional filter to only track resources that are owned by a specific resource type. If ResourceOwner matches Resources[n] then Resources[n] is allowed to pass the ResourceOwner filter. + type: object + properties: + apiVersion: + description: APIVersion - the API version of the resource to watch. + type: string + kind: + description: 'Kind of the resource to watch. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + resources: + description: Resource are the resources this source will track and send related lifecycle events from the Kubernetes ApiServer, with an optional label selector to help filter. + type: array + items: + type: object + properties: + apiVersion: + description: APIVersion - the API version of the resource to watch. + type: string + kind: + description: 'Kind of the resource to watch. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + selector: + description: 'LabelSelector filters this source to objects to those resources pass the label selector. More info: http://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors' + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + type: object + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + type: array + items: + type: string + matchLabels: + description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + x-kubernetes-preserve-unknown-fields: true + serviceAccountName: + description: ServiceAccountName is the name of the ServiceAccount to use to run this source. Defaults to default if not set. + type: string + sink: + description: Sink is a reference to an object that will resolve to a uri to use as the sink. + type: object + properties: + ref: + description: Ref points to an Addressable. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + uri: + description: URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref. + type: string + status: + type: object + properties: + annotations: + description: Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards. + type: object + x-kubernetes-preserve-unknown-fields: true + ceAttributes: + description: CloudEventAttributes are the specific attributes that the Source uses as part of its CloudEvents. + type: array + items: + type: object + properties: + source: + description: Source is the CloudEvents source attribute. + type: string + type: + description: Type refers to the CloudEvent type attribute. + type: string + conditions: + description: Conditions the latest available observations of a resource's current state. + type: array + items: + type: object + required: + - type + - status + properties: + lastTransitionTime: + description: LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant). + type: string + message: + description: A human readable message indicating details about the transition. + type: string + reason: + description: The reason for the condition's last transition. + type: string + severity: + description: Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition. + type: string + observedGeneration: + description: ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. + type: integer + format: int64 + sinkUri: + description: SinkURI is the current active sink URI that has been configured for the Source. + type: string + additionalPrinterColumns: + - name: Sink + type: string + jsonPath: ".status.sinkUri" + - name: Age + type: date + jsonPath: .metadata.creationTimestamp + - name: Ready + type: string + jsonPath: ".status.conditions[?(@.type==\"Ready\")].status" + - name: Reason + type: string + jsonPath: ".status.conditions[?(@.type==\"Ready\")].reason" + names: + categories: + - all + - knative + - sources + kind: ApiServerSource + plural: apiserversources + singular: apiserversource + scope: Namespaced +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: brokers.eventing.knative.dev + labels: + eventing.knative.dev/release: devel + knative.dev/crd-install: "true" + duck.knative.dev/addressable: "true" +spec: + group: eventing.knative.dev + versions: + - name: v1 + served: true + storage: true + subresources: + status: {} + schema: + openAPIV3Schema: + description: 'Broker collects a pool of events that are consumable using Triggers. Brokers provide a well-known endpoint for event delivery that senders can use with minimal knowledge of the event routing strategy. Subscribers use Triggers to request delivery of events from a Broker''s pool to a specific URL or Addressable endpoint.' + type: object + properties: + spec: + description: Spec defines the desired state of the Broker. + type: object + properties: + config: + description: Config is a KReference to the configuration that specifies configuration options for this Broker. For example, this could be a pointer to a ConfigMap. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + delivery: + description: Delivery contains the delivery spec for each trigger to this Broker. Each trigger delivery spec, if any, overrides this global delivery spec. + type: object + properties: + backoffDelay: + description: 'BackoffDelay is the delay before retrying. More information on Duration format: - https://www.iso.org/iso-8601-date-and-time-format.html - https://en.wikipedia.org/wiki/ISO_8601 For linear policy, backoff delay is backoffDelay*. For exponential policy, backoff delay is backoffDelay*2^.' + type: string + backoffPolicy: + description: BackoffPolicy is the retry backoff policy (linear, exponential). + type: string + deadLetterSink: + description: DeadLetterSink is the sink receiving event that could not be sent to a destination. + type: object + properties: + ref: + description: Ref points to an Addressable. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + uri: + description: URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref. + type: string + retry: + description: Retry is the minimum number of retries the sender should attempt when sending an event before moving it to the dead letter sink. + type: integer + format: int32 + status: + description: Status represents the current state of the Broker. This data may be out of date. + type: object + properties: + address: + description: Broker is Addressable. It exposes the endpoint as an URI to get events delivered into the Broker mesh. + type: object + properties: + url: + type: string + annotations: + description: Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards. + type: object + x-kubernetes-preserve-unknown-fields: true + conditions: + description: Conditions the latest available observations of a resource's current state. + type: array + items: + type: object + required: + - type + - status + properties: + lastTransitionTime: + description: 'LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant).' + type: string + message: + description: 'A human readable message indicating details about the transition.' + type: string + reason: + description: 'The reason for the condition''s last transition.' + type: string + severity: + description: 'Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error.' + type: string + status: + description: 'Status of the condition, one of True, False, Unknown.' + type: string + type: + description: 'Type of condition.' + type: string + observedGeneration: + description: ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. + type: integer + format: int64 + additionalPrinterColumns: + - name: URL + type: string + jsonPath: .status.address.url + - name: Age + type: date + jsonPath: .metadata.creationTimestamp + - name: Ready + type: string + jsonPath: ".status.conditions[?(@.type==\"Ready\")].status" + - name: Reason + type: string + jsonPath: ".status.conditions[?(@.type==\"Ready\")].reason" + names: + kind: Broker + plural: brokers + singular: broker + categories: + - all + - knative + - eventing + scope: Namespaced +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: channels.messaging.knative.dev + labels: + eventing.knative.dev/release: devel + knative.dev/crd-install: "true" + messaging.knative.dev/subscribable: "true" + duck.knative.dev/addressable: "true" +spec: + group: messaging.knative.dev + versions: + - name: v1 + served: true + storage: true + subresources: + status: {} + additionalPrinterColumns: + - name: URL + type: string + jsonPath: .status.address.url + - name: Age + type: date + jsonPath: .metadata.creationTimestamp + - name: Ready + type: string + jsonPath: ".status.conditions[?(@.type==\"Ready\")].status" + - name: Reason + type: string + jsonPath: ".status.conditions[?(@.type==\"Ready\")].reason" + schema: + openAPIV3Schema: + description: 'Channel represents a generic Channel. It is normally used when we want a Channel, but do not need a specific Channel implementation.' + type: object + properties: + spec: + description: Spec defines the desired state of the Channel. + type: object + properties: + channelTemplate: + description: ChannelTemplate specifies which Channel CRD to use to create the CRD Channel backing this Channel. This is immutable after creation. Normally this is set by the Channel defaulter, not directly by the user. + type: object + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + spec: + description: Spec defines the Spec to use for each channel created. Passed in verbatim to the Channel CRD as Spec section. + type: object + x-kubernetes-preserve-unknown-fields: true + delivery: + description: DeliverySpec contains the default delivery spec for each subscription to this Channelable. Each subscription delivery spec, if any, overrides this global delivery spec. + type: object + properties: + backoffDelay: + description: 'BackoffDelay is the delay before retrying. More information on Duration format: - https://www.iso.org/iso-8601-date-and-time-format.html - https://en.wikipedia.org/wiki/ISO_8601 For linear policy, backoff delay is backoffDelay*. For exponential policy, backoff delay is backoffDelay*2^.' + type: string + backoffPolicy: + description: BackoffPolicy is the retry backoff policy (linear, exponential). + type: string + deadLetterSink: + description: DeadLetterSink is the sink receiving event that could not be sent to a destination. + type: object + properties: + ref: + description: Ref points to an Addressable. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + uri: + description: URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref. + type: string + retry: + description: Retry is the minimum number of retries the sender should attempt when sending an event before moving it to the dead letter sink. + type: integer + format: int32 + subscribers: + description: This is the list of subscriptions for this subscribable. + type: array + items: + type: object + properties: + delivery: + description: DeliverySpec contains options controlling the event delivery + type: object + properties: + backoffDelay: + description: 'BackoffDelay is the delay before retrying. More information on Duration format: - https://www.iso.org/iso-8601-date-and-time-format.html - https://en.wikipedia.org/wiki/ISO_8601 For linear policy, backoff delay is backoffDelay*. For exponential policy, backoff delay is backoffDelay*2^.' + type: string + backoffPolicy: + description: BackoffPolicy is the retry backoff policy (linear, exponential). + type: string + deadLetterSink: + description: DeadLetterSink is the sink receiving event that could not be sent to a destination. + type: object + properties: + ref: + description: Ref points to an Addressable. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + uri: + description: URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref. + type: string + retry: + description: Retry is the minimum number of retries the sender should attempt when sending an event before moving it to the dead letter sink. + type: integer + format: int32 + generation: + description: Generation of the origin of the subscriber with uid:UID. + type: integer + format: int64 + replyUri: + description: ReplyURI is the endpoint for the reply + type: string + subscriberUri: + description: SubscriberURI is the endpoint for the subscriber + type: string + uid: + description: UID is used to understand the origin of the subscriber. + type: string + status: + description: Status represents the current state of the Channel. This data may be out of date. + type: object + properties: + address: + type: object + properties: + url: + type: string + annotations: + description: Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards. + type: object + x-kubernetes-preserve-unknown-fields: true + channel: + description: Channel is an KReference to the Channel CRD backing this Channel. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + conditions: + description: Conditions the latest available observations of a resource's current state. + type: array + items: + type: object + required: + - type + - status + properties: + lastTransitionTime: + description: LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant). + type: string + message: + description: A human readable message indicating details about the transition. + type: string + reason: + description: The reason for the condition's last transition. + type: string + severity: + description: Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition. + type: string + deadLetterChannel: + description: DeadLetterChannel is a KReference and is set by the channel when it supports native error handling via a channel Failed messages are delivered here. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + observedGeneration: + description: ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. + type: integer + format: int64 + subscribers: + description: This is the list of subscription's statuses for this channel. + type: array + items: + type: object + properties: + message: + description: A human readable message indicating details of Ready status. + type: string + observedGeneration: + description: Generation of the origin of the subscriber with uid:UID. + type: integer + format: int64 + ready: + description: Status of the subscriber. + type: string + uid: + description: UID is used to understand the origin of the subscriber. + type: string + names: + kind: Channel + plural: channels + singular: channel + categories: + - all + - knative + - messaging + - channel + shortNames: + - ch + scope: Namespaced +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + labels: + eventing.knative.dev/release: devel + eventing.knative.dev/source: "true" + duck.knative.dev/source: "true" + knative.dev/crd-install: "true" + name: containersources.sources.knative.dev +spec: + group: sources.knative.dev + versions: + - name: v1 + served: true + storage: true + subresources: + status: {} + schema: + openAPIV3Schema: + description: 'ContainerSource is an event source that starts a container image which generates events under certain situations and sends messages to a sink URI' + type: object + properties: + spec: + type: object + properties: + ceOverrides: + description: CloudEventOverrides defines overrides to control the output format and modifications of the event sent to the sink. + type: object + properties: + extensions: + description: Extensions specify what attribute are added or overridden on the outbound event. Each `Extensions` key-value pair are set on the event as an attribute extension independently. + type: object + x-kubernetes-preserve-unknown-fields: true + sink: + description: Sink is a reference to an object that will resolve to a uri to use as the sink. + type: object + properties: + ref: + description: Ref points to an Addressable. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + uri: + description: URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref. + type: string + template: + type: object + x-kubernetes-preserve-unknown-fields: true + description: 'A template in the shape of `Deployment.spec.template` to be used for this ContainerSource. More info: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/' + status: + type: object + properties: + annotations: + description: Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards. + type: object + x-kubernetes-preserve-unknown-fields: true + ceAttributes: + description: CloudEventAttributes are the specific attributes that the Source uses as part of its CloudEvents. + type: array + items: + type: object + properties: + source: + description: Source is the CloudEvents source attribute. + type: string + type: + description: Type refers to the CloudEvent type attribute. + type: string + conditions: + description: Conditions the latest available observations of a resource's current state. + type: array + items: + type: object + required: + - type + - status + properties: + lastTransitionTime: + description: LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant). + type: string + message: + description: A human readable message indicating details about the transition. + type: string + reason: + description: The reason for the condition's last transition. + type: string + severity: + description: Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition. + type: string + observedGeneration: + description: ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. + type: integer + format: int64 + sinkUri: + description: SinkURI is the current active sink URI that has been configured for the Source. + type: string + additionalPrinterColumns: + - name: Sink + type: string + jsonPath: ".status.sinkUri" + - name: Age + type: date + jsonPath: .metadata.creationTimestamp + - name: Ready + type: string + jsonPath: ".status.conditions[?(@.type==\"Ready\")].status" + - name: Reason + type: string + jsonPath: ".status.conditions[?(@.type=='Ready')].reason" + names: + categories: + - all + - knative + - sources + kind: ContainerSource + plural: containersources + singular: containersource + scope: Namespaced +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: eventtypes.eventing.knative.dev + labels: + eventing.knative.dev/release: devel + knative.dev/crd-install: "true" +spec: + group: eventing.knative.dev + versions: + - name: v1beta1 + served: true + storage: true + subresources: + status: {} + schema: + openAPIV3Schema: + type: object + description: 'EventType represents a type of event that can be consumed from a Broker.' + properties: + spec: + description: 'Spec defines the desired state of the EventType.' + type: object + properties: + broker: + type: string + description: + description: 'Description is an optional field used to describe the + EventType, in any meaningful way.' + type: string + schema: + description: 'Schema is a URI, it represents the CloudEvents schemaurl + extension attribute. It may be a JSON schema, a protobuf schema, + etc. It is optional.' + type: string + schemaData: + description: 'SchemaData allows the CloudEvents schema to be stored + directly in the EventType. Content is dependent on the encoding. + Optional attribute. The contents are not validated or manipulated + by the system.' + type: string + source: + description: 'Source is a URI, it represents the CloudEvents source.' + type: string + type: + description: 'Type represents the CloudEvents type. It is authoritative.' + type: string + status: + description: 'Status represents the current state of the EventType. This data + may be out of date.' + type: object + properties: + annotations: + description: 'Annotations is additional Status fields for the Resource + to save some additional State as well as convey more information + to the user. This is roughly akin to Annotations on any k8s resource, + just the reconciler conveying richer information outwards.' + type: object + x-kubernetes-preserve-unknown-fields: true + conditions: + description: 'Conditions the latest available observations of a resource''s + current state.' + type: array + items: + type: object + required: + - type + - status + properties: + lastTransitionTime: + description: 'LastTransitionTime is the last time the condition + transitioned from one status to another. We use VolatileTime + in place of metav1.Time to exclude this from creating + equality.Semantic differences (all other things held + constant).' + type: string + message: + description: 'A human readable message indicating details + about the transition.' + type: string + reason: + description: 'The reason for the condition''s last transition.' + type: string + severity: + description: 'Severity with which to treat failures of + this type of condition. When this is not specified, + it defaults to Error.' + type: string + status: + description: 'Status of the condition, one of True, False, + Unknown.' + type: string + type: + description: 'Type of condition.' + type: string + observedGeneration: + description: 'ObservedGeneration is the ''Generation'' of the Service + that was last processed by the controller.' + type: integer + format: int64 + additionalPrinterColumns: + - name: Type + type: string + jsonPath: ".spec.type" + - name: Source + type: string + jsonPath: ".spec.source" + - name: Schema + type: string + jsonPath: ".spec.schema" + - name: Broker + type: string + jsonPath: ".spec.broker" + - name: Description + type: string + jsonPath: ".spec.description" + - name: Ready + type: string + jsonPath: ".status.conditions[?(@.type==\"Ready\")].status" + - name: Reason + type: string + jsonPath: ".status.conditions[?(@.type==\"Ready\")].reason" + names: + kind: EventType + plural: eventtypes + singular: eventtype + categories: + - all + - knative + - eventing + scope: Namespaced +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: parallels.flows.knative.dev + labels: + eventing.knative.dev/release: devel + knative.dev/crd-install: "true" + duck.knative.dev/addressable: "true" +spec: + group: flows.knative.dev + versions: + - name: v1 + served: true + storage: true + subresources: + status: {} + schema: + openAPIV3Schema: + description: 'Parallel defines conditional branches that will be wired in series through Channels and Subscriptions.' + type: object + properties: + spec: + description: Spec defines the desired state of the Parallel. + type: object + properties: + branches: + description: Branches is the list of Filter/Subscribers pairs. + type: array + items: + type: object + x-kubernetes-preserve-unknown-fields: true + properties: + delivery: + description: Delivery is the delivery specification for + events to the subscriber This includes things like + retries, DLQ, etc. + type: object + properties: + backoffDelay: + description: 'BackoffDelay is the delay before + retrying. More information on Duration format: + - https://www.iso.org/iso-8601-date-and-time-format.html + - https://en.wikipedia.org/wiki/ISO_8601 For + linear policy, backoff delay is backoffDelay*. + For exponential policy, backoff delay is + backoffDelay*2^.' + type: string + backoffPolicy: + description: BackoffPolicy is the retry backoff + policy (linear, exponential). + type: string + deadLetterSink: + description: DeadLetterSink is the sink receiving + event that could not be sent to a destination. + type: object + properties: &addressableProperties + ref: + description: Ref points to an Addressable. + type: object + properties: + apiVersion: + description: API version of the + referent. + type: string + kind: + description: 'Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the + referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + This is optional field, it + gets defaulted to the object + holding it if left out.' + type: string + uri: + description: URI can be an absolute URL(non-empty + scheme and non-empty host) pointing + to the target or a relative URI. Relative + URIs will be resolved using the base + URI retrieved from Ref. + type: string + retry: + description: Retry is the minimum number of retries + the sender should attempt when sending an + event before moving it to the dead letter + sink. + type: integer + format: int32 + filter: + description: Filter is the expression guarding the branch + type: object + properties: + <<: *addressableProperties + reply: + description: Reply is a Reference to where the result + of Subscriber of this case gets sent to. If not specified, + sent the result to the Parallel Reply + type: object + properties: + <<: *addressableProperties + subscriber: + description: Subscriber receiving the event when the filter + passes + type: object + properties: + <<: *addressableProperties + channelTemplate: + description: ChannelTemplate specifies which Channel CRD to use. If + left unspecified, it is set to the default Channel CRD for the + namespace (or cluster, in case there are no defaults for the namespace). + type: object + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST + resource this object represents. Servers may infer this + from the endpoint the client submits requests to. Cannot + be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + spec: + description: Spec defines the Spec to use for each channel + created. Passed in verbatim to the Channel CRD as Spec + section. + type: object + x-kubernetes-preserve-unknown-fields: true + reply: + description: Reply is a Reference to where the result of a case Subscriber + gets sent to when the case does not have a Reply + type: object + properties: + <<: *addressableProperties + status: + description: Status represents the current state of the Parallel. This data + may be out of date. + type: object + properties: + address: + type: object + properties: + url: + type: string + annotations: + description: Annotations is additional Status fields for the Resource + to save some additional State as well as convey more information + to the user. This is roughly akin to Annotations on any k8s resource, + just the reconciler conveying richer information outwards. + type: object + x-kubernetes-preserve-unknown-fields: true + branchStatuses: + description: BranchStatuses is an array of corresponding to branch + statuses. Matches the Spec.Branches array in the order. + type: array + items: + type: object + properties: + filterChannelStatus: + description: FilterChannelStatus corresponds to the filter + channel status. + type: object + properties: &channelProperties + channel: + description: Channel is the reference to the underlying + channel. + type: object + properties: &referentProperties + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece + of an object instead of an entire + object, this string should contain + a valid JSON/Go field access statement, + such as desiredState.manifest.containers[2]. + For example, if the object reference + is to a container within a pod, this + would take on a value like: "spec.containers{name}" + (where "name" refers to the name of + the container that triggered the event) + or if no container name is specified + "spec.containers[2]" (container with + index 2 in this pod). This syntax + is chosen only to have some well-defined + way of referencing a part of an object.' + type: string + kind: + description: 'Kind of the referent. More + info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion + to which this reference is made, if + any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + ready: + description: ReadyCondition indicates whether + the Channel is ready or not. + type: object + x-kubernetes-preserve-unknown-fields: true + properties: &readyConditionProperties + message: + description: A human readable message + indicating details about the transition. + type: string + reason: + description: The reason for the condition's + last transition. + type: string + severity: + description: Severity with which to treat + failures of this type of condition. + When this is not specified, it defaults + to Error. + type: string + status: + description: Status of the condition, + one of True, False, Unknown. + type: string + type: + description: Type of condition. + type: string + filterSubscriptionStatus: + description: FilterSubscriptionStatus corresponds to the + filter subscription status. + type: object + properties: + ready: + description: ReadyCondition indicates whether + the Subscription is ready or not. + type: object + properties: + <<: *readyConditionProperties + subscription: + description: Subscription is the reference to + the underlying Subscription. + type: object + properties: + <<: *referentProperties + subscriberSubscriptionStatus: + description: SubscriptionStatus corresponds to the subscriber + subscription status. + type: object + properties: + ready: + description: ReadyCondition indicates whether + the Subscription is ready or not. + type: object + properties: + <<: *readyConditionProperties + subscription: + description: Subscription is the reference to + the underlying Subscription. + type: object + properties: + <<: *referentProperties + conditions: + description: Conditions the latest available observations of a resource's + current state. + type: array + items: + type: object + properties: + <<: *readyConditionProperties + ingressChannelStatus: + description: IngressChannelStatus corresponds to the ingress channel + status. + type: object + properties: + <<: *channelProperties + observedGeneration: + description: ObservedGeneration is the 'Generation' of the Service + that was last processed by the controller. + type: integer + format: int64 + additionalPrinterColumns: + - name: URL + type: string + jsonPath: .status.address.url + - name: Age + type: date + jsonPath: .metadata.creationTimestamp + - name: Ready + type: string + jsonPath: ".status.conditions[?(@.type==\"Ready\")].status" + - name: Reason + type: string + jsonPath: ".status.conditions[?(@.type==\"Ready\")].reason" + names: + kind: Parallel + plural: parallels + singular: parallel + categories: + - all + - knative + - flows + scope: Namespaced +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + labels: + eventing.knative.dev/release: devel + eventing.knative.dev/source: "true" + duck.knative.dev/source: "true" + knative.dev/crd-install: "true" + annotations: + registry.knative.dev/eventTypes: | + [ + { "type": "dev.knative.sources.ping" } + ] + name: pingsources.sources.knative.dev +spec: + group: sources.knative.dev + versions: + - &version + name: v1beta2 + served: true + storage: false + subresources: + status: {} + schema: + openAPIV3Schema: + type: object + description: 'PingSource describes an event source with a fixed payload produced on a specified cron schedule.' + properties: + spec: + type: object + description: 'PingSourceSpec defines the desired state of the PingSource (from the client).' + properties: + ceOverrides: + description: 'CloudEventOverrides defines overrides to control the + output format and modifications of the event sent to the sink.' + type: object + properties: + extensions: + description: 'Extensions specify what attribute are added or + overridden on the outbound event. Each `Extensions` key-value + pair are set on the event as an attribute extension independently.' + type: object + additionalProperties: + type: string + x-kubernetes-preserve-unknown-fields: true + contentType: + description: 'ContentType is the media type of `data` or `dataBase64`. Default is empty.' + type: string + data: + description: 'Data is data used as the body of the event posted to the sink. Default is empty. + Mutually exclusive with `dataBase64`.' + type: string + dataBase64: + description: "DataBase64 is the base64-encoded string of the actual event's body posted to the sink. + Default is empty. Mutually exclusive with `data`." + type: string + schedule: + description: 'Schedule is the cron schedule. Defaults to `* * * * *`.' + type: string + sink: + description: 'Sink is a reference to an object that will resolve to + a uri to use as the sink.' + type: object + properties: + ref: + description: 'Ref points to an Addressable.' + type: object + properties: + apiVersion: + description: 'API version of the referent.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + This is optional field, it gets defaulted to the + object holding it if left out.' + type: string + uri: + description: 'URI can be an absolute URL(non-empty scheme and + non-empty host) pointing to the target or a relative URI. + Relative URIs will be resolved using the base URI retrieved + from Ref.' + type: string + timezone: + description: 'Timezone modifies the actual time relative to the specified + timezone. Defaults to the system time zone. More general information + about time zones: https://www.iana.org/time-zones List of valid + timezone values: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones' + type: string + status: + type: object + description: 'PingSourceStatus defines the observed state of PingSource (from the controller).' + properties: + annotations: + description: 'Annotations is additional Status fields for the Resource + to save some additional State as well as convey more information + to the user. This is roughly akin to Annotations on any k8s resource, + just the reconciler conveying richer information outwards.' + type: object + x-kubernetes-preserve-unknown-fields: true + ceAttributes: + description: 'CloudEventAttributes are the specific attributes that + the Source uses as part of its CloudEvents.' + type: array + items: + type: object + properties: + source: + description: 'Source is the CloudEvents source attribute.' + type: string + type: + description: 'Type refers to the CloudEvent type attribute.' + type: string + conditions: + description: 'Conditions the latest available observations of a resource''s + current state.' + type: array + items: + type: object + required: + - type + - status + properties: + lastTransitionTime: + description: 'LastTransitionTime is the last time the condition + transitioned from one status to another. We use VolatileTime + in place of metav1.Time to exclude this from creating + equality.Semantic differences (all other things held + constant).' + type: string + message: + description: 'A human readable message indicating details + about the transition.' + type: string + reason: + description: 'The reason for the condition''s last transition.' + type: string + severity: + description: 'Severity with which to treat failures of + this type of condition. When this is not specified, + it defaults to Error.' + type: string + status: + description: 'Status of the condition, one of True, False, + Unknown.' + type: string + type: + description: 'Type of condition.' + type: string + observedGeneration: + description: 'ObservedGeneration is the "Generation" of the Service + that was last processed by the controller.' + type: integer + format: int64 + sinkUri: + description: 'SinkURI is the current active sink URI that has been + configured for the Source.' + type: string + additionalPrinterColumns: + - name: Sink + type: string + jsonPath: .status.sinkUri + - name: Schedule + type: string + jsonPath: .spec.schedule + - name: Age + type: date + jsonPath: .metadata.creationTimestamp + - name: Ready + type: string + jsonPath: ".status.conditions[?(@.type=='Ready')].status" + - name: Reason + type: string + jsonPath: ".status.conditions[?(@.type=='Ready')].reason" + - <<: *version + name: v1 + served: true + storage: true + names: + categories: + - all + - knative + - sources + kind: PingSource + plural: pingsources + singular: pingsource + scope: Namespaced + conversion: + strategy: Webhook + webhook: + conversionReviewVersions: ["v1", "v1beta1"] + clientConfig: + service: + name: eventing-webhook + namespace: knative-eventing +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: sequences.flows.knative.dev + labels: + eventing.knative.dev/release: devel + knative.dev/crd-install: "true" + duck.knative.dev/addressable: "true" +spec: + group: flows.knative.dev + versions: + - name: v1 + served: true + storage: true + subresources: + status: {} + schema: + openAPIV3Schema: + description: 'Sequence defines a sequence of Subscribers that will be wired in series through Channels and Subscriptions.' + type: object + properties: + spec: + description: Spec defines the desired state of the Sequence. + type: object + properties: + channelTemplate: + description: ChannelTemplate specifies which Channel CRD to use. If left unspecified, it is set to the default Channel CRD for the namespace (or cluster, in case there are no defaults for the namespace). + type: object + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + spec: + description: Spec defines the Spec to use for each channel created. Passed in verbatim to the Channel CRD as Spec section. + type: string + reply: + description: Reply is a Reference to where the result of the last Subscriber gets sent to. + type: object + properties: + ref: + description: Ref points to an Addressable. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + uri: + description: URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref. + type: string + steps: + description: Steps is the list of Destinations (processors / functions) that will be called in the order provided. Each step has its own delivery options + type: array + items: + type: object + properties: + delivery: + description: Delivery is the delivery specification for events to the subscriber This includes things like retries, DLQ, etc. + type: object + properties: + backoffDelay: + description: 'BackoffDelay is the delay before retrying. More information on Duration format: - https://www.iso.org/iso-8601-date-and-time-format.html - https://en.wikipedia.org/wiki/ISO_8601 For linear policy, backoff delay is backoffDelay*. For exponential policy, backoff delay is backoffDelay*2^.' + type: string + backoffPolicy: + description: BackoffPolicy is the retry backoff policy (linear, exponential). + type: string + deadLetterSink: + description: DeadLetterSink is the sink receiving event that could not be sent to a destination. + type: object + properties: + ref: + description: Ref points to an Addressable. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + uri: + description: URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref. + type: string + retry: + description: Retry is the minimum number of retries the sender should attempt when sending an event before moving it to the dead letter sink. + type: integer + format: int32 + ref: + description: Ref points to an Addressable. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + uri: + description: URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref. + type: string + status: + description: Status represents the current state of the Sequence. This data may be out of date. + type: object + properties: + address: + type: object + required: + - url + properties: + url: + type: string + annotations: + description: Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards. + type: object + x-kubernetes-preserve-unknown-fields: true + channelStatuses: + description: ChannelStatuses is an array of corresponding Channel statuses. Matches the Spec.Steps array in the order. + type: array + items: + type: object + properties: + channel: + description: Channel is the reference to the underlying channel. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + ready: + description: ReadyCondition indicates whether the Channel is ready or not. + type: object + required: + - type + - status + properties: + lastTransitionTime: + description: LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant). + type: string + message: + description: A human readable message indicating details about the transition. + type: string + reason: + description: The reason for the condition's last transition. + type: string + severity: + description: Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition. + type: string + conditions: + description: Conditions the latest available observations of a resource's current state. + type: array + items: + type: object + required: + - type + - status + properties: + lastTransitionTime: + description: LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant). + type: string + message: + description: A human readable message indicating details about the transition. + type: string + reason: + description: The reason for the condition's last transition. + type: string + severity: + description: Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition. + type: string + observedGeneration: + description: ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. + type: integer + format: int64 + subscriptionStatuses: + description: SubscriptionStatuses is an array of corresponding Subscription statuses. Matches the Spec.Steps array in the order. + type: array + items: + type: object + properties: + ready: + description: ReadyCondition indicates whether the Subscription is ready or not. + type: object + required: + - type + - status + properties: + lastTransitionTime: + description: LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant). + type: string + message: + description: A human readable message indicating details about the transition. + type: string + reason: + description: The reason for the condition's last transition. + type: string + severity: + description: Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition. + type: string + subscription: + description: Subscription is the reference to the underlying Subscription. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + additionalPrinterColumns: + - name: URL + type: string + jsonPath: .status.address.url + - name: Age + type: date + jsonPath: .metadata.creationTimestamp + - name: Ready + type: string + jsonPath: ".status.conditions[?(@.type==\"Ready\")].status" + - name: Reason + type: string + jsonPath: ".status.conditions[?(@.type==\"Ready\")].reason" + names: + kind: Sequence + plural: sequences + singular: sequence + categories: + - all + - knative + - flows + scope: Namespaced +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + labels: + eventing.knative.dev/release: devel + eventing.knative.dev/source: "true" + duck.knative.dev/source: "true" + duck.knative.dev/binding: "true" + knative.dev/crd-install: "true" + name: sinkbindings.sources.knative.dev +spec: + group: sources.knative.dev + versions: + - name: v1 + served: true + storage: true + subresources: + status: {} + schema: + openAPIV3Schema: + description: 'SinkBinding describes a Binding that is also a Source. + The `sink` (from the Source duck) is resolved to a URL and + then projected into the `subject` by augmenting the runtime + contract of the referenced containers to have a `K_SINK` + environment variable holding the endpoint to which to send + cloud events.' + type: object + properties: + spec: + type: object + properties: + ceOverrides: + description: CloudEventOverrides defines overrides to control the output format and modifications of the event sent to the sink. + type: object + properties: + extensions: + description: Extensions specify what attribute are added or overridden on the outbound event. Each `Extensions` key-value pair are set on the event as an attribute extension independently. + type: object + x-kubernetes-preserve-unknown-fields: true + sink: + description: Sink is a reference to an object that will resolve to a uri to use as the sink. + type: object + properties: + ref: + description: Ref points to an Addressable. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + uri: + description: URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref. + type: string + subject: + description: Subject references the resource(s) whose "runtime contract" should be augmented by Binding implementations. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: Kind of the referent. + type: string + name: + description: Name of the referent. Mutually exclusive with Selector. + type: string + namespace: + description: Namespace of the referent. + type: string + selector: + description: Selector of the referents. Mutually exclusive with Name. + type: object + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + type: array + items: + type: object + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + type: array + items: + type: string + matchLabels: + description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + x-kubernetes-preserve-unknown-fields: true + status: + type: object + properties: + annotations: + description: Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards. + type: object + x-kubernetes-preserve-unknown-fields: true + ceAttributes: + description: CloudEventAttributes are the specific attributes that the Source uses as part of its CloudEvents. + type: array + items: + type: object + properties: + source: + description: Source is the CloudEvents source attribute. + type: string + type: + description: Type refers to the CloudEvent type attribute. + type: string + conditions: + description: Conditions the latest available observations of a resource's current state. + type: array + items: + type: object + required: + - type + - status + properties: + lastTransitionTime: + description: LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant). + type: string + message: + description: A human readable message indicating details about the transition. + type: string + reason: + description: The reason for the condition's last transition. + type: string + severity: + description: Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition. + type: string + observedGeneration: + description: ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. + type: integer + format: int64 + sinkUri: + description: SinkURI is the current active sink URI that has been configured for the Source. + type: string + additionalPrinterColumns: + - name: Sink + type: string + jsonPath: ".status.sinkUri" + - name: Age + type: date + jsonPath: .metadata.creationTimestamp + - name: Ready + type: string + jsonPath: ".status.conditions[?(@.type=='Ready')].status" + - name: Reason + type: string + jsonPath: ".status.conditions[?(@.type=='Ready')].reason" + names: + categories: + - all + - knative + - sources + - bindings + kind: SinkBinding + plural: sinkbindings + singular: sinkbinding + scope: Namespaced +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: subscriptions.messaging.knative.dev + labels: + eventing.knative.dev/release: devel + knative.dev/crd-install: "true" +spec: + group: messaging.knative.dev + versions: + - name: v1 + served: true + storage: true + subresources: + status: {} + schema: + openAPIV3Schema: + description: 'Subscription routes events received on a Channel to a DNS name and corresponds to the subscriptions.channels.knative.dev CRD.' + type: object + properties: + spec: + type: object + properties: + channel: + description: 'Reference to a channel that will be used to create the subscription. You can specify only the following fields of the KReference: kind, apiVersion and name. The resource pointed by this KReference must meet the contract to the ChannelableSpec duck type. If the resource does not meet this contract it will be reflected in the Subscription''s status. This field is immutable. We have no good answer on what happens to the events that are currently in the channel being consumed from and what the semantics there should be. For now, you can always delete the Subscription and recreate it to point to a different channel, giving the user more control over what semantics should be used (drain the channel first, possibly have events dropped, etc.)' + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + delivery: + description: Delivery configuration + type: object + properties: + backoffDelay: + description: 'BackoffDelay is the delay before retrying. More information on Duration format: - https://www.iso.org/iso-8601-date-and-time-format.html - https://en.wikipedia.org/wiki/ISO_8601 For linear policy, backoff delay is backoffDelay*. For exponential policy, backoff delay is backoffDelay*2^.' + type: string + backoffPolicy: + description: BackoffPolicy is the retry backoff policy (linear, exponential). + type: string + deadLetterSink: + description: DeadLetterSink is the sink receiving event that could not be sent to a destination. + type: object + properties: + ref: + description: Ref points to an Addressable. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + uri: + description: URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref. + type: string + retry: + description: Retry is the minimum number of retries the sender should attempt when sending an event before moving it to the dead letter sink. + type: integer + format: int32 + reply: + description: Reply specifies (optionally) how to handle events returned from the Subscriber target. + type: object + properties: + ref: + description: Ref points to an Addressable. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + uri: + description: URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref. + type: string + subscriber: + description: Subscriber is reference to (optional) function for processing events. Events from the Channel will be delivered here and replies are sent to a Destination as specified by the Reply. + type: object + properties: + ref: + description: Ref points to an Addressable. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + uri: + description: URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref. + type: string + status: + type: object + properties: + annotations: + description: Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards. + type: object + x-kubernetes-preserve-unknown-fields: true + conditions: + description: Conditions the latest available observations of a resource's current state. + type: array + items: + type: object + required: + - type + - status + properties: + lastTransitionTime: + description: LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant). + type: string + message: + description: A human readable message indicating details about the transition. + type: string + reason: + description: The reason for the condition's last transition. + type: string + severity: + description: Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition. + type: string + observedGeneration: + description: ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. + type: integer + format: int64 + physicalSubscription: + description: PhysicalSubscription is the fully resolved values that this Subscription represents. + type: object + properties: + deadLetterSinkUri: + description: ReplyURI is the fully resolved URI for the spec.delivery.deadLetterSink. + type: string + replyUri: + description: ReplyURI is the fully resolved URI for the spec.reply. + type: string + subscriberUri: + description: SubscriberURI is the fully resolved URI for spec.subscriber. + type: string + additionalPrinterColumns: + - name: Age + type: date + jsonPath: .metadata.creationTimestamp + - name: Ready + type: string + jsonPath: ".status.conditions[?(@.type==\"Ready\")].status" + - name: Reason + type: string + jsonPath: ".status.conditions[?(@.type==\"Ready\")].reason" + names: + kind: Subscription + plural: subscriptions + singular: subscription + categories: + - all + - knative + - messaging + shortNames: + - sub + scope: Namespaced +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: triggers.eventing.knative.dev + labels: + eventing.knative.dev/release: devel + knative.dev/crd-install: "true" +spec: + group: eventing.knative.dev + versions: + - name: v1 + served: true + storage: true + subresources: + status: {} + additionalPrinterColumns: + - name: Broker + type: string + jsonPath: .spec.broker + - name: Subscriber_URI + type: string + jsonPath: .status.subscriberUri + - name: Age + type: date + jsonPath: .metadata.creationTimestamp + - name: Ready + type: string + jsonPath: ".status.conditions[?(@.type==\"Ready\")].status" + - name: Reason + type: string + jsonPath: ".status.conditions[?(@.type==\"Ready\")].reason" + schema: + openAPIV3Schema: + description: 'Trigger represents a request to have events delivered to a subscriber from a Broker''s event pool.' + type: object + properties: + spec: + description: Spec defines the desired state of the Trigger. + type: object + properties: + broker: + description: Broker is the broker that this trigger receives events from. + type: string + delivery: + description: Delivery contains the delivery spec for this specific trigger. + type: object + properties: + backoffDelay: + description: 'BackoffDelay is the delay before retrying. More information on Duration format: - https://www.iso.org/iso-8601-date-and-time-format.html - https://en.wikipedia.org/wiki/ISO_8601 For linear policy, backoff delay is backoffDelay*. For exponential policy, backoff delay is backoffDelay*2^.' + type: string + backoffPolicy: + description: BackoffPolicy is the retry backoff policy (linear, exponential). + type: string + deadLetterSink: + description: DeadLetterSink is the sink receiving event that could not be sent to a destination. + type: object + properties: + ref: + description: Ref points to an Addressable. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + uri: + description: URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref. + type: string + retry: + description: Retry is the minimum number of retries the sender should attempt when sending an event before moving it to the dead letter sink. + type: integer + format: int32 + filter: + description: 'Filter is the filter to apply against all events from the Broker. Only events that pass this filter will be sent to the Subscriber. If not specified, will default to allowing all events. ' + type: object + properties: + attributes: + description: 'Attributes filters events by exact match on event context attributes. Each key in the map is compared with the equivalent key in the event context. An event passes the filter if all values are equal to the specified values. Nested context attributes are not supported as keys. Only string values are supported. ' + type: object + x-kubernetes-preserve-unknown-fields: true + subscriber: + description: Subscriber is the addressable that receives events from the Broker that pass the Filter. It is required. + type: object + properties: + ref: + description: Ref points to an Addressable. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + uri: + description: URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref. + type: string + status: + description: Status represents the current state of the Trigger. This data may be out of date. + type: object + properties: + annotations: + description: Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards. + type: object + x-kubernetes-preserve-unknown-fields: true + conditions: + description: Conditions the latest available observations of a resource's current state. + type: array + items: + type: object + required: + - type + - status + properties: + lastTransitionTime: + description: 'LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant).' + type: string + message: + description: 'A human readable message indicating details about the transition.' + type: string + reason: + description: 'The reason for the condition''s last transition.' + type: string + severity: + description: 'Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error.' + type: string + status: + description: 'Status of the condition, one of True, False, Unknown.' + type: string + type: + description: 'Type of condition.' + type: string + observedGeneration: + description: ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. + type: integer + format: int64 + subscriberUri: + description: SubscriberURI is the resolved URI of the receiver for this Trigger. + type: string + names: + kind: Trigger + plural: triggers + singular: trigger + categories: + - all + - knative + - eventing + scope: Namespaced +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-br-default-channel + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +data: + channelTemplateSpec: | + apiVersion: messaging.knative.dev/v1 + kind: InMemoryChannel +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-br-defaults + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +data: + default-br-config: | + clusterDefault: + brokerClass: MTChannelBasedBroker + apiVersion: v1 + kind: ConfigMap + name: config-br-default-channel + namespace: knative-eventing +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-features + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel + knative.dev/config-propagation: original + knative.dev/config-category: eventing +data: +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-ping-defaults + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel + annotations: + knative.dev/example-checksum: "f8e5a744" +data: + _example: | + dataMaxSize: -1 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: default-ch-webhook + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +data: + default-ch-config: | + clusterDefault: + apiVersion: messaging.knative.dev/v1 + kind: InMemoryChannel + namespaceDefaults: + some-namespace: + apiVersion: messaging.knative.dev/v1 + kind: InMemoryChannel +--- +apiVersion: v1 +kind: Secret +metadata: + name: eventing-webhook-certs + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: eventing-controller + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel + knative.dev/high-availability: "true" +spec: + selector: + matchLabels: + app: eventing-controller + template: + metadata: + labels: + app: eventing-controller + eventing.knative.dev/release: devel + spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: + app: eventing-controller + topologyKey: kubernetes.io/hostname + weight: 100 + serviceAccountName: eventing-controller + enableServiceLinks: false + containers: + - name: eventing-controller + terminationMessagePolicy: FallbackToLogsOnError + image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-controller + resources: + requests: + cpu: 100m + memory: 100Mi + env: + - name: SYSTEM_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: CONFIG_LOGGING_NAME + value: config-logging + - name: CONFIG_OBSERVABILITY_NAME + value: config-observability + - name: METRICS_DOMAIN + value: knative.dev/eventing + - name: APISERVER_RA_IMAGE + value: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-apiserver-receive-adapter + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + securityContext: + allowPrivilegeEscalation: false + ports: + - name: metrics + containerPort: 9090 + - name: profiling + containerPort: 8008 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: pingsource-mt-adapter + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +spec: + replicas: 0 + selector: + matchLabels: &labels + eventing.knative.dev/source: ping-source-controller + sources.knative.dev/role: adapter + template: + metadata: + labels: + <<: *labels + eventing.knative.dev/release: devel + spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: *labels + topologyKey: kubernetes.io/hostname + weight: 100 + enableServiceLinks: false + containers: + - name: dispatcher + image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-mtping + env: + - name: SYSTEM_NAMESPACE + value: '' + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: K_METRICS_CONFIG + value: '' + - name: K_LOGGING_CONFIG + value: '' + - name: K_LEADER_ELECTION_CONFIG + value: '' + - name: K_NO_SHUTDOWN_AFTER + value: '' + - name: K_SINK_TIMEOUT + value: '-1' + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + ports: + - containerPort: 9090 + name: metrics + protocol: TCP + resources: + requests: + cpu: 125m + memory: 64Mi + limits: + cpu: 1000m + memory: 2048Mi + serviceAccountName: pingsource-mt-adapter +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingWebhookConfiguration +metadata: + name: config.webhook.eventing.knative.dev + labels: + eventing.knative.dev/release: devel +webhooks: +- admissionReviewVersions: ["v1", "v1beta1"] + clientConfig: + service: + name: eventing-webhook + namespace: knative-eventing + sideEffects: None + failurePolicy: Ignore + name: config.webhook.eventing.knative.dev + namespaceSelector: + matchExpressions: + - key: eventing.knative.dev/release + operator: Exists + timeoutSeconds: 10 +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: MutatingWebhookConfiguration +metadata: + name: webhook.eventing.knative.dev + labels: + eventing.knative.dev/release: devel +webhooks: +- admissionReviewVersions: ["v1", "v1beta1"] + clientConfig: + service: + name: eventing-webhook + namespace: knative-eventing + sideEffects: None + failurePolicy: Fail + name: webhook.eventing.knative.dev + timeoutSeconds: 10 +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingWebhookConfiguration +metadata: + name: validation.webhook.eventing.knative.dev + labels: + eventing.knative.dev/release: devel +webhooks: +- admissionReviewVersions: ["v1", "v1beta1"] + clientConfig: + service: + name: eventing-webhook + namespace: knative-eventing + sideEffects: None + failurePolicy: Fail + name: validation.webhook.eventing.knative.dev + timeoutSeconds: 10 +--- +apiVersion: v1 +kind: Secret +metadata: + name: eventing-webhook-certs + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: MutatingWebhookConfiguration +metadata: + name: sinkbindings.webhook.sources.knative.dev + labels: + eventing.knative.dev/release: devel +webhooks: +- admissionReviewVersions: ["v1", "v1beta1"] + clientConfig: + service: + name: eventing-webhook + namespace: knative-eventing + failurePolicy: Fail + sideEffects: None + name: sinkbindings.webhook.sources.knative.dev + timeoutSeconds: 10 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: eventing-webhook + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +spec: + selector: + matchLabels: &labels + app: eventing-webhook + role: eventing-webhook + template: + metadata: + labels: *labels + spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: + app: eventing-webhook + topologyKey: kubernetes.io/hostname + weight: 100 + serviceAccountName: eventing-webhook + enableServiceLinks: false + containers: + - name: eventing-webhook + terminationMessagePolicy: FallbackToLogsOnError + image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-webhook + resources: + requests: + cpu: 100m + memory: 50Mi + limits: + cpu: 200m + memory: 200Mi + env: + - name: SYSTEM_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: CONFIG_LOGGING_NAME + value: config-logging + - name: METRICS_DOMAIN + value: knative.dev/eventing + - name: WEBHOOK_NAME + value: eventing-webhook + - name: WEBHOOK_PORT + value: "8443" + - name: SINK_BINDING_SELECTION_MODE + value: "exclusion" + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + securityContext: + allowPrivilegeEscalation: false + ports: + - name: https-webhook + containerPort: 8443 + - name: metrics + containerPort: 9090 + - name: profiling + containerPort: 8008 + readinessProbe: &probe + periodSeconds: 1 + httpGet: + scheme: HTTPS + port: 8443 + httpHeaders: + - name: k-kubelet-probe + value: "webhook" + livenessProbe: + <<: *probe + initialDelaySeconds: 20 + terminationGracePeriodSeconds: 300 +--- +apiVersion: v1 +kind: Service +metadata: + labels: + eventing.knative.dev/release: devel + role: eventing-webhook + name: eventing-webhook + namespace: knative-eventing +spec: + ports: + - name: https-webhook + port: 443 + targetPort: 8443 + selector: + role: eventing-webhook +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-leader-election + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel + annotations: + knative.dev/example-checksum: "96896b00" +data: + _example: | + leaseDuration: "15s" + renewDeadline: "10s" + retryPeriod: "2s" + buckets: "1" +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-logging + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel + knative.dev/config-propagation: original + knative.dev/config-category: eventing +data: + zap-logger-config: | + { + "level": "info", + "development": false, + "outputPaths": ["stdout"], + "errorOutputPaths": ["stderr"], + "encoding": "json", + "encoderConfig": { + "timeKey": "ts", + "levelKey": "level", + "nameKey": "logger", + "callerKey": "caller", + "messageKey": "msg", + "stacktraceKey": "stacktrace", + "lineEnding": "", + "levelEncoder": "", + "timeEncoder": "iso8601", + "durationEncoder": "", + "callerEncoder": "" + } + } + loglevel.controller: "info" + loglevel.webhook: "info" +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-observability + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel + knative.dev/config-propagation: original + knative.dev/config-category: eventing + annotations: + knative.dev/example-checksum: "f46cf09d" +data: + _example: | + metrics.backend-destination: prometheus + metrics.request-metrics-backend-destination: prometheus + metrics.stackdriver-project-id: "" + metrics.allow-stackdriver-custom-metrics: "false" + profiling.enable: "false" + sink-event-error-reporting.enable: "false" +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-tracing + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel + knative.dev/config-propagation: original + knative.dev/config-category: eventing + annotations: + knative.dev/example-checksum: "4002b4c2" +data: + _example: | + backend: "none" + zipkin-endpoint: "http://zipkin.istio-system.svc.cluster.local:9411/api/v2/spans" + stackdriver-project-id: "my-project" + debug: "false" + sample-rate: "0.1" +--- +apiVersion: autoscaling/v2beta2 +kind: HorizontalPodAutoscaler +metadata: + name: eventing-webhook + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: eventing-webhook + minReplicas: 1 + maxReplicas: 5 + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 100 +--- +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: eventing-webhook + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +spec: + minAvailable: 80% + selector: + matchLabels: + app: eventing-webhook +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: sugar-controller + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +spec: + selector: + matchLabels: &labels + eventing.knative.dev/role: sugar-controller + template: + metadata: + labels: *labels + spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: *labels + topologyKey: kubernetes.io/hostname + weight: 100 + serviceAccountName: eventing-controller + enableServiceLinks: false + containers: + - name: controller + image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-sugar-controller + env: + - name: CONFIG_LOGGING_NAME + value: config-logging + - name: CONFIG_OBSERVABILITY_NAME + value: config-observability + - name: METRICS_DOMAIN + value: knative.dev/sugar-controller + - name: SYSTEM_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + securityContext: + allowPrivilegeEscalation: false + ports: + - name: metrics + containerPort: 9090 + - name: profiling + containerPort: 8008 +--- +apiVersion: v1 +kind: Namespace +metadata: + name: knative-eventing + labels: + eventing.knative.dev/release: devel +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: imc-controller + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: imc-controller + labels: + eventing.knative.dev/release: devel +subjects: + - kind: ServiceAccount + name: imc-controller + namespace: knative-eventing +roleRef: + kind: ClusterRole + name: imc-controller + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + namespace: knative-eventing + name: imc-controller + labels: + eventing.knative.dev/release: devel +subjects: + - kind: ServiceAccount + name: imc-controller + namespace: knative-eventing +roleRef: + kind: Role + name: knative-inmemorychannel-webhook + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: imc-dispatcher + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: imc-dispatcher + labels: + eventing.knative.dev/release: devel +subjects: + - kind: ServiceAccount + name: imc-dispatcher + namespace: knative-eventing +roleRef: + kind: ClusterRole + name: imc-dispatcher + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-imc-event-dispatcher + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +data: + MaxIdleConnections: "1000" + MaxIdleConnectionsPerHost: "100" +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-observability + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel + knative.dev/config-propagation: original + knative.dev/config-category: eventing + annotations: + knative.dev/example-checksum: "f46cf09d" +data: + _example: | + metrics.backend-destination: prometheus + metrics.request-metrics-backend-destination: prometheus + metrics.stackdriver-project-id: "" + metrics.allow-stackdriver-custom-metrics: "false" + profiling.enable: "false" + sink-event-error-reporting.enable: "false" +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-tracing + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel + knative.dev/config-propagation: original + knative.dev/config-category: eventing + annotations: + knative.dev/example-checksum: "4002b4c2" +data: + _example: | + backend: "none" + zipkin-endpoint: "http://zipkin.istio-system.svc.cluster.local:9411/api/v2/spans" + stackdriver-project-id: "my-project" + debug: "false" + sample-rate: "0.1" +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: imc-controller + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel + knative.dev/high-availability: "true" +spec: + selector: + matchLabels: &labels + messaging.knative.dev/channel: in-memory-channel + messaging.knative.dev/role: controller + template: + metadata: + labels: *labels + spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: *labels + topologyKey: kubernetes.io/hostname + weight: 100 + serviceAccountName: imc-controller + enableServiceLinks: false + containers: + - name: controller + image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-channel-controller + env: + - name: WEBHOOK_NAME + value: inmemorychannel-webhook + - name: WEBHOOK_PORT + value: "8443" + - name: CONFIG_LOGGING_NAME + value: config-logging + - name: CONFIG_OBSERVABILITY_NAME + value: config-observability + - name: METRICS_DOMAIN + value: knative.dev/inmemorychannel-controller + - name: SYSTEM_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: DISPATCHER_IMAGE + value: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-channel-dispatcher + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + securityContext: + allowPrivilegeEscalation: false + ports: + - name: metrics + containerPort: 9090 + - name: profiling + containerPort: 8008 + - name: https-webhook + containerPort: 8443 + readinessProbe: &probe + periodSeconds: 1 + httpGet: + scheme: HTTPS + port: 8443 + httpHeaders: + - name: k-kubelet-probe + value: "webhook" + livenessProbe: + <<: *probe + initialDelaySeconds: 20 + terminationGracePeriodSeconds: 300 +--- +apiVersion: v1 +kind: Service +metadata: + labels: + eventing.knative.dev/release: devel + name: inmemorychannel-webhook + namespace: knative-eventing +spec: + ports: + - name: https-webhook + port: 443 + targetPort: 8443 + selector: + messaging.knative.dev/channel: in-memory-channel + messaging.knative.dev/role: controller +--- +apiVersion: v1 +kind: Service +metadata: + name: imc-dispatcher + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel + messaging.knative.dev/channel: in-memory-channel + messaging.knative.dev/role: dispatcher +spec: + selector: + messaging.knative.dev/channel: in-memory-channel + messaging.knative.dev/role: dispatcher + ports: + - name: http-dispatcher + port: 80 + protocol: TCP + targetPort: 8080 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: imc-dispatcher + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel + knative.dev/high-availability: "true" +spec: + selector: + matchLabels: &labels + messaging.knative.dev/channel: in-memory-channel + messaging.knative.dev/role: dispatcher + template: + metadata: + labels: *labels + spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: *labels + topologyKey: kubernetes.io/hostname + weight: 100 + serviceAccountName: imc-dispatcher + enableServiceLinks: false + containers: + - name: dispatcher + image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-channel-dispatcher + readinessProbe: &probe + failureThreshold: 3 + httpGet: + path: /healthz + port: 8080 + scheme: HTTP + periodSeconds: 2 + successThreshold: 1 + timeoutSeconds: 1 + livenessProbe: + <<: *probe + initialDelaySeconds: 5 + env: + - name: CONFIG_LOGGING_NAME + value: config-logging + - name: CONFIG_OBSERVABILITY_NAME + value: config-observability + - name: METRICS_DOMAIN + value: knative.dev/inmemorychannel-dispatcher + - name: SYSTEM_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: CONTAINER_NAME + value: dispatcher + - name: MAX_IDLE_CONNS + value: "1000" + - name: MAX_IDLE_CONNS_PER_HOST + value: "1000" + ports: + - containerPort: 8080 + name: http + protocol: TCP + - containerPort: 9090 + name: metrics +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: inmemorychannels.messaging.knative.dev + labels: + eventing.knative.dev/release: devel + knative.dev/crd-install: "true" + messaging.knative.dev/subscribable: "true" + duck.knative.dev/addressable: "true" +spec: + group: messaging.knative.dev + versions: + - name: v1 + served: true + storage: true + subresources: + status: {} + schema: + openAPIV3Schema: + description: 'InMemoryChannel is a resource representing an in memory channel' + type: object + properties: + spec: + description: Spec defines the desired state of the Channel. + type: object + properties: + delivery: + description: DeliverySpec contains the default delivery spec for each subscription to this Channelable. Each subscription delivery spec, if any, overrides this global delivery spec. + type: object + properties: + backoffDelay: + description: 'BackoffDelay is the delay before retrying. More information on Duration format: - https://www.iso.org/iso-8601-date-and-time-format.html - https://en.wikipedia.org/wiki/ISO_8601 For linear policy, backoff delay is backoffDelay*. For exponential policy, backoff delay is backoffDelay*2^.' + type: string + backoffPolicy: + description: BackoffPolicy is the retry backoff policy (linear, exponential). + type: string + deadLetterSink: + description: DeadLetterSink is the sink receiving event that could not be sent to a destination. + type: object + properties: + ref: + description: Ref points to an Addressable. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + uri: + description: URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref. + type: string + retry: + description: Retry is the minimum number of retries the sender should attempt when sending an event before moving it to the dead letter sink. + type: integer + format: int32 + subscribers: + description: This is the list of subscriptions for this subscribable. + type: array + items: + type: object + properties: + delivery: + description: DeliverySpec contains options controlling the event delivery + type: object + properties: + backoffDelay: + description: 'BackoffDelay is the delay before retrying. More information on Duration format: - https://www.iso.org/iso-8601-date-and-time-format.html - https://en.wikipedia.org/wiki/ISO_8601 For linear policy, backoff delay is backoffDelay*. For exponential policy, backoff delay is backoffDelay*2^.' + type: string + backoffPolicy: + description: BackoffPolicy is the retry backoff policy (linear, exponential). + type: string + deadLetterSink: + description: DeadLetterSink is the sink receiving event that could not be sent to a destination. + type: object + properties: + ref: + description: Ref points to an Addressable. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + uri: + description: URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref. + type: string + retry: + description: Retry is the minimum number of retries the sender should attempt when sending an event before moving it to the dead letter sink. + type: integer + format: int32 + generation: + description: Generation of the origin of the subscriber with uid:UID. + type: integer + format: int64 + replyUri: + description: ReplyURI is the endpoint for the reply + type: string + subscriberUri: + description: SubscriberURI is the endpoint for the subscriber + type: string + uid: + description: UID is used to understand the origin of the subscriber. + type: string + status: + description: Status represents the current state of the Channel. This data may be out of date. + type: object + properties: + address: + type: object + properties: + url: + type: string + annotations: + description: Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards. + type: object + x-kubernetes-preserve-unknown-fields: true + conditions: + description: Conditions the latest available observations of a resource's current state. + type: array + items: + type: object + required: + - type + - status + properties: + lastTransitionTime: + description: LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant). + type: string + message: + description: A human readable message indicating details about the transition. + type: string + reason: + description: The reason for the condition's last transition. + type: string + severity: + description: Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition. + type: string + deadLetterChannel: + description: DeadLetterChannel is a KReference and is set by the channel when it supports native error handling via a channel Failed messages are delivered here. + type: object + properties: + apiVersion: + description: API version of the referent. + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.' + type: string + observedGeneration: + description: ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. + type: integer + format: int64 + subscribers: + description: This is the list of subscription's statuses for this channel. + type: array + items: + type: object + properties: + message: + description: A human readable message indicating details of Ready status. + type: string + observedGeneration: + description: Generation of the origin of the subscriber with uid:UID. + type: integer + format: int64 + ready: + description: Status of the subscriber. + type: string + uid: + description: UID is used to understand the origin of the subscriber. + type: string + additionalPrinterColumns: + - name: URL + type: string + jsonPath: .status.address.url + - name: Age + type: date + jsonPath: .metadata.creationTimestamp + - name: Ready + type: string + jsonPath: ".status.conditions[?(@.type==\"Ready\")].status" + - name: Reason + type: string + jsonPath: ".status.conditions[?(@.type==\"Ready\")].reason" + names: + kind: InMemoryChannel + plural: inmemorychannels + singular: inmemorychannel + categories: + - all + - knative + - messaging + - channel + shortNames: + - imc + scope: Namespaced +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: imc-addressable-resolver + labels: + eventing.knative.dev/release: devel + duck.knative.dev/addressable: "true" +rules: + - apiGroups: + - messaging.knative.dev + resources: + - inmemorychannels + - inmemorychannels/status + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: imc-channelable-manipulator + labels: + eventing.knative.dev/release: devel + duck.knative.dev/channelable: "true" +rules: + - apiGroups: + - messaging.knative.dev + resources: + - inmemorychannels + - inmemorychannels/status + verbs: + - create + - get + - list + - watch + - update + - patch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: imc-controller + labels: + eventing.knative.dev/release: devel +rules: + - apiGroups: + - messaging.knative.dev + resources: + - inmemorychannels + - inmemorychannels/status + verbs: + - get + - list + - watch + - update + - apiGroups: + - messaging.knative.dev + resources: + - inmemorychannels/finalizers + verbs: + - update + - apiGroups: + - messaging.knative.dev + resources: + - inmemorychannels/finalizers + - inmemorychannels/status + - inmemorychannels + verbs: + - patch + - apiGroups: + - "" + resources: + - services + - serviceaccounts + verbs: &everything + - get + - list + - watch + - create + - update + - patch + - apiGroups: + - "" + resources: + - endpoints + verbs: + - get + - list + - watch + - apiGroups: + - "rbac.authorization.k8s.io" + resources: + - rolebindings + verbs: *everything + - apiGroups: + - apps + resources: + - deployments + verbs: *everything + - apiGroups: + - apps + resources: + - deployments/status + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - events + verbs: + - create + - patch + - apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: *everything + - apiGroups: + - "admissionregistration.k8s.io" + resources: + - "mutatingwebhookconfigurations" + - "validatingwebhookconfigurations" + verbs: &everything + - "get" + - "list" + - "create" + - "update" + - "delete" + - "patch" + - "watch" + - apiGroups: + - "" + resources: + - "namespaces" + verbs: + - "get" + - "create" + - "update" + - "list" + - "watch" + - "patch" +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: imc-dispatcher + labels: + eventing.knative.dev/release: devel +rules: + - apiGroups: + - messaging.knative.dev + resources: + - inmemorychannels + - inmemorychannels/status + verbs: + - get + - list + - watch + - apiGroups: + - "" # Core API group. + resources: + - configmaps + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - events + verbs: + - create + - patch + - apiGroups: + - messaging.knative.dev + resources: + - inmemorychannels/finalizers + - inmemorychannels/status + - inmemorychannels + verbs: + - patch + - apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + namespace: knative-eventing + name: knative-inmemorychannel-webhook + labels: + eventing.knative.dev/release: devel +rules: + - apiGroups: + - "" + resources: + - "secrets" + verbs: + - "get" + - "create" + - "update" + - "list" + - "watch" + - "patch" +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: MutatingWebhookConfiguration +metadata: + name: inmemorychannel.eventing.knative.dev + labels: + eventing.knative.dev/release: devel +webhooks: +- admissionReviewVersions: ["v1"] + clientConfig: + service: + name: inmemorychannel-webhook + namespace: knative-eventing + sideEffects: None + failurePolicy: Fail + name: inmemorychannel.eventing.knative.dev + timeoutSeconds: 10 +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingWebhookConfiguration +metadata: + name: validation.inmemorychannel.eventing.knative.dev + labels: + eventing.knative.dev/release: devel +webhooks: +- admissionReviewVersions: ["v1"] + clientConfig: + service: + name: inmemorychannel-webhook + namespace: knative-eventing + sideEffects: None + failurePolicy: Fail + name: validation.inmemorychannel.eventing.knative.dev + timeoutSeconds: 10 +--- +apiVersion: v1 +kind: Secret +metadata: + name: inmemorychannel-webhook-certs + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel diff --git a/openshift/release/knative-eventing-mtbroker-ci.yaml b/openshift/release/knative-eventing-mtbroker-ci.yaml new file mode 100644 index 00000000000..a492bd4526a --- /dev/null +++ b/openshift/release/knative-eventing-mtbroker-ci.yaml @@ -0,0 +1,433 @@ +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: knative-eventing-mt-channel-broker-controller + labels: + eventing.knative.dev/release: devel +rules: + - apiGroups: + - "" + resources: + - "namespaces/finalizers" + verbs: + - "update" + - apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - "get" + - "list" + - "create" + - "update" + - "delete" + - "patch" + - "watch" +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: knative-eventing-mt-broker-filter + labels: + eventing.knative.dev/release: devel +rules: + - apiGroups: + - eventing.knative.dev + resources: + - triggers + - triggers/status + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - "configmaps" + verbs: + - get + - list + - watch +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: mt-broker-filter + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: knative-eventing-mt-broker-ingress + labels: + eventing.knative.dev/release: devel +rules: + - apiGroups: + - eventing.knative.dev + resources: + - brokers + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - "configmaps" + verbs: + - get + - list + - watch +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: mt-broker-ingress + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: eventing-mt-channel-broker-controller + labels: + eventing.knative.dev/release: devel +subjects: + - kind: ServiceAccount + name: eventing-controller + namespace: knative-eventing +roleRef: + kind: ClusterRole + name: knative-eventing-mt-channel-broker-controller + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: knative-eventing-mt-broker-filter + labels: + eventing.knative.dev/release: devel +subjects: + - kind: ServiceAccount + name: mt-broker-filter + namespace: knative-eventing +roleRef: + kind: ClusterRole + name: knative-eventing-mt-broker-filter + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: knative-eventing-mt-broker-ingress + labels: + eventing.knative.dev/release: devel +subjects: + - kind: ServiceAccount + name: mt-broker-ingress + namespace: knative-eventing +roleRef: + kind: ClusterRole + name: knative-eventing-mt-broker-ingress + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mt-broker-filter + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +spec: + selector: + matchLabels: + eventing.knative.dev/brokerRole: filter + template: + metadata: + labels: + eventing.knative.dev/brokerRole: filter + eventing.knative.dev/release: devel + spec: + serviceAccountName: mt-broker-filter + enableServiceLinks: false + containers: + - name: filter + terminationMessagePolicy: FallbackToLogsOnError + image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-mtbroker-filter + readinessProbe: &probe + failureThreshold: 3 + httpGet: + path: /healthz + port: 8080 + scheme: HTTP + periodSeconds: 2 + successThreshold: 1 + timeoutSeconds: 1 + livenessProbe: + <<: *probe + initialDelaySeconds: 5 + resources: + requests: + cpu: 100m + memory: 100Mi + ports: + - containerPort: 8080 + name: http + protocol: TCP + - containerPort: 9092 + name: metrics + protocol: TCP + terminationMessagePath: /dev/termination-log + env: + - name: SYSTEM_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: CONTAINER_NAME + value: filter + - name: CONFIG_LOGGING_NAME + value: config-logging + - name: CONFIG_OBSERVABILITY_NAME + value: config-observability + - name: METRICS_DOMAIN + value: knative.dev/internal/eventing + - name: FILTER_PORT + value: "8080" + securityContext: + allowPrivilegeEscalation: false +--- +apiVersion: v1 +kind: Service +metadata: + labels: + eventing.knative.dev/brokerRole: filter + eventing.knative.dev/release: devel + name: broker-filter + namespace: knative-eventing +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 8080 + - name: http-metrics + port: 9092 + protocol: TCP + targetPort: 9092 + selector: + eventing.knative.dev/brokerRole: filter +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mt-broker-ingress + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +spec: + selector: + matchLabels: + eventing.knative.dev/brokerRole: ingress + template: + metadata: + labels: + eventing.knative.dev/brokerRole: ingress + eventing.knative.dev/release: devel + spec: + serviceAccountName: mt-broker-ingress + enableServiceLinks: false + containers: + - name: ingress + terminationMessagePolicy: FallbackToLogsOnError + image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-mtbroker-ingress + readinessProbe: &probe + failureThreshold: 3 + httpGet: + path: /healthz + port: 8080 + scheme: HTTP + periodSeconds: 2 + successThreshold: 1 + timeoutSeconds: 1 + livenessProbe: + <<: *probe + initialDelaySeconds: 5 + resources: + requests: + cpu: 100m + memory: 100Mi + ports: + - containerPort: 8080 + name: http + protocol: TCP + - containerPort: 9092 + name: metrics + protocol: TCP + terminationMessagePath: /dev/termination-log + env: + - name: SYSTEM_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: CONTAINER_NAME + value: ingress + - name: CONFIG_LOGGING_NAME + value: config-logging + - name: CONFIG_OBSERVABILITY_NAME + value: config-observability + - name: METRICS_DOMAIN + value: knative.dev/internal/eventing + - name: INGRESS_PORT + value: "8080" + securityContext: + allowPrivilegeEscalation: false +--- +apiVersion: v1 +kind: Service +metadata: + labels: + eventing.knative.dev/brokerRole: ingress + eventing.knative.dev/release: devel + name: broker-ingress + namespace: knative-eventing +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 8080 + - name: http-metrics + port: 9092 + protocol: TCP + targetPort: 9092 + selector: + eventing.knative.dev/brokerRole: ingress +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mt-broker-controller + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +spec: + selector: + matchLabels: + app: mt-broker-controller + template: + metadata: + labels: + app: mt-broker-controller + eventing.knative.dev/release: devel + spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: + app: mt-broker-controller + topologyKey: kubernetes.io/hostname + weight: 100 + serviceAccountName: eventing-controller + enableServiceLinks: false + containers: + - name: mt-broker-controller + terminationMessagePolicy: FallbackToLogsOnError + image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-mtchannel-broker + resources: + requests: + cpu: 100m + memory: 100Mi + env: + - name: SYSTEM_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: CONFIG_LOGGING_NAME + value: config-logging + - name: CONFIG_OBSERVABILITY_NAME + value: config-observability + - name: METRICS_DOMAIN + value: knative.dev/eventing + - name: BROKER_INJECTION_DEFAULT + value: "false" + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + securityContext: + allowPrivilegeEscalation: false + ports: + - name: metrics + containerPort: 9090 + - name: profiling + containerPort: 8008 +--- +apiVersion: autoscaling/v2beta2 +kind: HorizontalPodAutoscaler +metadata: + name: broker-ingress-hpa + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: mt-broker-ingress + minReplicas: 1 + maxReplicas: 10 + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 70 +--- +apiVersion: autoscaling/v2beta2 +kind: HorizontalPodAutoscaler +metadata: + name: broker-filter-hpa + namespace: knative-eventing + labels: + eventing.knative.dev/release: devel +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: mt-broker-filter + minReplicas: 1 + maxReplicas: 10 + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 70 diff --git a/openshift/release/mirror-upstream-branches.sh b/openshift/release/mirror-upstream-branches.sh new file mode 100755 index 00000000000..b1440b0c412 --- /dev/null +++ b/openshift/release/mirror-upstream-branches.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +# Usage: openshift/release/mirror-upstream-branches.sh +# This should be run from the basedir of the repo with no arguments + + +set -ex +readonly TMPDIR=$(mktemp -d knativeEventingBranchingCheckXXXX -p /tmp/) + +git fetch upstream +git fetch openshift + +# We need to seed this with a few releases that, otherwise, would make +# the processing regex less clear with more anomalies +cat >> "$TMPDIR"/midstream_branches < "$TMPDIR"/upstream_branches +git branch --list -a "openshift/release-v0.*" | cut -f3 -d'/' | cut -f2 -d'v' | rev | cut -f2- -d'.' | rev >> "$TMPDIR"/midstream_branches + +sort -o "$TMPDIR"/midstream_branches "$TMPDIR"/midstream_branches +sort -o "$TMPDIR"/upstream_branches "$TMPDIR"/upstream_branches +comm -32 "$TMPDIR"/upstream_branches "$TMPDIR"/midstream_branches > "$TMPDIR"/new_branches + +UPSTREAM_BRANCH=$(cat "$TMPDIR"/new_branches) +if [ -z "$UPSTREAM_BRANCH" ]; then + echo "no new branch, exiting" + exit 0 +fi +echo "found upstream branch: $UPSTREAM_BRANCH" +readonly UPSTREAM_TAG="v$UPSTREAM_BRANCH.0" +readonly MIDSTREAM_BRANCH="release-v$UPSTREAM_BRANCH.0" +openshift/release/create-release-branch.sh "$UPSTREAM_TAG" "$MIDSTREAM_BRANCH" +# we would check the error code, but we 'set -e', so assume we're fine +git push openshift "$MIDSTREAM_BRANCH" diff --git a/openshift/release/resolve.sh b/openshift/release/resolve.sh new file mode 100755 index 00000000000..d5e1537d9e5 --- /dev/null +++ b/openshift/release/resolve.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +function resolve_resources(){ + local dir=$1 + local resolved_file_name=$2 + local image_prefix=$3 + local image_tag=$4 + + [[ -n $image_tag ]] && image_tag=":$image_tag" + + echo "Writing resolved yaml to $resolved_file_name" + + > $resolved_file_name + + for yaml in "$dir"/*.yaml; do + echo "---" >> $resolved_file_name + # 1. Prefix test image references with test- + # 2. Rewrite image references + # 3. Remove comment lines + # 4. Remove empty lines + sed -e "s+\(.* image: \)\(knative.dev\)\(.*/\)\(test/\)\(.*\)+\1\2 \3\4test-\5+g" \ + -e "s+ko://++" \ + -e "s+knative.dev/eventing/cmd/broker/ingress+${image_prefix}mtbroker-ingress${image_tag}+" \ + -e "s+knative.dev/eventing/cmd/broker/filter+${image_prefix}mtbroker-filter${image_tag}+" \ + -e "s+knative.dev/eventing/cmd/mtbroker/ingress+${image_prefix}mtbroker-ingress${image_tag}+" \ + -e "s+knative.dev/eventing/cmd/mtbroker/filter+${image_prefix}mtbroker-filter${image_tag}+" \ + -e "s+knative.dev/eventing/cmd/mtchannel_broker+${image_prefix}mtchannel-broker${image_tag}+" \ + -e "s+knative.dev/eventing/cmd/sugar_controller+${image_prefix}sugar-controller${image_tag}+" \ + -e "s+knative.dev/eventing/cmd/in_memory/channel_controller+${image_prefix}channel-controller${image_tag}+" \ + -e "s+knative.dev/eventing/cmd/in_memory/channel_dispatcher+${image_prefix}channel-dispatcher${image_tag}+" \ + -e "s+knative.dev/eventing/cmd/ping+${image_prefix}ping${image_tag}+" \ + -e "s+knative.dev/eventing/cmd/mtping+${image_prefix}mtping${image_tag}+" \ + -e "s+knative.dev/eventing/cmd/apiserver_receive_adapter+${image_prefix}apiserver-receive-adapter${image_tag}+" \ + -e "s+\(.* image: \)\(knative.dev\)\(.*/\)\(.*\)+\1${image_prefix}\4${image_tag}+g" \ + -e '/^[ \t]*#/d' \ + -e '/^[ \t]*$/d' \ + "$yaml" >> $resolved_file_name + done +} diff --git a/openshift/release/update-to-head.sh b/openshift/release/update-to-head.sh new file mode 100755 index 00000000000..3c7ef5a2b99 --- /dev/null +++ b/openshift/release/update-to-head.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +# Synchs the release-next branch to main and then triggers CI +# Usage: update-to-head.sh + +set -e +REPO_NAME=`basename $(git rev-parse --show-toplevel)` + +# Check if there's an upstream release we need to mirror downstream +openshift/release/mirror-upstream-branches.sh + +# Reset release-next to upstream/main. +git fetch upstream main +git checkout upstream/main -B release-next + +# Update openshift's main and take all needed files from there. +git fetch openshift main +git checkout openshift/main openshift OWNERS_ALIASES OWNERS Makefile +make generate-dockerfiles +make RELEASE=ci generate-release +git add openshift OWNERS_ALIASES OWNERS Makefile +git commit -m ":open_file_folder: Update openshift specific files." + +# Apply patches . +git apply openshift/patches/* +make RELEASE=ci generate-release +git commit -am ":fire: Apply carried patches." + +git push -f openshift release-next + +# Trigger CI +git checkout release-next -B release-next-ci +date > ci +git add ci +git commit -m ":robot: Triggering CI on branch 'release-next' after synching to upstream/main" +git push -f openshift release-next-ci + +if hash hub 2>/dev/null; then + hub pull-request --no-edit -l "kind/sync-fork-to-upstream" -b openshift/${REPO_NAME}:release-next -h openshift/${REPO_NAME}:release-next-ci +else + echo "hub (https://github.com/github/hub) is not installed, so you'll need to create a PR manually." +fi From d4b7e8dd2d5cd7d5755b78de775e3347e72346e9 Mon Sep 17 00:00:00 2001 From: afield Date: Wed, 2 Jun 2021 20:34:27 -0400 Subject: [PATCH 2/5] :fire: Apply carried patches. --- .../configmaps/observability.yaml | 73 ------------------- .../in-memory-channel/configmaps/tracing.yaml | 59 --------------- config/core/deployments/webhook.yaml | 2 +- openshift/release/knative-eventing-ci.yaml | 41 +---------- pkg/reconciler/source/crd/crd.go | 7 ++ pkg/reconciler/source/crd/crd_test.go | 21 +++++- test/e2e/source_sinkbinding_v1_test.go | 1 + test/rekt/broker_test.go | 1 + test/rekt/channel_test.go | 1 + .../features/apiserversource/data_plane.go | 2 +- .../containersource/containersource.yaml | 2 +- .../containersource/containersource_test.go | 4 +- .../resources/eventlibrary/eventlibrary.yaml | 2 +- .../eventlibrary/eventlibrary_test.go | 2 +- test/rekt/resources/flaker/flaker.yaml | 2 +- test/rekt/resources/flaker/flaker_test.go | 2 +- .../pkg/eventshub/103-pod.yaml | 2 +- 17 files changed, 39 insertions(+), 185 deletions(-) delete mode 100644 config/channels/in-memory-channel/configmaps/observability.yaml delete mode 100644 config/channels/in-memory-channel/configmaps/tracing.yaml diff --git a/config/channels/in-memory-channel/configmaps/observability.yaml b/config/channels/in-memory-channel/configmaps/observability.yaml deleted file mode 100644 index cad2fc51e90..00000000000 --- a/config/channels/in-memory-channel/configmaps/observability.yaml +++ /dev/null @@ -1,73 +0,0 @@ -# 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 -# -# 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: v1 -kind: ConfigMap -metadata: - name: config-observability - namespace: knative-eventing - labels: - eventing.knative.dev/release: devel - knative.dev/config-propagation: original - knative.dev/config-category: eventing - annotations: - knative.dev/example-checksum: "f46cf09d" -data: - _example: | - ################################ - # # - # EXAMPLE CONFIGURATION # - # # - ################################ - - # This block is not actually functional configuration, - # but serves to illustrate the available configuration - # options and document them in a way that is accessible - # to users that `kubectl edit` this config map. - # - # These sample configuration options may be copied out of - # this example block and unindented to be in the data block - # to actually change the configuration. - - # metrics.backend-destination field specifies the system metrics destination. - # It supports either prometheus (the default) or stackdriver. - # Note: Using stackdriver will incur additional charges - metrics.backend-destination: prometheus - - # metrics.request-metrics-backend-destination specifies the request metrics - # destination. If non-empty, it enables queue proxy to send request metrics. - # Currently supported values: prometheus, stackdriver. - metrics.request-metrics-backend-destination: prometheus - - # metrics.stackdriver-project-id field specifies the stackdriver project ID. This - # field is optional. When running on GCE, application default credentials will be - # used if this field is not provided. - metrics.stackdriver-project-id: "" - - # metrics.allow-stackdriver-custom-metrics indicates whether it is allowed to send metrics to - # Stackdriver using "global" resource type and custom metric type if the - # metrics are not supported by "knative_broker", "knative_trigger", and "knative_source" resource types. - # Setting this flag to "true" could cause extra Stackdriver charge. - # If metrics.backend-destination is not Stackdriver, this is ignored. - metrics.allow-stackdriver-custom-metrics: "false" - - # profiling.enable indicates whether it is allowed to retrieve runtime profiling data from - # the pods via an HTTP server in the format expected by the pprof visualization tool. When - # enabled, the Knative Eventing pods expose the profiling data on an alternate HTTP port 8008. - # The HTTP context root for profiling is then /debug/pprof/. - profiling.enable: "false" - - # sink-event-error-reporting.enable whether the adapter reports a kube event to the CRD indicating - # a failure to send a cloud event to the sink. - sink-event-error-reporting.enable: "false" diff --git a/config/channels/in-memory-channel/configmaps/tracing.yaml b/config/channels/in-memory-channel/configmaps/tracing.yaml deleted file mode 100644 index a699f132148..00000000000 --- a/config/channels/in-memory-channel/configmaps/tracing.yaml +++ /dev/null @@ -1,59 +0,0 @@ -# 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 -# -# 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: v1 -kind: ConfigMap -metadata: - name: config-tracing - namespace: knative-eventing - labels: - eventing.knative.dev/release: devel - knative.dev/config-propagation: original - knative.dev/config-category: eventing - annotations: - knative.dev/example-checksum: "4002b4c2" -data: - _example: | - ################################ - # # - # EXAMPLE CONFIGURATION # - # # - ################################ - # This block is not actually functional configuration, - # but serves to illustrate the available configuration - # options and document them in a way that is accessible - # to users that `kubectl edit` this config map. - # - # These sample configuration options may be copied out of - # this example block and unindented to be in the data block - # to actually change the configuration. - # - # This may be "zipkin" or "stackdriver", the default is "none" - backend: "none" - - # URL to zipkin collector where traces are sent. - # This must be specified when backend is "zipkin" - zipkin-endpoint: "http://zipkin.istio-system.svc.cluster.local:9411/api/v2/spans" - - # The GCP project into which stackdriver metrics will be written - # when backend is "stackdriver". If unspecified, the project-id - # is read from GCP metadata when running on GCP. - stackdriver-project-id: "my-project" - - # Enable zipkin debug mode. This allows all spans to be sent to the server - # bypassing sampling. - debug: "false" - - # Percentage (0-1) of requests to trace - sample-rate: "0.1" diff --git a/config/core/deployments/webhook.yaml b/config/core/deployments/webhook.yaml index 096733c960e..8faec19585e 100644 --- a/config/core/deployments/webhook.yaml +++ b/config/core/deployments/webhook.yaml @@ -80,7 +80,7 @@ spec: # will NOT be considered by the sinkbinding webhook. # The default is `exclusion`. - name: SINK_BINDING_SELECTION_MODE - value: "exclusion" + value: "inclusion" - name: POD_NAME valueFrom: fieldRef: diff --git a/openshift/release/knative-eventing-ci.yaml b/openshift/release/knative-eventing-ci.yaml index e719b8f224d..e621f099644 100644 --- a/openshift/release/knative-eventing-ci.yaml +++ b/openshift/release/knative-eventing-ci.yaml @@ -3429,7 +3429,7 @@ spec: - name: WEBHOOK_PORT value: "8443" - name: SINK_BINDING_SELECTION_MODE - value: "exclusion" + value: "inclusion" - name: POD_NAME valueFrom: fieldRef: @@ -3727,45 +3727,6 @@ data: MaxIdleConnections: "1000" MaxIdleConnectionsPerHost: "100" --- -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-observability - namespace: knative-eventing - labels: - eventing.knative.dev/release: devel - knative.dev/config-propagation: original - knative.dev/config-category: eventing - annotations: - knative.dev/example-checksum: "f46cf09d" -data: - _example: | - metrics.backend-destination: prometheus - metrics.request-metrics-backend-destination: prometheus - metrics.stackdriver-project-id: "" - metrics.allow-stackdriver-custom-metrics: "false" - profiling.enable: "false" - sink-event-error-reporting.enable: "false" ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-tracing - namespace: knative-eventing - labels: - eventing.knative.dev/release: devel - knative.dev/config-propagation: original - knative.dev/config-category: eventing - annotations: - knative.dev/example-checksum: "4002b4c2" -data: - _example: | - backend: "none" - zipkin-endpoint: "http://zipkin.istio-system.svc.cluster.local:9411/api/v2/spans" - stackdriver-project-id: "my-project" - debug: "false" - sample-rate: "0.1" ---- apiVersion: apps/v1 kind: Deployment metadata: diff --git a/pkg/reconciler/source/crd/crd.go b/pkg/reconciler/source/crd/crd.go index d40c75ca739..5ea76035c98 100644 --- a/pkg/reconciler/source/crd/crd.go +++ b/pkg/reconciler/source/crd/crd.go @@ -31,6 +31,7 @@ import ( "knative.dev/pkg/logging" pkgreconciler "knative.dev/pkg/reconciler" + "knative.dev/eventing/pkg/apis/sources" "knative.dev/eventing/pkg/reconciler/source/duck" ) @@ -60,6 +61,12 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, crd *v1.CustomResourceDe // 2. Dynamically create a controller for it, if not present already. Such controller is in charge of reconciling // duckv1.Source resources with that particular GVR.. + filterFunc := pkgreconciler.LabelFilterFunc(sources.SourceDuckLabelKey, sources.SourceDuckLabelValue, false) + if ok := filterFunc(crd); !ok { + logging.FromContext(ctx).Errorw("Passed crd does not have source duck label", zap.String("CRD", crd.Name)) + return nil //Avoid requeuing object + } + gvr, gvk, err := r.resolveGroupVersions(crd) if err != nil { logging.FromContext(ctx).Errorw("Error while resolving GVR and GVK", zap.String("CRD", crd.Name), zap.Error(err)) diff --git a/pkg/reconciler/source/crd/crd_test.go b/pkg/reconciler/source/crd/crd_test.go index 1cf9b9794fa..ae5876492aa 100644 --- a/pkg/reconciler/source/crd/crd_test.go +++ b/pkg/reconciler/source/crd/crd_test.go @@ -154,6 +154,23 @@ func TestAllCases(t *testing.T) { Key: crdName, Ctx: ctx, }, + { + Name: "crd missing duck label", + Objects: []runtime.Object{ + NewCustomResourceDefinition(crdName, + WithCustomResourceDefinitionGroup(crdGroup), + WithCustomResourceDefinitionNames(apiextensionsv1.CustomResourceDefinitionNames{ + Kind: crdKind, + Plural: crdPlural, + }), + WithCustomResourceDefinitionVersions([]apiextensionsv1.CustomResourceDefinitionVersion{{ + Name: crdVersionServed, + Served: true, + }})), + }, + Key: crdName, + Ctx: ctx, + }, } logger := logtesting.TestLogger(t) @@ -180,9 +197,7 @@ func TestControllerRunning(t *testing.T) { Name: "reconcile succeeded", Objects: []runtime.Object{ NewCustomResourceDefinition(crdName, - WithCustomResourceDefinitionLabels(map[string]string{ - sources.SourceDuckLabelKey: sources.SourceDuckLabelValue, - }), + WithCustomResourceDefinitionLabels(map[string]string{sources.SourceDuckLabelKey: sources.SourceDuckLabelValue}), WithCustomResourceDefinitionGroup(crdGroup), WithCustomResourceDefinitionNames(apiextensionsv1.CustomResourceDefinitionNames{ Kind: crdKind, diff --git a/test/e2e/source_sinkbinding_v1_test.go b/test/e2e/source_sinkbinding_v1_test.go index 52c7398e8ab..e59723e5118 100644 --- a/test/e2e/source_sinkbinding_v1_test.go +++ b/test/e2e/source_sinkbinding_v1_test.go @@ -126,6 +126,7 @@ func TestSinkBindingV1Deployment(t *testing.T) { } func TestSinkBindingV1CronJob(t *testing.T) { + t.Skip("SRVKE-500: Skipping since we set bindings to inclusion") const ( sinkBindingName = "e2e-sink-binding" deploymentName = "e2e-sink-binding-cronjob" diff --git a/test/rekt/broker_test.go b/test/rekt/broker_test.go index 2f13b88dee0..53a92020c5d 100644 --- a/test/rekt/broker_test.go +++ b/test/rekt/broker_test.go @@ -54,6 +54,7 @@ func TestBrokerAsMiddleware(t *testing.T) { // TestBrokerDLQ func TestBrokerWithDLQ(t *testing.T) { + t.Skip("skipping for test reasons...") class := eventing.MTChannelBrokerClassValue ctx, env := global.Environment( diff --git a/test/rekt/channel_test.go b/test/rekt/channel_test.go index 3973c8f2b8f..7e38a08b35f 100644 --- a/test/rekt/channel_test.go +++ b/test/rekt/channel_test.go @@ -192,6 +192,7 @@ EventSource ---> Channel ---> Subscription ---> Channel ---> Subscription ----> -----------> Service(Transformation) */ func TestEventTransformationForSubscriptionV1(t *testing.T) { + t.Skip("skipping for now...") t.Parallel() ctx, env := global.Environment( diff --git a/test/rekt/features/apiserversource/data_plane.go b/test/rekt/features/apiserversource/data_plane.go index 03728140963..1c7a734dd34 100644 --- a/test/rekt/features/apiserversource/data_plane.go +++ b/test/rekt/features/apiserversource/data_plane.go @@ -37,7 +37,7 @@ import ( ) const ( - exampleImage = "ko://knative.dev/eventing/test/test_images/print" + exampleImage = "registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-test-print" ) func DataPlane_SinkTypes() *feature.FeatureSet { diff --git a/test/rekt/resources/containersource/containersource.yaml b/test/rekt/resources/containersource/containersource.yaml index f480b459b80..51ebb5c82c4 100644 --- a/test/rekt/resources/containersource/containersource.yaml +++ b/test/rekt/resources/containersource/containersource.yaml @@ -42,7 +42,7 @@ spec: spec: containers: - name: heartbeats - image: ko://knative.dev/eventing/test/test_images/heartbeats + image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-test-heartbeats args: - --period=1 env: diff --git a/test/rekt/resources/containersource/containersource_test.go b/test/rekt/resources/containersource/containersource_test.go index 501541bcadf..c2b81583a2e 100644 --- a/test/rekt/resources/containersource/containersource_test.go +++ b/test/rekt/resources/containersource/containersource_test.go @@ -47,7 +47,7 @@ func Example_min() { // spec: // containers: // - name: heartbeats - // image: ko://knative.dev/eventing/test/test_images/heartbeats + // image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-test-heartbeats // args: // - --period=1 // env: @@ -106,7 +106,7 @@ func Example_full() { // spec: // containers: // - name: heartbeats - // image: ko://knative.dev/eventing/test/test_images/heartbeats + // image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-test-heartbeats // args: // - --period=1 // env: diff --git a/test/rekt/resources/eventlibrary/eventlibrary.yaml b/test/rekt/resources/eventlibrary/eventlibrary.yaml index 7cd5e8e575e..96777f69fd9 100644 --- a/test/rekt/resources/eventlibrary/eventlibrary.yaml +++ b/test/rekt/resources/eventlibrary/eventlibrary.yaml @@ -23,7 +23,7 @@ spec: restartPolicy: "Never" containers: - name: library - image: ko://knative.dev/eventing/test/test_images/event-library + image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-test-event-library imagePullPolicy: "IfNotPresent" --- diff --git a/test/rekt/resources/eventlibrary/eventlibrary_test.go b/test/rekt/resources/eventlibrary/eventlibrary_test.go index 0e1464ddf61..fe3b19c2ec1 100644 --- a/test/rekt/resources/eventlibrary/eventlibrary_test.go +++ b/test/rekt/resources/eventlibrary/eventlibrary_test.go @@ -24,7 +24,7 @@ import ( func Example() { images := map[string]string{ - "ko://knative.dev/eventing/test/test_images/event-library": "gcr.io/knative-samples/helloworld-go", + "registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-test-event-library": "gcr.io/knative-samples/helloworld-go", } cfg := map[string]interface{}{ "name": "foo", diff --git a/test/rekt/resources/flaker/flaker.yaml b/test/rekt/resources/flaker/flaker.yaml index 207c3d68165..8821bb57702 100644 --- a/test/rekt/resources/flaker/flaker.yaml +++ b/test/rekt/resources/flaker/flaker.yaml @@ -23,7 +23,7 @@ spec: restartPolicy: "Never" containers: - name: flaker - image: ko://knative.dev/eventing/test/test_images/event-flaker + image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-test-event-flaker imagePullPolicy: "IfNotPresent" env: - name: "K_SINK" diff --git a/test/rekt/resources/flaker/flaker_test.go b/test/rekt/resources/flaker/flaker_test.go index aee4d23c2fc..3d797342a96 100644 --- a/test/rekt/resources/flaker/flaker_test.go +++ b/test/rekt/resources/flaker/flaker_test.go @@ -24,7 +24,7 @@ import ( func Example() { images := map[string]string{ - "ko://knative.dev/eventing/test/test_images/event-flaker": "gcr.io/knative-samples/helloworld-go", + "registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-test-event-flaker": "gcr.io/knative-samples/helloworld-go", } cfg := map[string]interface{}{ "name": "foo", diff --git a/vendor/knative.dev/reconciler-test/pkg/eventshub/103-pod.yaml b/vendor/knative.dev/reconciler-test/pkg/eventshub/103-pod.yaml index fdf1bfe80b1..1210124539f 100644 --- a/vendor/knative.dev/reconciler-test/pkg/eventshub/103-pod.yaml +++ b/vendor/knative.dev/reconciler-test/pkg/eventshub/103-pod.yaml @@ -24,7 +24,7 @@ spec: restartPolicy: "Never" containers: - name: eventshub - image: ko://knative.dev/reconciler-test/cmd/eventshub + image: registry.ci.openshift.org/openshift/knative-nightly:knative-eventing-test-eventshub imagePullPolicy: "IfNotPresent" env: - name: "SYSTEM_NAMESPACE" From fb0208246d6d43801b17e167a9750050e80e223f Mon Sep 17 00:00:00 2001 From: afield Date: Wed, 2 Jun 2021 20:34:29 -0400 Subject: [PATCH 3/5] :robot: Triggering CI on branch 'release-next' after synching to upstream/main --- ci | 1 + 1 file changed, 1 insertion(+) create mode 100644 ci diff --git a/ci b/ci new file mode 100644 index 00000000000..05fa7096f70 --- /dev/null +++ b/ci @@ -0,0 +1 @@ +Wed Jun 2 20:34:29 EDT 2021 From 422df76c2291c15e332f2e2c2111127a970e21b5 Mon Sep 17 00:00:00 2001 From: Stavros Kontopoulos Date: Sun, 25 Apr 2021 23:16:21 +0300 Subject: [PATCH 4/5] silent noisy metrics --- vendor/knative.dev/pkg/controller/stats_reporter.go | 4 ++-- vendor/knative.dev/pkg/webhook/stats_reporter.go | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/vendor/knative.dev/pkg/controller/stats_reporter.go b/vendor/knative.dev/pkg/controller/stats_reporter.go index 6735285db47..e1912daab67 100644 --- a/vendor/knative.dev/pkg/controller/stats_reporter.go +++ b/vendor/knative.dev/pkg/controller/stats_reporter.go @@ -199,7 +199,7 @@ func (r *reporter) ReportReconcile(duration time.Duration, success string, key t return err } - metrics.RecordBatch(ctx, reconcileCountStat.M(1), - reconcileLatencyStat.M(duration.Milliseconds())) + // TODO skonto: fix latency histogram + metrics.RecordBatch(ctx, reconcileCountStat.M(1)) return nil } diff --git a/vendor/knative.dev/pkg/webhook/stats_reporter.go b/vendor/knative.dev/pkg/webhook/stats_reporter.go index 9d64634feae..d2845ac9602 100644 --- a/vendor/knative.dev/pkg/webhook/stats_reporter.go +++ b/vendor/knative.dev/pkg/webhook/stats_reporter.go @@ -99,9 +99,8 @@ func (r *reporter) ReportRequest(req *admissionv1.AdmissionRequest, resp *admiss return err } - metrics.RecordBatch(ctx, requestCountM.M(1), - // Convert time.Duration in nanoseconds to milliseconds - responseTimeInMsecM.M(float64(d.Milliseconds()))) + // TODO skonto: fix latency histogram + metrics.Record(ctx, requestCountM.M(1)) return nil } From c6819f42c4ff2cf458c11b4abe316afc29211dde Mon Sep 17 00:00:00 2001 From: Stavros Kontopoulos Date: Thu, 3 Jun 2021 13:19:13 +0300 Subject: [PATCH 5/5] mute noisy metrics --- openshift/patches/020-mutemetrics.patch | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 openshift/patches/020-mutemetrics.patch diff --git a/openshift/patches/020-mutemetrics.patch b/openshift/patches/020-mutemetrics.patch new file mode 100644 index 00000000000..8998b1685ae --- /dev/null +++ b/openshift/patches/020-mutemetrics.patch @@ -0,0 +1,30 @@ +diff --git a/vendor/knative.dev/pkg/controller/stats_reporter.go b/vendor/knative.dev/pkg/controller/stats_reporter.go +index 6735285db..e1912daab 100644 +--- a/vendor/knative.dev/pkg/controller/stats_reporter.go ++++ b/vendor/knative.dev/pkg/controller/stats_reporter.go +@@ -199,7 +199,7 @@ func (r *reporter) ReportReconcile(duration time.Duration, success string, key t + return err + } + +- metrics.RecordBatch(ctx, reconcileCountStat.M(1), +- reconcileLatencyStat.M(duration.Milliseconds())) ++ // TODO skonto: fix latency histogram ++ metrics.RecordBatch(ctx, reconcileCountStat.M(1)) + return nil + } +diff --git a/vendor/knative.dev/pkg/webhook/stats_reporter.go b/vendor/knative.dev/pkg/webhook/stats_reporter.go +index 9d64634fe..d2845ac96 100644 +--- a/vendor/knative.dev/pkg/webhook/stats_reporter.go ++++ b/vendor/knative.dev/pkg/webhook/stats_reporter.go +@@ -99,9 +99,8 @@ func (r *reporter) ReportRequest(req *admissionv1.AdmissionRequest, resp *admiss + return err + } + +- metrics.RecordBatch(ctx, requestCountM.M(1), +- // Convert time.Duration in nanoseconds to milliseconds +- responseTimeInMsecM.M(float64(d.Milliseconds()))) ++ // TODO skonto: fix latency histogram ++ metrics.Record(ctx, requestCountM.M(1)) + return nil + } +