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/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 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 <