From ab1bb463cd7503968c7028b889d1347154b7e316 Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Tue, 12 May 2020 15:44:03 +0300 Subject: [PATCH 1/5] Eventing 0.14 --- ...operator_v1alpha1_knativeeventing_crd.yaml | 12 ++ ...operator.v1.8.0.clusterserviceversion.yaml | 106 ++++++++++-------- 2 files changed, 73 insertions(+), 45 deletions(-) diff --git a/olm-catalog/serverless-operator/1.8.0/operator_v1alpha1_knativeeventing_crd.yaml b/olm-catalog/serverless-operator/1.8.0/operator_v1alpha1_knativeeventing_crd.yaml index a1dce8524c..d5fe7d21d9 100644 --- a/olm-catalog/serverless-operator/1.8.0/operator_v1alpha1_knativeeventing_crd.yaml +++ b/olm-catalog/serverless-operator/1.8.0/operator_v1alpha1_knativeeventing_crd.yaml @@ -40,6 +40,14 @@ spec: spec: description: Spec defines the desired state of KnativeEventing properties: + config: + additionalProperties: + additionalProperties: + type: string + type: object + description: A means to override the corresponding entries in the upstream + configmaps + type: object registry: description: A means to override the corresponding deployment images in the upstream. This affects both apps/v1.Deployment and caching.internal.knative.dev/v1alpha1.Image. @@ -64,6 +72,10 @@ spec: name: description: The name of the secret. type: string + default-broker-class: + description: The default broker type to use for the brokers Knative creates. + If no value is provided, ChannelBasedBroker will be used. + type: string type: object status: properties: diff --git a/olm-catalog/serverless-operator/1.8.0/serverless-operator.v1.8.0.clusterserviceversion.yaml b/olm-catalog/serverless-operator/1.8.0/serverless-operator.v1.8.0.clusterserviceversion.yaml index 1b67ec5ee9..f85e0f49dc 100644 --- a/olm-catalog/serverless-operator/1.8.0/serverless-operator.v1.8.0.clusterserviceversion.yaml +++ b/olm-catalog/serverless-operator/1.8.0/serverless-operator.v1.8.0.clusterserviceversion.yaml @@ -294,7 +294,7 @@ spec: fieldPath: metadata.namespace - name: METRICS_DOMAIN value: knative.dev/eventing-operator - image: registry.svc.ci.openshift.org/openshift/knative-v0.13.2:knative-eventing-operator + image: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-operator imagePullPolicy: IfNotPresent name: knative-eventing-operator ports: @@ -356,27 +356,35 @@ spec: - name: IMAGE_3scale-kourier-control value: registry.svc.ci.openshift.org/openshift/knative-v0.13.3:kourier - name: IMAGE_eventing-controller - value: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-controller - - name: IMAGE_eventing-webhook - value: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-webhook - - name: IMAGE_broker-controller - value: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-channel-broker - - name: IMAGE_imc-controller - value: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-channel-controller - - name: IMAGE_imc-dispatcher - value: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-channel-dispatcher - - name: IMAGE_CRONJOB_RA_IMAGE - value: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-cronjob-receive-adapter - - name: IMAGE_PING_IMAGE - value: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-ping - - name: IMAGE_APISERVER_RA_IMAGE - value: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-apiserver-receive-adapter - - name: IMAGE_BROKER_INGRESS_IMAGE - value: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-ingress - - name: IMAGE_BROKER_FILTER_IMAGE - value: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-filter - - name: IMAGE_DISPATCHER_IMAGE - value: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-channel-dispatcher + value: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-controller + - name: IMAGE_eventing-webhook__eventing-webhook + value: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-webhook + - name: IMAGE_broker-controller__eventing-controller + value: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-channel-broker + - name: IMAGE_broker-filter__filter + value: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-mtbroker-filter + - name: IMAGE_broker-ingress__ingress + value: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-mtbroker-ingress + - name: IMAGE_mt-broker-controller__eventing-controller + value: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-mtchannel-broker + - name: IMAGE_imc-controller__controller + value: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-channel-controller + - name: IMAGE_imc-dispatcher__dispatcher + value: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-channel-dispatcher + - name: IMAGE_v0.14.0-upgrade__upgrade-brokers + value: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-upgrade-v0-14-0 + - name: IMAGE_eventing-controller__PING_IMAGE + value: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-adapter + - name: IMAGE_eventing-controller__JOB_RUNNER_IMAGE + value: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-jobrunner + - name: IMAGE_eventing-controller__APISERVER_RA_IMAGE + value: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-apiserver-receive-adapter + - name: IMAGE_broker-controller__BROKER_INGRESS_IMAGE + value: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-ingress + - name: IMAGE_broker-controller__BROKER_FILTER_IMAGE + value: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-filter + - name: IMAGE_imc-controller__DISPATCHER_IMAGE + value: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-channel-dispatcher - name: IMAGE_KN_CLI_ARTIFACTS value: registry.svc.ci.openshift.org/openshift/knative-v0.13.2:kn-cli-artifacts - name: knative-openshift-ingress @@ -511,29 +519,37 @@ spec: - name: knative-openshift-ingress image: $IMAGE_KNATIVE_OPENSHIFT_INGRESS - name: knative-eventing-operator - image: registry.svc.ci.openshift.org/openshift/knative-v0.13.2:knative-eventing-operator - - name: IMAGE_eventing-controller - image: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-controller - - name: IMAGE_eventing-webhook - image: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-webhook - - name: IMAGE_broker-controller - image: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-channel-broker - - name: IMAGE_imc-controller - image: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-channel-controller - - name: IMAGE_imc-dispatcher - image: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-channel-dispatcher - - name: IMAGE_CRONJOB_RA_IMAGE - image: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-cronjob-receive-adapter - - name: IMAGE_PING_IMAGE - image: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-ping - - name: IMAGE_APISERVER_RA_IMAGE - image: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-apiserver-receive-adapter - - name: IMAGE_BROKER_INGRESS_IMAGE - image: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-ingress - - name: IMAGE_BROKER_FILTER_IMAGE - image: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-filter - - name: IMAGE_DISPATCHER_IMAGE - image: registry.svc.ci.openshift.org/openshift/knative-v0.13.0:knative-eventing-channel-dispatcher + image: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-operator + - name: IMAGE_eventing-controller__eventing-controller + image: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-controller + - name: IMAGE_eventing-webhook__eventing-webhook + image: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-webhook + - name: IMAGE_broker-controller__eventing-controller + image: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-channel-broker + - name: IMAGE_broker-filter__filter + image: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-mtbroker-filter + - name: IMAGE_broker-ingress__ingress + image: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-mtbroker-ingress + - name: IMAGE_mt-broker-controller__eventing-controller + image: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-mtchannel-broker + - name: IMAGE_imc-controller__controller + image: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-channel-controller + - name: IMAGE_imc-dispatcher__dispatcher + image: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-channel-dispatcher + - name: IMAGE_v0.14.0-upgrade__upgrade-brokers + image: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-upgrade-v0-14-0 + - name: IMAGE_eventing-controller__PING_IMAGE + image: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-adapter + - name: IMAGE_eventing-controller__JOB_RUNNER_IMAGE + image: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-jobrunner + - name: IMAGE_eventing-controller__APISERVER_RA_IMAGE + image: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-apiserver-receive-adapter + - name: IMAGE_broker-controller__BROKER_INGRESS_IMAGE + image: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-ingress + - name: IMAGE_broker-controller__BROKER_FILTER_IMAGE + image: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-filter + - name: IMAGE_imc-controller__DISPATCHER_IMAGE + image: registry.svc.ci.openshift.org/openshift/knative-v0.14.0:knative-eventing-channel-dispatcher - name: IMAGE_KN_CLI_ARTIFACTS image: registry.svc.ci.openshift.org/openshift/knative-v0.13.2:kn-cli-artifacts replaces: serverless-operator.v1.7.0 From 46899fc1e98bd3ade697add20a363769930404ef Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Wed, 13 May 2020 10:04:41 +0300 Subject: [PATCH 2/5] Fix deployment names to check --- test/e2e/knative_eventing_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/e2e/knative_eventing_test.go b/test/e2e/knative_eventing_test.go index 1e4dccc0ed..da5571df5f 100644 --- a/test/e2e/knative_eventing_test.go +++ b/test/e2e/knative_eventing_test.go @@ -13,10 +13,13 @@ const ( var knativeControlPlaneDeploymentNames = []string{ "broker-controller", + "broker-filter", + "broker-ingress", "eventing-controller", "eventing-webhook", "imc-controller", "imc-dispatcher", + "mt-broker-controller", } func TestKnativeEventing(t *testing.T) { From 919ff54af4b879d0ff650f248969e244399868eb Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Wed, 13 May 2020 11:45:10 +0300 Subject: [PATCH 3/5] Don't block namespace deletion because of completed job pods --- hack/lib/namespaces.bash | 2 +- hack/lib/serverless.bash | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hack/lib/namespaces.bash b/hack/lib/namespaces.bash index ab2502cb18..af26bb2d17 100644 --- a/hack/lib/namespaces.bash +++ b/hack/lib/namespaces.bash @@ -15,7 +15,7 @@ function delete_namespaces { for ns in "${NAMESPACES[@]}"; do if oc get ns "${ns}" >/dev/null 2>&1; then logger.info "Waiting until there are no pods in ${ns} to safely remove it..." - timeout 600 "[[ \$(oc get pods -n $ns -o jsonpath='{.items}') != '[]' ]]" + timeout 600 "[[ \$(oc get pods -n $ns --field-selector=status.phase!=Succeeded -o jsonpath='{.items}') != '[]' ]]" oc delete ns "$ns" fi done diff --git a/hack/lib/serverless.bash b/hack/lib/serverless.bash index 16314e9f2a..89512a7922 100644 --- a/hack/lib/serverless.bash +++ b/hack/lib/serverless.bash @@ -164,14 +164,14 @@ function teardown_serverless { oc delete knativeserving.operator.knative.dev knative-serving -n "${SERVING_NAMESPACE}" || return $? fi logger.info 'Ensure no knative serving pods running' - timeout 600 "[[ \$(oc get pods -n ${SERVING_NAMESPACE} -o jsonpath='{.items}') != '[]' ]]" || return 9 + timeout 600 "[[ \$(oc get pods -n ${SERVING_NAMESPACE} --field-selector=status.phase!=Succeeded -o jsonpath='{.items}') != '[]' ]]" || return 9 if oc get knativeeventing.operator.knative.dev knative-eventing -n "${EVENTING_NAMESPACE}" >/dev/null 2>&1; then logger.info 'Removing KnativeEventing CR' oc delete knativeeventing.operator.knative.dev knative-eventing -n "${EVENTING_NAMESPACE}" || return $? fi logger.info 'Ensure no knative eventing pods running' - timeout 600 "[[ \$(oc get pods -n ${EVENTING_NAMESPACE} -o jsonpath='{.items}') != '[]' ]]" || return 9 + timeout 600 "[[ \$(oc get pods -n ${EVENTING_NAMESPACE} --field-selector=status.phase!=Succeeded -o jsonpath='{.items}') != '[]' ]]" || return 9 oc delete subscription -n "${OPERATORS_NAMESPACE}" "${OPERATOR}" 2>/dev/null for ip in $(oc get installplan -n "${OPERATORS_NAMESPACE}" | grep serverless-operator | cut -f1 -d' '); do From e14c78b5ad3e3a1463be222396da9394ddd7d606 Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Wed, 13 May 2020 12:28:20 +0300 Subject: [PATCH 4/5] Update eventing versions in bash vars --- hack/lib/vars.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/lib/vars.bash b/hack/lib/vars.bash index 7184c2e772..4285c2c7d3 100644 --- a/hack/lib/vars.bash +++ b/hack/lib/vars.bash @@ -13,8 +13,8 @@ source "$(dirname "${BASH_SOURCE[0]}")/../../test/vendor/knative.dev/test-infra/ readonly KNATIVE_SERVING_VERSION="${KNATIVE_SERVING_VERSION:-v0.13.3}" readonly KNATIVE_SERVING_OPERATOR_VERSION="${KNATIVE_SERVING_OPERATOR_VERSION:-v0.13.3}" -readonly KNATIVE_EVENTING_VERSION="${KNATIVE_EVENTING_VERSION:-v0.13.0}" -readonly KNATIVE_EVENTING_OPERATOR_VERSION="${KNATIVE_EVENTING_OPERATOR_VERSION:-0.13.2}" +readonly KNATIVE_EVENTING_VERSION="${KNATIVE_EVENTING_VERSION:-v0.14.0}" +readonly KNATIVE_EVENTING_OPERATOR_VERSION="${KNATIVE_EVENTING_OPERATOR_VERSION:-0.14}" readonly KNATIVE_SERVING_BRANCH="${KNATIVE_SERVING_BRANCH:-release-${KNATIVE_SERVING_VERSION}}" readonly KNATIVE_SERVING_OPERATOR_BRANCH="${KNATIVE_SERVING_OPERATOR_BRANCH:-openshift-${KNATIVE_SERVING_OPERATOR_VERSION}}" From 870fc67d3d6a3878713dcc9bbfb6abc1414c67eb Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Fri, 15 May 2020 11:19:03 +0300 Subject: [PATCH 5/5] Enable tracing for upstream eventing tests --- hack/lib/__sources__.bash | 2 +- hack/lib/tracing.bash | 90 +++++++++++++++++++++++++++++++++++++++ hack/lib/vars.bash | 4 +- hack/teardown.sh | 15 ++----- test/e2e-tests.sh | 4 +- test/lib.bash | 1 + 6 files changed, 101 insertions(+), 15 deletions(-) create mode 100644 hack/lib/tracing.bash diff --git a/hack/lib/__sources__.bash b/hack/lib/__sources__.bash index 7583ab9a1a..17fe54dfcd 100644 --- a/hack/lib/__sources__.bash +++ b/hack/lib/__sources__.bash @@ -1,6 +1,6 @@ #!/usr/bin/env bash -declare -a __sources=(vars common ui scaleup namespaces catalogsource serverless) +declare -a __sources=(vars common ui scaleup namespaces catalogsource serverless tracing) for source in "${__sources[@]}"; do # shellcheck disable=SC1091,SC1090 diff --git a/hack/lib/tracing.bash b/hack/lib/tracing.bash new file mode 100644 index 0000000000..62b633eb56 --- /dev/null +++ b/hack/lib/tracing.bash @@ -0,0 +1,90 @@ +#!/usr/bin/env bash + +function install_tracing { + deploy_zipkin + enable_eventing_tracing +} + +function deploy_zipkin { + logger.info "Installing Zipkin in namespace ${ZIPKIN_NAMESPACE}" + cat <