This is an automated email from the ASF dual-hosted git repository.

tsato pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 53e6ceee0a9ffa4fc9ff1437faabf6b8b20f1dce
Author: phantomjinx <[email protected]>
AuthorDate: Wed Sep 28 13:04:45 2022 +0100

    (e2e): Improvements for testing
    
    * Extends the timeout for testing to 90m since if in debug mode, the extra
      logging increases the testing time and takes slightly longer than 60m
    
    * Adds in extra debug statements for logging when running in debug mode
    
    * Exposes the LOG_LEVEL parameter to e2e testsuite so tests can be switched
      to debug mode
    
    * Prints the call stack for kamel binary if running test in debug mode
    
    * Fixes the StructuredLogs test by better detection of invalid operator log
      entries by the test
    
    * Provide functions to heal a crashed catalogsource pod by waiting for its
      pull-secret to become available and then deleting the pod and allowing the
      source to reprovision a new one
    
    * Fixes uninstall test by recognising roles are not deleted when install
      was by the OLM
    
    * Fixes install test by checking the LOG_LEVEL env var rather than string to
      read the operator log which can be truncated
    
    * Fixes to tests by extending timeouts for integration pods coming up
    
    * Removes some cleanups from individual tests as these should be taken care 
of
      by the cleanup of the namespace
    
    * Better logging when building the bundle and bundle index images
    
    # Conflicts:
    #       script/Makefile
---
 .github/actions/e2e-builder/action.yml             |  1 +
 .github/actions/e2e-builder/exec-tests.sh          |  6 +-
 .github/actions/e2e-common/action.yml              |  1 +
 .github/actions/e2e-common/exec-tests.sh           |  6 +-
 .github/actions/e2e-install/action.yml             |  1 +
 .github/actions/e2e-install/exec-tests.sh          |  6 +-
 .github/actions/e2e-knative-yaks/action.yml        |  1 +
 .github/actions/e2e-knative-yaks/exec-tests.sh     |  6 +-
 .github/actions/e2e-knative/action.yml             |  1 +
 .github/actions/e2e-knative/exec-tests.sh          |  6 +-
 .github/actions/e2e-upgrade/action.yml             |  1 +
 .github/actions/e2e-upgrade/exec-tests.sh          |  6 +-
 .../kamel-build-bundle/build-bundle-image.sh       | 12 ++-
 .../kamel-build-bundle/build-index-image.sh        |  2 +-
 .../kamel-install-global-operator/action.yml       |  1 +
 .../install-global-operator.sh                     | 12 ++-
 .../actions/kamel-preflight-test/preflight-test.sh |  2 +
 .github/workflows/builder.yml                      |  4 +
 .github/workflows/common.yml                       |  4 +
 .github/workflows/install.yml                      |  4 +
 .github/workflows/knative.yml                      |  4 +
 .github/workflows/manual-exec-process-inputs.sh    |  9 ++-
 .github/workflows/upgrade.yml                      |  4 +
 e2e/global/common/config/config_test.go            |  4 +-
 e2e/global/common/kamelet_test.go                  |  3 -
 e2e/global/common/operator_metrics_test.go         |  7 +-
 e2e/global/common/structured_logs_test.go          |  8 +-
 e2e/global/knative/knative_test.go                 |  2 +-
 e2e/namespace/install/cli/debug_test.go            |  2 +-
 e2e/namespace/install/cli/delete_test.go           | 14 ++--
 e2e/namespace/install/cli/install_test.go          |  9 +--
 e2e/namespace/install/cli/uninstall_test.go        | 18 ++++-
 e2e/namespace/install/kustomize/common.go          |  2 +-
 e2e/namespace/upgrade/olm_install_test.go          | 16 +++-
 e2e/namespace/upgrade/olm_upgrade_test.go          | 13 ++++
 e2e/namespace/upgrade/util.go                      | 49 ++++++++++++
 e2e/support/test_support.go                        | 89 +++++++++++++++++++---
 e2e/support/util/dump.go                           | 18 +++--
 pkg/cmd/version.go                                 |  5 +-
 .../integrationkit/integrationkit_controller.go    |  3 +
 pkg/platform/defaults.go                           | 20 +++++
 pkg/platform/operator.go                           |  8 ++
 pkg/platform/platform.go                           |  6 ++
 pkg/util/kubernetes/client.go                      |  7 ++
 script/Makefile                                    | 30 ++++----
 45 files changed, 361 insertions(+), 72 deletions(-)

diff --git a/.github/actions/e2e-builder/action.yml 
b/.github/actions/e2e-builder/action.yml
index 1f4e37f8c..96f0eb6a0 100644
--- a/.github/actions/e2e-builder/action.yml
+++ b/.github/actions/e2e-builder/action.yml
@@ -123,6 +123,7 @@ runs:
         -i "${{ steps.config-cluster.outputs.cluster-image-namespace }}" \
         -l "${{ steps.config-cluster.outputs.cluster-image-registry-pull-host 
}}" \
         -n "${{ steps.build-kamel.outputs.build-binary-local-image-name }}" \
+        -q "${{ env.CAMEL_K_LOG_LEVEL }}" \
         -s "${{steps.config-cluster.outputs.cluster-image-registry-insecure 
}}" \
         -v "${{ steps.build-kamel.outputs.build-binary-local-image-version }}" 
\
         -x "${{ env.CAMEL_K_TEST_SAVE_FAILED_TEST_NAMESPACE }}"
diff --git a/.github/actions/e2e-builder/exec-tests.sh 
b/.github/actions/e2e-builder/exec-tests.sh
index b52ecf1f4..44501de07 100755
--- a/.github/actions/e2e-builder/exec-tests.sh
+++ b/.github/actions/e2e-builder/exec-tests.sh
@@ -25,7 +25,7 @@
 
 set -e
 
-while getopts ":b:c:g:i:l:n:s:v:x:" opt; do
+while getopts ":b:c:g:i:l:n:q:s:v:x:" opt; do
   case "${opt}" in
     b)
       BUILD_CATALOG_SOURCE_NAME=${OPTARG}
@@ -45,6 +45,9 @@ while getopts ":b:c:g:i:l:n:s:v:x:" opt; do
     n)
       IMAGE_NAME=${OPTARG}
       ;;
+    q)
+      LOG_LEVEL=${OPTARG}
+      ;;
     s)
       REGISTRY_INSECURE=${OPTARG}
       ;;
@@ -114,6 +117,7 @@ export 
KAMEL_INSTALL_OPERATOR_IMAGE=${CUSTOM_IMAGE}:${CUSTOM_VERSION}
 # (see kamel-build-bundle/build-bundle-image.sh)
 export KAMEL_INSTALL_OPERATOR_IMAGE_PULL_POLICY="Always"
 
+export CAMEL_K_LOG_LEVEL="${LOG_LEVEL}"
 export CAMEL_K_TEST_IMAGE_NAME=${CUSTOM_IMAGE}
 export CAMEL_K_TEST_IMAGE_VERSION=${CUSTOM_VERSION}
 export CAMEL_K_TEST_SAVE_FAILED_TEST_NAMESPACE=${SAVE_FAILED_TEST_NS}
diff --git a/.github/actions/e2e-common/action.yml 
b/.github/actions/e2e-common/action.yml
index bfb8d9d4c..12c6993e5 100644
--- a/.github/actions/e2e-common/action.yml
+++ b/.github/actions/e2e-common/action.yml
@@ -117,6 +117,7 @@ runs:
         -i "${{ steps.config-cluster.outputs.cluster-image-namespace }}" \
         -l "${{ steps.config-cluster.outputs.cluster-image-registry-pull-host 
}}" \
         -n "${{ steps.build-kamel.outputs.build-binary-local-image-name }}" \
+        -q "${{ env.CAMEL_K_LOG_LEVEL }}" \
         -s "${{steps.config-cluster.outputs.cluster-image-registry-insecure 
}}" \
         -v "${{ steps.build-kamel.outputs.build-binary-local-image-version }}" 
\
         -x "${{ env.CAMEL_K_TEST_SAVE_FAILED_TEST_NAMESPACE }}"
diff --git a/.github/actions/e2e-common/exec-tests.sh 
b/.github/actions/e2e-common/exec-tests.sh
index 6423b5734..8b687ba2a 100755
--- a/.github/actions/e2e-common/exec-tests.sh
+++ b/.github/actions/e2e-common/exec-tests.sh
@@ -25,7 +25,7 @@
 
 set -e
 
-while getopts ":b:c:g:i:l:n:s:v:x:" opt; do
+while getopts ":b:c:g:i:l:n:q:s:v:x:" opt; do
   case "${opt}" in
     b)
       BUILD_CATALOG_SOURCE_NAME=${OPTARG}
@@ -45,6 +45,9 @@ while getopts ":b:c:g:i:l:n:s:v:x:" opt; do
     n)
       IMAGE_NAME=${OPTARG}
       ;;
+    q)
+      LOG_LEVEL=${OPTARG}
+      ;;
     s)
       REGISTRY_INSECURE=${OPTARG}
       ;;
@@ -114,6 +117,7 @@ export 
KAMEL_INSTALL_OPERATOR_IMAGE=${CUSTOM_IMAGE}:${CUSTOM_VERSION}
 # (see kamel-build-bundle/build-bundle-image.sh)
 export KAMEL_INSTALL_OPERATOR_IMAGE_PULL_POLICY="Always"
 
+export CAMEL_K_LOG_LEVEL="${LOG_LEVEL}"
 export CAMEL_K_TEST_IMAGE_NAME=${CUSTOM_IMAGE}
 export CAMEL_K_TEST_IMAGE_VERSION=${CUSTOM_VERSION}
 export CAMEL_K_TEST_SAVE_FAILED_TEST_NAMESPACE=${SAVE_FAILED_TEST_NS}
diff --git a/.github/actions/e2e-install/action.yml 
b/.github/actions/e2e-install/action.yml
index 8b2ebbf19..04fc81da8 100644
--- a/.github/actions/e2e-install/action.yml
+++ b/.github/actions/e2e-install/action.yml
@@ -103,6 +103,7 @@ runs:
         -i "${{ steps.config-cluster.outputs.cluster-image-namespace }}" \
         -l "${{ steps.config-cluster.outputs.cluster-image-registry-pull-host 
}}" \
         -n "${{ steps.build-kamel.outputs.build-binary-local-image-name }}" \
+        -q "${{ env.CAMEL_K_LOG_LEVEL }}" \
         -s "${{steps.config-cluster.outputs.cluster-image-registry-insecure 
}}" \
         -v "${{ steps.build-kamel.outputs.build-binary-local-image-version }}" 
\
         -x "${{ env.CAMEL_K_TEST_SAVE_FAILED_TEST_NAMESPACE }}"
diff --git a/.github/actions/e2e-install/exec-tests.sh 
b/.github/actions/e2e-install/exec-tests.sh
index 3b780d7f3..f85b44c67 100755
--- a/.github/actions/e2e-install/exec-tests.sh
+++ b/.github/actions/e2e-install/exec-tests.sh
@@ -25,7 +25,7 @@
 
 set -e
 
-while getopts ":b:c:i:l:n:s:v:x:" opt; do
+while getopts ":b:c:i:l:n:q:s:v:x:" opt; do
   case "${opt}" in
     b)
       BUILD_CATALOG_SOURCE_NAME=${OPTARG}
@@ -42,6 +42,9 @@ while getopts ":b:c:i:l:n:s:v:x:" opt; do
     n)
       IMAGE_NAME=${OPTARG}
       ;;
+    q)
+      LOG_LEVEL=${OPTARG}
+      ;;
     s)
       REGISTRY_INSECURE=${OPTARG}
       ;;
@@ -112,6 +115,7 @@ export 
KAMEL_INSTALL_OPERATOR_IMAGE=${CUSTOM_IMAGE}:${CUSTOM_VERSION}
 # (see kamel-build-bundle/build-bundle-image.sh)
 export KAMEL_INSTALL_OPERATOR_IMAGE_PULL_POLICY="Always"
 
+export CAMEL_K_LOG_LEVEL="${LOG_LEVEL}"
 export CAMEL_K_TEST_IMAGE_NAME=${CUSTOM_IMAGE}
 export CAMEL_K_TEST_IMAGE_VERSION=${CUSTOM_VERSION}
 export CAMEL_K_TEST_SAVE_FAILED_TEST_NAMESPACE=${SAVE_FAILED_TEST_NS}
diff --git a/.github/actions/e2e-knative-yaks/action.yml 
b/.github/actions/e2e-knative-yaks/action.yml
index 6d0ff89b2..68f072e76 100644
--- a/.github/actions/e2e-knative-yaks/action.yml
+++ b/.github/actions/e2e-knative-yaks/action.yml
@@ -125,6 +125,7 @@ runs:
         -i "${{ steps.config-cluster.outputs.cluster-image-namespace }}" \
         -l "${{ steps.config-cluster.outputs.cluster-image-registry-pull-host 
}}" \
         -n "${{ steps.build-kamel.outputs.build-binary-local-image-name }}" \
+        -q "${{ env.CAMEL_K_LOG_LEVEL }}" \
         -s "${{steps.config-cluster.outputs.cluster-image-registry-insecure 
}}" \
         -v "${{ steps.build-kamel.outputs.build-binary-local-image-version }}" 
\
         -x "${{ env.CAMEL_K_TEST_SAVE_FAILED_TEST_NAMESPACE }}"
diff --git a/.github/actions/e2e-knative-yaks/exec-tests.sh 
b/.github/actions/e2e-knative-yaks/exec-tests.sh
index 56b3d1644..a6075dbbc 100755
--- a/.github/actions/e2e-knative-yaks/exec-tests.sh
+++ b/.github/actions/e2e-knative-yaks/exec-tests.sh
@@ -25,7 +25,7 @@
 
 set -e
 
-while getopts ":b:c:i:l:n:s:v:x:" opt; do
+while getopts ":b:c:i:l:n:q:s:v:x:" opt; do
   case "${opt}" in
     b)
       BUILD_CATALOG_SOURCE_NAME=${OPTARG}
@@ -42,6 +42,9 @@ while getopts ":b:c:i:l:n:s:v:x:" opt; do
     n)
       IMAGE_NAME=${OPTARG}
       ;;
+    q)
+      LOG_LEVEL=${OPTARG}
+      ;;
     s)
       REGISTRY_INSECURE=${OPTARG}
       ;;
@@ -111,6 +114,7 @@ export 
KAMEL_INSTALL_OPERATOR_IMAGE=${CUSTOM_IMAGE}:${CUSTOM_VERSION}
 # (see kamel-build-bundle/build-bundle-image.sh)
 export KAMEL_INSTALL_OPERATOR_IMAGE_PULL_POLICY="Always"
 
+export CAMEL_K_LOG_LEVEL="${LOG_LEVEL}"
 export CAMEL_K_TEST_IMAGE_NAME=${CUSTOM_IMAGE}
 export CAMEL_K_TEST_IMAGE_VERSION=${CUSTOM_VERSION}
 export CAMEL_K_TEST_SAVE_FAILED_TEST_NAMESPACE=${SAVE_FAILED_TEST_NS}
diff --git a/.github/actions/e2e-knative/action.yml 
b/.github/actions/e2e-knative/action.yml
index ea3e4710a..4a69be056 100644
--- a/.github/actions/e2e-knative/action.yml
+++ b/.github/actions/e2e-knative/action.yml
@@ -121,6 +121,7 @@ runs:
         -i "${{ steps.config-cluster.outputs.cluster-image-namespace }}" \
         -l "${{ steps.config-cluster.outputs.cluster-image-registry-pull-host 
}}" \
         -n "${{ steps.build-kamel.outputs.build-binary-local-image-name }}" \
+        -q "${{ env.CAMEL_K_LOG_LEVEL }}" \
         -s "${{steps.config-cluster.outputs.cluster-image-registry-insecure 
}}" \
         -v "${{ steps.build-kamel.outputs.build-binary-local-image-version }}" 
\
         -x "${{ env.CAMEL_K_TEST_SAVE_FAILED_TEST_NAMESPACE }}"
diff --git a/.github/actions/e2e-knative/exec-tests.sh 
b/.github/actions/e2e-knative/exec-tests.sh
index fd591cbb7..0e3d94517 100755
--- a/.github/actions/e2e-knative/exec-tests.sh
+++ b/.github/actions/e2e-knative/exec-tests.sh
@@ -25,7 +25,7 @@
 
 set -e
 
-while getopts ":b:c:g:i:l:n:s:v:x:" opt; do
+while getopts ":b:c:g:i:l:n:q:s:v:x:" opt; do
   case "${opt}" in
     b)
       BUILD_CATALOG_SOURCE_NAME=${OPTARG}
@@ -45,6 +45,9 @@ while getopts ":b:c:g:i:l:n:s:v:x:" opt; do
     n)
       IMAGE_NAME=${OPTARG}
       ;;
+    q)
+      LOG_LEVEL=${OPTARG}
+      ;;
     s)
       REGISTRY_INSECURE=${OPTARG}
       ;;
@@ -115,6 +118,7 @@ export 
KAMEL_INSTALL_OPERATOR_IMAGE=${CUSTOM_IMAGE}:${CUSTOM_VERSION}
 # (see kamel-build-bundle/build-bundle-image.sh)
 export KAMEL_INSTALL_OPERATOR_IMAGE_PULL_POLICY="Always"
 
+export CAMEL_K_LOG_LEVEL="${LOG_LEVEL}"
 export CAMEL_K_TEST_IMAGE_NAME=${CUSTOM_IMAGE}
 export CAMEL_K_TEST_IMAGE_VERSION=${CUSTOM_VERSION}
 export CAMEL_K_TEST_SAVE_FAILED_TEST_NAMESPACE=${SAVE_FAILED_TEST_NS}
diff --git a/.github/actions/e2e-upgrade/action.yml 
b/.github/actions/e2e-upgrade/action.yml
index 5d5c3515b..8da9ee656 100644
--- a/.github/actions/e2e-upgrade/action.yml
+++ b/.github/actions/e2e-upgrade/action.yml
@@ -111,6 +111,7 @@ runs:
         -d "${{ steps.build-kamel.outputs.build-bundle-image-bundle-index }}" \
         -l "${{ steps.config-cluster.outputs.cluster-image-registry-pull-host 
}}" \
         -n "${{ steps.build-kamel.outputs.build-binary-local-image-name }}" \
+        -q "${{ env.CAMEL_K_LOG_LEVEL }}" \
         -s "${{ steps.config-cluster.outputs.cluster-image-registry-insecure 
}}" \
         -v "${{ steps.build-kamel.outputs.build-binary-local-image-version }}" 
\
         -x "${{ env.CAMEL_K_TEST_SAVE_FAILED_TEST_NAMESPACE }}"
diff --git a/.github/actions/e2e-upgrade/exec-tests.sh 
b/.github/actions/e2e-upgrade/exec-tests.sh
index be8ed47f3..367a578bc 100755
--- a/.github/actions/e2e-upgrade/exec-tests.sh
+++ b/.github/actions/e2e-upgrade/exec-tests.sh
@@ -25,7 +25,7 @@
 
 set -e
 
-while getopts ":b:d:l:n:s:v:x:" opt; do
+while getopts ":b:d:l:n:q:s:v:x:" opt; do
   case "${opt}" in
     b)
       KAMEL_BINARY=${OPTARG}
@@ -39,6 +39,9 @@ while getopts ":b:d:l:n:s:v:x:" opt; do
     n)
       IMAGE_NAME=${OPTARG}
       ;;
+    q)
+      LOG_LEVEL=${OPTARG}
+      ;;
     s)
       REGISTRY_INSECURE=${OPTARG}
       ;;
@@ -112,6 +115,7 @@ export KAMEL_INSTALL_OPERATOR_IMAGE_PULL_POLICY="Always"
 # Despite building a bundle we don't want it installed immediately so no 
OLM_INDEX_BUNDLE var
 
 # Configure test options
+export CAMEL_K_LOG_LEVEL="${LOG_LEVEL}"
 export CAMEL_K_PREV_IIB=quay.io/operatorhubio/catalog:latest
 export CAMEL_K_NEW_IIB=${BUNDLE_INDEX_IMAGE}
 export CAMEL_K_PREV_UPGRADE_CHANNEL=${PREV_XY_CHANNEL}
diff --git a/.github/actions/kamel-build-bundle/build-bundle-image.sh 
b/.github/actions/kamel-build-bundle/build-bundle-image.sh
index 0bd0edb68..f6c509cbf 100755
--- a/.github/actions/kamel-build-bundle/build-bundle-image.sh
+++ b/.github/actions/kamel-build-bundle/build-bundle-image.sh
@@ -23,7 +23,7 @@
 #
 ####
 
-set -e
+set +e
 
 while getopts ":i:l:n:s:v:" opt; do
   case "${opt}" in
@@ -115,10 +115,18 @@ echo "PREV_XY_CHANNEL=${PREV_XY_CHANNEL}" >> $GITHUB_ENV
 export NEW_XY_CHANNEL=stable-dev-$(make get-version | grep -Po "\d+\.\d+")
 echo "NEW_XY_CHANNEL=${NEW_XY_CHANNEL}" >> $GITHUB_ENV
 
+echo "BUNDLE_IMAGE_NAME=${PUSH_BUNDLE_LOCAL_IMAGE}"
+echo "DEFAULT_CHANNEL=${NEW_XY_CHANNEL}"
+echo "CHANNELS=${NEW_XY_CHANNEL}"
+
 make bundle-push \
   BUNDLE_IMAGE_NAME="${PUSH_BUNDLE_LOCAL_IMAGE}" \
   DEFAULT_CHANNEL="${NEW_XY_CHANNEL}" \
-  CHANNELS="${NEW_XY_CHANNEL}"
+  CHANNELS="${NEW_XY_CHANNEL}" 2>&1
+if [ $? != 0 ]; then
+  echo "Error: Making bundle failed."
+  exit 1
+fi
 
 #
 # Use the PULL host to ensure the correct image:tag
diff --git a/.github/actions/kamel-build-bundle/build-index-image.sh 
b/.github/actions/kamel-build-bundle/build-index-image.sh
index c8e61963e..e5d1fbbbc 100755
--- a/.github/actions/kamel-build-bundle/build-index-image.sh
+++ b/.github/actions/kamel-build-bundle/build-index-image.sh
@@ -182,7 +182,7 @@ if [ "${PULL_REGISTRY}" != "${PUSH_REGISTRY}" ]; then
   # Push the bundle image to the registry
   #
   echo "Pushing bundle image ..."
-  docker push ${BUNDLE_IMAGE}
+  docker push ${BUNDLE_IMAGE} 2>&1
 fi
 
 #
diff --git a/.github/actions/kamel-install-global-operator/action.yml 
b/.github/actions/kamel-install-global-operator/action.yml
index 4bd08aca0..e8b32288b 100644
--- a/.github/actions/kamel-install-global-operator/action.yml
+++ b/.github/actions/kamel-install-global-operator/action.yml
@@ -59,5 +59,6 @@ runs:
         -i "${{ inputs.image-namespace }}" \
         -l "${{ inputs.image-registry-host }}" \
         -n "${{ inputs.image-name }}" \
+        -q "${{ env.CAMEL_K_LOG_LEVEL }}" \
         -s "${{ inputs.image-registry-insecure }}" \
         -v "${{ inputs.image-version }}"
diff --git 
a/.github/actions/kamel-install-global-operator/install-global-operator.sh 
b/.github/actions/kamel-install-global-operator/install-global-operator.sh
index 485dbee73..1c7e6b41a 100755
--- a/.github/actions/kamel-install-global-operator/install-global-operator.sh
+++ b/.github/actions/kamel-install-global-operator/install-global-operator.sh
@@ -25,7 +25,7 @@
 
 set -e
 
-while getopts ":b:c:g:i:l:n:s:v:" opt; do
+while getopts ":b:c:g:i:l:n:q:s:v:" opt; do
   case "${opt}" in
     b)
       BUILD_CATALOG_SOURCE_NAME=${OPTARG}
@@ -45,6 +45,9 @@ while getopts ":b:c:g:i:l:n:s:v:" opt; do
     n)
       IMAGE_NAME=${OPTARG}
       ;;
+    q)
+      LOG_LEVEL=${OPTARG}
+      ;;
     s)
       REGISTRY_INSECURE=${OPTARG}
       ;;
@@ -155,10 +158,15 @@ export 
KAMEL_INSTALL_OPERATOR_IMAGE=${CUSTOM_IMAGE}:${CUSTOM_VERSION}
 # (see kamel-build-bundle/build-bundle-image.sh)
 export KAMEL_INSTALL_OPERATOR_IMAGE_PULL_POLICY="Always"
 
+logLevelSwitch=""
+if [ -n "${LOG_LEVEL}" ]; then
+  logLevelSwitch="--log-level ${LOG_LEVEL}"
+fi
+
 #
 # Install the operator
 #
-kamel install -n ${GLOBAL_OPERATOR_NAMESPACE} --olm=${has_olm} --force --global
+kamel install -n ${GLOBAL_OPERATOR_NAMESPACE} ${logLevelSwitch} 
--olm=${has_olm} --force --global
 if [ $? != 0 ]; then
   echo "Error: kamel install returned an error."
   exit 1
diff --git a/.github/actions/kamel-preflight-test/preflight-test.sh 
b/.github/actions/kamel-preflight-test/preflight-test.sh
index de9a6c911..f2779b9f8 100755
--- a/.github/actions/kamel-preflight-test/preflight-test.sh
+++ b/.github/actions/kamel-preflight-test/preflight-test.sh
@@ -29,7 +29,9 @@ NAMESPACE="preflight"
 
 delns() {
   echo "Deleting namespace ${1}"
+  set +e
   kubectl delete ns ${1} &> /dev/null
+  set -e
 }
 
 waitForOperator() {
diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml
index 8050a3a6d..0208f1248 100644
--- a/.github/workflows/builder.yml
+++ b/.github/workflows/builder.yml
@@ -44,6 +44,9 @@ on:
       - 'NOTICE'
   workflow_dispatch:
     inputs:
+      log-level:
+        description: 'Set the operator log level (info or debug)'
+        required: false
       pre-built-kamel-image:
         description: 'Kamel image url for skipping building of kamel stages. 
Used for debugging'
         required: false
@@ -81,6 +84,7 @@ jobs:
         ./.github/workflows/manual-exec-process-inputs.sh \
           -i "${{ github.event.inputs.pre-built-kamel-image }}" \
           -p "${{ github.event.inputs.skip-problematic }}" \
+          -q "${{ github.event.inputs.log-level }}" \
           -t "${{ github.event.inputs.test-filters }}"
 
     - name: Execute Builder Tests
diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml
index bbc948a91..f1a1d5681 100644
--- a/.github/workflows/common.yml
+++ b/.github/workflows/common.yml
@@ -44,6 +44,9 @@ on:
       - 'NOTICE'
   workflow_dispatch:
     inputs:
+      log-level:
+        description: 'Set the operator log level (info or debug)'
+        required: false
       pre-built-kamel-image:
         description: 'Kamel image url for skipping building of kamel stages. 
Used for debugging'
         required: false
@@ -81,6 +84,7 @@ jobs:
         ./.github/workflows/manual-exec-process-inputs.sh \
           -i "${{ github.event.inputs.pre-built-kamel-image }}" \
           -p "${{ github.event.inputs.skip-problematic }}" \
+          -q "${{ github.event.inputs.log-level }}" \
           -t "${{ github.event.inputs.test-filters }}"
 
     - name: Execute Tests
diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml
index aafdc1522..e7f5fc3ff 100644
--- a/.github/workflows/install.yml
+++ b/.github/workflows/install.yml
@@ -44,6 +44,9 @@ on:
       - 'NOTICE'
   workflow_dispatch:
     inputs:
+      log-level:
+        description: 'Set the operator log level (info or debug)'
+        required: false
       pre-built-kamel-image:
         description: 'Kamel image url for skipping building of kamel stages. 
Used for debugging'
         required: false
@@ -78,6 +81,7 @@ jobs:
         ./.github/workflows/manual-exec-process-inputs.sh \
           -i "${{ github.event.inputs.pre-built-kamel-image }}" \
           -p "${{ github.event.inputs.skip-problematic }}" \
+          -q "${{ github.event.inputs.log-level }}" \
           -t "${{ github.event.inputs.test-filters }}"
 
     - name: Execute Tests
diff --git a/.github/workflows/knative.yml b/.github/workflows/knative.yml
index 3009fd942..34cd9e1df 100644
--- a/.github/workflows/knative.yml
+++ b/.github/workflows/knative.yml
@@ -44,6 +44,9 @@ on:
       - 'NOTICE'
   workflow_dispatch:
     inputs:
+      log-level:
+        description: 'Set the operator log level (info or debug)'
+        required: false
       pre-built-kamel-image:
         description: 'Kamel image url for skipping building of kamel stages. 
Used for debugging'
         required: false
@@ -77,6 +80,7 @@ jobs:
         ./.github/workflows/manual-exec-process-inputs.sh \
           -i "${{ github.event.inputs.pre-built-kamel-image }}" \
           -p "${{ github.event.inputs.skip-problematic }}" \
+          -q "${{ github.event.inputs.log-level }}" \
           -t "${{ github.event.inputs.test-filters }}"
 
     - name: Execute KNative Tests
diff --git a/.github/workflows/manual-exec-process-inputs.sh 
b/.github/workflows/manual-exec-process-inputs.sh
index 186e26840..b751d6bf1 100755
--- a/.github/workflows/manual-exec-process-inputs.sh
+++ b/.github/workflows/manual-exec-process-inputs.sh
@@ -27,7 +27,7 @@ if [ -z "$GITHUB_ENV" ]; then
   rm -f "${GITHUB_ENV}"
 fi
 
-while getopts ":i:p:t:" opt; do
+while getopts ":i:p:q:t:" opt; do
   case "${opt}" in
     i)
       PRE_BUILT_IMAGE=${OPTARG}
@@ -35,6 +35,9 @@ while getopts ":i:p:t:" opt; do
     p)
       SKIP_PROBLEMATIC=${OPTARG}
       ;;
+    q)
+      LOG_LEVEL=${OPTARG}
+      ;;
     t)
       TEST_FILTERS=${OPTARG}
       ;;
@@ -50,6 +53,10 @@ while getopts ":i:p:t:" opt; do
 done
 shift $((OPTIND-1))
 
+if [ -n "${LOG_LEVEL}" ]; then
+  echo "CAMEL_K_LOG_LEVEL=${LOG_LEVEL}" >> $GITHUB_ENV
+fi
+
 if [ -n "${PRE_BUILT_IMAGE}" ]; then
   echo "DEBUG_USE_EXISTING_IMAGE=${PRE_BUILT_IMAGE}" >> $GITHUB_ENV
 fi
diff --git a/.github/workflows/upgrade.yml b/.github/workflows/upgrade.yml
index 01fd3cba3..802182494 100644
--- a/.github/workflows/upgrade.yml
+++ b/.github/workflows/upgrade.yml
@@ -44,6 +44,9 @@ on:
       - 'NOTICE'
   workflow_dispatch:
     inputs:
+      log-level:
+        description: 'Set the operator log level (info or debug)'
+        required: false
       pre-built-kamel-image:
         description: 'Kamel image url for skipping building of kamel stages. 
Used for debugging'
         required: false
@@ -77,6 +80,7 @@ jobs:
         ./.github/workflows/manual-exec-process-inputs.sh \
           -i "${{ github.event.inputs.pre-built-kamel-image }}" \
           -p "${{ github.event.inputs.skip-problematic }}" \
+          -q "${{ github.event.inputs.log-level }}" \
           -t "${{ github.event.inputs.test-filters }}"
 
     - name: Execute Upgrade Tests
diff --git a/e2e/global/common/config/config_test.go 
b/e2e/global/common/config/config_test.go
index a525ec273..38eb54e7b 100644
--- a/e2e/global/common/config/config_test.go
+++ b/e2e/global/common/config/config_test.go
@@ -329,8 +329,8 @@ func TestRunConfigExamples(t *testing.T) {
 
                        Expect(KamelRunWithID(operatorID, ns, 
"./files/build-property-file-route.groovy", "--build-property", 
"configmap:my-cm-test-build-property").Execute()).To(Succeed())
                        Eventually(IntegrationPodPhase(ns, 
"build-property-file-route"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
-                       Eventually(IntegrationConditionStatus(ns, 
"build-property-file-route", v1.IntegrationConditionReady), 
TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
-                       Eventually(IntegrationLogs(ns, 
"build-property-file-route"), 
TestTimeoutShort).Should(ContainSubstring("my-cool-application"))
+                       Eventually(IntegrationConditionStatus(ns, 
"build-property-file-route", v1.IntegrationConditionReady), 
TestTimeoutLong).Should(Equal(corev1.ConditionTrue))
+                       Eventually(IntegrationLogs(ns, 
"build-property-file-route"), 
TestTimeoutLong).Should(ContainSubstring("my-cool-application"))
                        Expect(Kamel("delete", "--all", "-n", 
ns).Execute()).To(Succeed())
                })
 
diff --git a/e2e/global/common/kamelet_test.go 
b/e2e/global/common/kamelet_test.go
index dd1b51a0b..5c4242fd3 100644
--- a/e2e/global/common/kamelet_test.go
+++ b/e2e/global/common/kamelet_test.go
@@ -68,9 +68,6 @@ func TestKameletClasspathLoading(t *testing.T) {
                        Eventually(IntegrationPodPhase(ns, 
"timer-custom-kamelet-integration"), 
TestTimeoutLong).Should(Equal(corev1.PodRunning))
 
                        Eventually(IntegrationLogs(ns, 
"timer-custom-kamelet-integration")).Should(ContainSubstring("great message"))
-
-                       // Cleanup
-                       Expect(Kamel("delete", "--all", "-n", 
ns).Execute()).Should(BeNil())
                })
        })
 }
diff --git a/e2e/global/common/operator_metrics_test.go 
b/e2e/global/common/operator_metrics_test.go
index db24f0f62..21169711a 100644
--- a/e2e/global/common/operator_metrics_test.go
+++ b/e2e/global/common/operator_metrics_test.go
@@ -73,7 +73,12 @@ func TestMetrics(t *testing.T) {
                Expect(pod).NotTo(BeNil())
 
                // pod.Namespace could be different from ns if using global 
operator
-               logs := StructuredLogs(pod.Namespace, pod.Name, 
corev1.PodLogOptions{}, false)
+               fmt.Printf("Fetching logs for operator pod %s in namespace %s", 
pod.Name, pod.Namespace)
+               logOptions := &corev1.PodLogOptions{
+                       Container: "camel-k-operator",
+               }
+               logs, err := StructuredLogs(pod.Namespace, pod.Name, 
logOptions, false)
+               Expect(err).To(BeNil())
                Expect(logs).NotTo(BeEmpty())
 
                response, err := TestClient().CoreV1().RESTClient().Get().
diff --git a/e2e/global/common/structured_logs_test.go 
b/e2e/global/common/structured_logs_test.go
index c0abcdc08..dde73f87e 100644
--- a/e2e/global/common/structured_logs_test.go
+++ b/e2e/global/common/structured_logs_test.go
@@ -23,6 +23,7 @@ limitations under the License.
 package common
 
 import (
+       "fmt"
        "testing"
 
        . "github.com/onsi/gomega"
@@ -47,7 +48,12 @@ func TestStructuredLogs(t *testing.T) {
                Expect(pod).NotTo(BeNil())
 
                // pod.Namespace could be different from ns if using global 
operator
-               logs := StructuredLogs(pod.Namespace, pod.Name, 
corev1.PodLogOptions{}, false)
+               fmt.Printf("Fetching logs for operator pod %s in namespace %s", 
pod.Name, pod.Namespace)
+               logOptions := &corev1.PodLogOptions{
+                       Container: "camel-k-operator",
+               }
+               logs, err := StructuredLogs(pod.Namespace, pod.Name, 
logOptions, false)
+               Expect(err).To(BeNil())
                Expect(logs).NotTo(BeEmpty())
 
                it := Integration(ns, name)()
diff --git a/e2e/global/knative/knative_test.go 
b/e2e/global/knative/knative_test.go
index 3dd55e660..fa9a9a2b4 100644
--- a/e2e/global/knative/knative_test.go
+++ b/e2e/global/knative/knative_test.go
@@ -99,7 +99,7 @@ func TestKnative(t *testing.T) {
                t.Run("Flow", func(t *testing.T) {
                        Expect(KamelRunWithID(operatorID, ns, 
"files/flow.yaml").Execute()).To(Succeed())
                        Eventually(IntegrationPodPhase(ns, "flow"), 
TestTimeoutLong).Should(Equal(v1.PodRunning))
-                       Eventually(IntegrationConditionStatus(ns, "flow", 
camelv1.IntegrationConditionReady), 
TestTimeoutShort).Should(Equal(v1.ConditionTrue))
+                       Eventually(IntegrationConditionStatus(ns, "flow", 
camelv1.IntegrationConditionReady), 
TestTimeoutLong).Should(Equal(v1.ConditionTrue))
 
                        t.Run("Scale to zero", func(t *testing.T) {
                                Eventually(IntegrationPod(ns, "flow"), 
TestTimeoutLong).Should(BeNil())
diff --git a/e2e/namespace/install/cli/debug_test.go 
b/e2e/namespace/install/cli/debug_test.go
index ed10e1b10..b916615a4 100644
--- a/e2e/namespace/install/cli/debug_test.go
+++ b/e2e/namespace/install/cli/debug_test.go
@@ -34,7 +34,7 @@ import (
 
 func TestKamelCLIDebug(t *testing.T) {
        WithNewTestNamespace(t, func(ns string) {
-               Expect(Kamel("install", "-n", ns).Execute()).To(Succeed())
+               Expect(KamelInstall(ns).Execute()).To(Succeed())
 
                t.Run("debug local default port check", func(t *testing.T) {
                        Expect(Kamel("run", "-n", ns, 
"files/yaml.yaml").Execute()).To(Succeed())
diff --git a/e2e/namespace/install/cli/delete_test.go 
b/e2e/namespace/install/cli/delete_test.go
index e453a304b..3f2fb88c4 100644
--- a/e2e/namespace/install/cli/delete_test.go
+++ b/e2e/namespace/install/cli/delete_test.go
@@ -42,14 +42,14 @@ func TestKamelCLIDelete(t *testing.T) {
                        Eventually(IntegrationPodPhase(ns, "yaml"), 
TestTimeoutLong).Should(Equal(corev1.PodRunning))
                        Expect(Kamel("delete", "yaml", "-n", 
ns).Execute()).To(Succeed())
                        Eventually(Integration(ns, "yaml")).Should(BeNil())
-                       Eventually(IntegrationPod(ns, "yaml"), 
TestTimeoutMedium).Should(BeNil())
+                       Eventually(IntegrationPod(ns, "yaml"), 
TestTimeoutLong).Should(BeNil())
                })
 
                t.Run("delete building integration", func(t *testing.T) {
                        Expect(KamelRunWithID(operatorID, ns, 
"../files/yaml.yaml").Execute()).To(Succeed())
                        Expect(Kamel("delete", "yaml", "-n", 
ns).Execute()).To(Succeed())
                        Eventually(Integration(ns, "yaml")).Should(BeNil())
-                       Eventually(IntegrationPod(ns, "yaml"), 
TestTimeoutMedium).Should(BeNil())
+                       Eventually(IntegrationPod(ns, "yaml"), 
TestTimeoutLong).Should(BeNil())
                })
 
                t.Run("delete integration from csv", func(t *testing.T) {
@@ -57,7 +57,7 @@ func TestKamelCLIDelete(t *testing.T) {
                        Eventually(IntegrationPodPhase(ns, "yaml"), 
TestTimeoutLong).Should(Equal(corev1.PodRunning))
                        Expect(Kamel("delete", "yaml", "-n", 
ns).Execute()).To(Succeed())
                        Eventually(Integration(ns, "yaml")).Should(BeNil())
-                       Eventually(IntegrationPod(ns, "yaml"), 
TestTimeoutMedium).Should(BeNil())
+                       Eventually(IntegrationPod(ns, "yaml"), 
TestTimeoutLong).Should(BeNil())
                })
 
                t.Run("delete several integrations", func(t *testing.T) {
@@ -67,10 +67,10 @@ func TestKamelCLIDelete(t *testing.T) {
                        Eventually(IntegrationPodPhase(ns, "java"), 
TestTimeoutLong).Should(Equal(corev1.PodRunning))
                        Expect(Kamel("delete", "yaml", "-n", 
ns).Execute()).To(Succeed())
                        Eventually(Integration(ns, "yaml")).Should(BeNil())
-                       Eventually(IntegrationPod(ns, "yaml"), 
TestTimeoutMedium).Should(BeNil())
+                       Eventually(IntegrationPod(ns, "yaml"), 
TestTimeoutLong).Should(BeNil())
                        Expect(Kamel("delete", "java", "-n", 
ns).Execute()).To(Succeed())
                        Eventually(Integration(ns, "java")).Should(BeNil())
-                       Eventually(IntegrationPod(ns, "java"), 
TestTimeoutMedium).Should(BeNil())
+                       Eventually(IntegrationPod(ns, "java"), 
TestTimeoutLong).Should(BeNil())
                })
 
                t.Run("delete all integrations", func(t *testing.T) {
@@ -80,9 +80,9 @@ func TestKamelCLIDelete(t *testing.T) {
                        Eventually(IntegrationPodPhase(ns, "java"), 
TestTimeoutLong).Should(Equal(corev1.PodRunning))
                        Expect(Kamel("delete", "--all", "-n", 
ns).Execute()).To(Succeed())
                        Eventually(Integration(ns, "yaml")).Should(BeNil())
-                       Eventually(IntegrationPod(ns, "yaml"), 
TestTimeoutMedium).Should(BeNil())
+                       Eventually(IntegrationPod(ns, "yaml"), 
TestTimeoutLong).Should(BeNil())
                        Eventually(Integration(ns, "java")).Should(BeNil())
-                       Eventually(IntegrationPod(ns, "java"), 
TestTimeoutMedium).Should(BeNil())
+                       Eventually(IntegrationPod(ns, "java"), 
TestTimeoutLong).Should(BeNil())
                })
        })
 }
diff --git a/e2e/namespace/install/cli/install_test.go 
b/e2e/namespace/install/cli/install_test.go
index 5bac8129c..f3a861a2b 100644
--- a/e2e/namespace/install/cli/install_test.go
+++ b/e2e/namespace/install/cli/install_test.go
@@ -40,7 +40,6 @@ import (
        "github.com/apache/camel-k/pkg/util/kubernetes"
        "github.com/apache/camel-k/pkg/util/openshift"
        consolev1 "github.com/openshift/api/console/v1"
-       corev1 "k8s.io/api/core/v1"
 )
 
 func TestBasicInstallation(t *testing.T) {
@@ -164,13 +163,7 @@ func TestInstallDebugLogging(t *testing.T) {
                operatorID := fmt.Sprintf("camel-k-%s", ns)
                Expect(KamelInstallWithID(operatorID, ns, "-z", 
"debug").Execute()).To(Succeed())
 
-               podFunc := OperatorPod(ns)
-               Eventually(podFunc).ShouldNot(BeNil())
-
-               pod := podFunc()
-               logs := Logs(pod.Namespace, pod.Name, corev1.PodLogOptions{})
-               Eventually(logs).ShouldNot(BeEmpty())
-               Eventually(logs).Should(ContainSubstring("DEBUG level messages 
will be logged"))
+               Eventually(OperatorEnvVarValue(ns, "LOG_LEVEL"), 
TestTimeoutLong).Should(Equal("debug"))
        })
 }
 
diff --git a/e2e/namespace/install/cli/uninstall_test.go 
b/e2e/namespace/install/cli/uninstall_test.go
index abf03749f..14d0686cc 100644
--- a/e2e/namespace/install/cli/uninstall_test.go
+++ b/e2e/namespace/install/cli/uninstall_test.go
@@ -29,6 +29,7 @@ import (
        . "github.com/onsi/gomega"
 
        . "github.com/apache/camel-k/e2e/support"
+       "github.com/apache/camel-k/pkg/util/olm"
 )
 
 func TestBasicUninstall(t *testing.T) {
@@ -40,10 +41,25 @@ func TestBasicUninstall(t *testing.T) {
 
                // should be completely removed on uninstall
                Expect(Kamel("uninstall", "-n", ns, "--skip-crd", 
"--skip-cluster-roles").Execute()).To(Succeed())
+
+               // Roles only removed in non-olm use-case
+               uninstallViaOLM := false
+               var err error
+               if uninstallViaOLM, err = olm.IsAPIAvailable(TestContext, 
TestClient(), ns); err != nil {
+                       t.Error(err)
+                       t.FailNow()
+               }
+
+               if !uninstallViaOLM {
                Eventually(Role(ns)).Should(BeNil())
                Eventually(RoleBinding(ns)).Should(BeNil())
+                       Eventually(ServiceAccount(ns, 
"camel-k-operator")).Should(BeNil())
+               } else {
+                       Eventually(Role(ns)).ShouldNot(BeNil())
+                       Eventually(RoleBinding(ns)).ShouldNot(BeNil())
+               }
+
                Eventually(Configmap(ns, 
"camel-k-maven-settings")).Should(BeNil())
-               Eventually(ServiceAccount(ns, 
"camel-k-operator")).Should(BeNil())
                Eventually(OperatorPod(ns), TestTimeoutMedium).Should(BeNil())
                Eventually(KameletList(ns)).Should(BeEmpty())
        })
diff --git a/e2e/namespace/install/kustomize/common.go 
b/e2e/namespace/install/kustomize/common.go
index 15c12b655..adcc1ce5d 100644
--- a/e2e/namespace/install/kustomize/common.go
+++ b/e2e/namespace/install/kustomize/common.go
@@ -100,7 +100,7 @@ func ExecMakeError(t *testing.T, command *exec.Cmd) {
 // Clean up the cluster ready for the next set of tests
 func Cleanup() {
        // Remove the locally installed operator
-       Kamel("uninstall", "--olm=false").Execute()
+       UninstallAll()
 
        // Ensure the CRDs & ClusterRoles are reinstalled if not already
        Kamel("install", "--olm=false", "--cluster-setup").Execute()
diff --git a/e2e/namespace/upgrade/olm_install_test.go 
b/e2e/namespace/upgrade/olm_install_test.go
index a228978a7..bc12ea6a7 100644
--- a/e2e/namespace/upgrade/olm_install_test.go
+++ b/e2e/namespace/upgrade/olm_install_test.go
@@ -29,6 +29,7 @@ import (
 
        . "github.com/apache/camel-k/e2e/support"
        . "github.com/onsi/gomega"
+       "github.com/stretchr/testify/assert"
 
        corev1 "k8s.io/api/core/v1"
 
@@ -36,6 +37,7 @@ import (
 
        v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
        "github.com/apache/camel-k/pkg/util/defaults"
+       "github.com/apache/camel-k/pkg/util/openshift"
 )
 
 const installCatalogSourceName = "test-camel-k-source"
@@ -53,7 +55,19 @@ func TestOLMInstallation(t *testing.T) {
 
        WithNewTestNamespace(t, func(ns string) {
                Expect(createOrUpdateCatalogSource(ns, 
installCatalogSourceName, newIIB)).To(Succeed())
-               Eventually(catalogSourcePhase(ns, installCatalogSourceName), 
TestTimeoutMedium).Should(Equal("READY"))
+
+               ocp, err := openshift.IsOpenShift(TestClient())
+               assert.Nil(t, err)
+
+               if ocp {
+                       // Wait for pull secret to be created in namespace
+                       // eg. test-camel-k-source-dockercfg-zlltn
+                       secretPrefix := fmt.Sprintf("%s-dockercfg-", 
installCatalogSourceName)
+                       Eventually(SecretByName(ns, secretPrefix), 
TestTimeoutLong).Should(Not(BeNil()))
+               }
+
+               Eventually(catalogSourcePodRunning(ns, 
installCatalogSourceName), TestTimeoutMedium).Should(BeNil())
+               Eventually(catalogSourcePhase(ns, installCatalogSourceName), 
TestTimeoutLong).Should(Equal("READY"))
 
                args := []string{"install", "-n", ns, "--olm=true", 
"--olm-source", installCatalogSourceName, "--olm-source-namespace", ns}
 
diff --git a/e2e/namespace/upgrade/olm_upgrade_test.go 
b/e2e/namespace/upgrade/olm_upgrade_test.go
index 1a27c7c60..6b71804c7 100644
--- a/e2e/namespace/upgrade/olm_upgrade_test.go
+++ b/e2e/namespace/upgrade/olm_upgrade_test.go
@@ -30,6 +30,7 @@ import (
 
        . "github.com/apache/camel-k/e2e/support"
        . "github.com/onsi/gomega"
+       "github.com/stretchr/testify/assert"
 
        corev1 "k8s.io/api/core/v1"
        "k8s.io/apimachinery/pkg/types"
@@ -41,6 +42,7 @@ import (
 
        v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
        "github.com/apache/camel-k/pkg/util/defaults"
+       "github.com/apache/camel-k/pkg/util/openshift"
 )
 
 const catalogSourceName = "test-camel-k-source"
@@ -66,6 +68,17 @@ func TestOLMAutomaticUpgrade(t *testing.T) {
 
        WithNewTestNamespace(t, func(ns string) {
                Expect(createOrUpdateCatalogSource(ns, catalogSourceName, 
prevIIB)).To(Succeed())
+               ocp, err := openshift.IsOpenShift(TestClient())
+               assert.Nil(t, err)
+
+               if ocp {
+                       // Wait for pull secret to be created in namespace
+                       // eg. test-camel-k-source-dockercfg-zlltn
+                       secretPrefix := fmt.Sprintf("%s-dockercfg-", 
catalogSourceName)
+                       Eventually(SecretByName(ns, secretPrefix), 
TestTimeoutLong).Should(Not(BeNil()))
+               }
+
+               Eventually(catalogSourcePodRunning(ns, catalogSourceName), 
TestTimeoutMedium).Should(BeNil())
                Eventually(catalogSourcePhase(ns, catalogSourceName), 
TestTimeoutMedium).Should(Equal("READY"))
 
                // Set KAMEL_BIN only for this test - don't override the ENV 
variable for all tests
diff --git a/e2e/namespace/upgrade/util.go b/e2e/namespace/upgrade/util.go
index 616ffcd00..42da566cc 100644
--- a/e2e/namespace/upgrade/util.go
+++ b/e2e/namespace/upgrade/util.go
@@ -23,9 +23,12 @@ limitations under the License.
 package common
 
 import (
+       "fmt"
        "strings"
+       "time"
        "unsafe"
 
+       corev1 "k8s.io/api/core/v1"
        "k8s.io/apimachinery/pkg/api/errors"
        metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
@@ -114,6 +117,52 @@ func catalogSourcePhase(ns, name string) func() string {
        }
 }
 
+func catalogSourcePod(ns, csName string) func() *corev1.Pod {
+       return func() *corev1.Pod {
+               podList, err := 
TestClient().CoreV1().Pods(ns).List(TestContext, metav1.ListOptions{})
+               if err != nil && errors.IsNotFound(err) {
+                       return nil
+               } else if err != nil {
+                       panic(err)
+               }
+
+               if len(podList.Items) == 0 {
+                       return nil
+               }
+
+               for _, pod := range podList.Items {
+                       if strings.HasPrefix(pod.Name, csName) {
+                               return &pod
+                       }
+               }
+
+               return nil
+       }
+}
+
+func catalogSourcePodRunning(ns, csName string) error {
+       podFunc := catalogSourcePod(ns, installCatalogSourceName)
+
+       for i := 1; i < 5; i++ {
+               csPod := podFunc()
+               if csPod.Status.Phase == "Running" {
+                       return nil // Pod good to go
+               }
+
+               if i == 2 {
+                       fmt.Println("Catalog Source Pod still not ready so 
delete & allow it to be redeployed ...")
+                       if err := TestClient().Delete(TestContext, csPod); err 
!= nil {
+                               return err
+                       }
+               }
+
+               fmt.Println("Catalog Source Pod not ready so waiting for 2 
minutes ...")
+               time.Sleep(2 * time.Minute)
+       }
+
+       return fmt.Errorf("Catalog Source Pod failed to reach a 'running' 
state")
+}
+
 func getSubscription(ns string) (*olm.Subscription, error) {
        lst := olm.SubscriptionList{}
        if err := TestClient().List(TestContext, &lst, ctrl.InNamespace(ns)); 
err != nil {
diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go
index f4f797d53..4e4f0013f 100644
--- a/e2e/support/test_support.go
+++ b/e2e/support/test_support.go
@@ -33,6 +33,7 @@ import (
        "os"
        "os/exec"
        "reflect"
+       "runtime/debug"
        "strings"
        "testing"
        "time"
@@ -249,6 +250,12 @@ func KamelInstallWithContext(ctx context.Context, 
operatorID string, namespace s
                installArgs = []string{"install", "-n", namespace, 
"--operator-id", operatorID}
        }
 
+       logLevel := os.Getenv("CAMEL_K_LOG_LEVEL")
+       if len(logLevel) > 0 {
+               fmt.Printf("Setting log-level to %s\n", logLevel)
+               installArgs = append(installArgs, "--log-level", logLevel)
+       }
+
        installArgs = append(installArgs, args...)
        return KamelWithContext(ctx, installArgs...)
 }
@@ -317,6 +324,12 @@ func KamelWithContext(ctx context.Context, args ...string) 
*cobra.Command {
        var c *cobra.Command
        var err error
 
+       if os.Getenv("CAMEL_K_LOG_LEVEL") == "debug" {
+               fmt.Printf("Executing kamel with command %+q\n", args)
+               fmt.Println("Printing stack for KamelWithContext")
+               debug.PrintStack()
+       }
+
        kamelArgs := os.Getenv("KAMEL_ARGS")
        kamelDefaultArgs := strings.Fields(kamelArgs)
        args = append(kamelDefaultArgs, args...)
@@ -437,30 +450,34 @@ func Logs(ns, podName string, options 
corev1.PodLogOptions) func() string {
        }
 }
 
-func StructuredLogs(ns, podName string, options corev1.PodLogOptions, 
ignoreParseErrors bool) []util.LogEntry {
-       byteReader, err := TestClient().CoreV1().Pods(ns).GetLogs(podName, 
&options).Stream(TestContext)
+func StructuredLogs(ns, podName string, options *corev1.PodLogOptions, 
ignoreParseErrors bool) ([]util.LogEntry, error) {
+
+       stream, err := TestClient().CoreV1().Pods(ns).GetLogs(podName, 
options).Stream(TestContext)
        if err != nil {
-               log.Error(err, "Error while reading container logs")
-               return nil
+               msg := "Error while reading container logs"
+               log.Error(err, msg)
+               return nil, fmt.Errorf("%s: %w\n", msg, err)
        }
        defer func() {
-               if err := byteReader.Close(); err != nil {
+               if err := stream.Close(); err != nil {
                        log.Error(err, "Error closing the stream")
                }
        }()
 
        entries := make([]util.LogEntry, 0)
-       scanner := bufio.NewScanner(byteReader)
+       scanner := bufio.NewScanner(stream)
        for scanner.Scan() {
                entry := util.LogEntry{}
                t := scanner.Text()
                err := json.Unmarshal([]byte(t), &entry)
                if err != nil {
                        if ignoreParseErrors {
+                               fmt.Printf("Warning: Ignoring parse error for 
logging line: '%s'\n", t)
                                continue
                        } else {
-                               log.Errorf(err, "Unable to parse structured 
content: %s", t)
-                               return nil
+                               msg := fmt.Sprintf("Unable to parse structured 
content: %s", t)
+                               log.Errorf(err, msg)
+                               return nil, fmt.Errorf("%s %w\n", msg, err)
                        }
                }
 
@@ -468,11 +485,18 @@ func StructuredLogs(ns, podName string, options 
corev1.PodLogOptions, ignorePars
        }
 
        if err := scanner.Err(); err != nil {
-               log.Error(err, "Error while scanning container logs")
-               return nil
+               msg := "Error while scanning container logs"
+               log.Error(err, msg)
+               return nil, fmt.Errorf("%s %w\n", msg, err)
+       }
+
+       if len(entries) == 0 {
+               msg := "Error fetched zero log entries"
+               log.Error(err, msg)
+               return nil, fmt.Errorf("%s %w\n", msg, err)
        }
 
-       return entries
+       return entries, nil
 }
 
 func IntegrationPodPhase(ns string, name string) func() corev1.PodPhase {
@@ -1143,6 +1167,23 @@ func OperatorPodPhase(ns string) func() corev1.PodPhase {
        }
 }
 
+func OperatorEnvVarValue(ns string, key string) func() string {
+       return func() string {
+               pod := OperatorPod(ns)()
+               if pod == nil || len(pod.Spec.Containers) == 0 {
+                       return ""
+               }
+               envvars := pod.Spec.Containers[0].Env
+               for _, v := range envvars {
+                       if v.Name == key {
+                               return v.Value
+                       }
+               }
+
+               return ""
+       }
+}
+
 func Configmap(ns string, name string) func() *corev1.ConfigMap {
        return func() *corev1.ConfigMap {
                cm := corev1.ConfigMap{
@@ -1249,6 +1290,32 @@ func CreatePlainTextSecret(ns string, name string, data 
map[string]string) error
        return TestClient().Create(TestContext, &sec)
 }
 
+//
+// Finds a secret in the given namespace by name or prefix of name
+//
+func SecretByName(ns string, prefix string) func() *corev1.Secret {
+       return func() *corev1.Secret {
+               secretList, err := 
TestClient().CoreV1().Secrets(ns).List(TestContext, metav1.ListOptions{})
+               if err != nil && k8serrors.IsNotFound(err) {
+                       return nil
+               } else if err != nil {
+                       failTest(err)
+               }
+
+               if len(secretList.Items) == 0 {
+                       return nil
+               }
+
+               for _, secret := range secretList.Items {
+                       if strings.HasPrefix(secret.Name, prefix) {
+                               return &secret
+                       }
+               }
+
+               return nil
+       }
+}
+
 func KnativeService(ns string, name string) func() *servingv1.Service {
        return func() *servingv1.Service {
                answer := servingv1.Service{
diff --git a/e2e/support/util/dump.go b/e2e/support/util/dump.go
index 2a069c637..847821c2a 100644
--- a/e2e/support/util/dump.go
+++ b/e2e/support/util/dump.go
@@ -138,7 +138,7 @@ func Dump(ctx context.Context, c client.Client, ns string, 
t *testing.T) error {
                return err
        }
 
-       t.Logf("\nFound %d pods:\n", len(lst.Items))
+       t.Logf("\nFound %d pods in %q:\n", len(lst.Items), ns)
        for _, pod := range lst.Items {
                t.Logf("name=%s\n", pod.Name)
 
@@ -216,7 +216,7 @@ func Dump(ctx context.Context, c client.Client, ns string, 
t *testing.T) error {
                        return err
                }
 
-               t.Logf("\nFound %d pods:\n", len(lst.Items))
+               t.Logf("\nFound %d pods in global namespace %q:\n", 
len(lst.Items), opns)
                for _, pod := range lst.Items {
                        if !strings.Contains(pod.Name, "camel-k") {
                                // ignore other global operators
@@ -252,11 +252,17 @@ func dumpConditions(prefix string, conditions 
[]corev1.PodCondition, t *testing.
 }
 
 func dumpLogs(ctx context.Context, c client.Client, prefix string, ns string, 
name string, container string, t *testing.T) error {
-       lines := int64(50)
-       stream, err := c.CoreV1().Pods(ns).GetLogs(name, &corev1.PodLogOptions{
+       logOptions := &corev1.PodLogOptions{
                Container: container,
-               TailLines: &lines,
-       }).Stream(ctx)
+       }
+
+       if os.Getenv("CAMEL_K_LOG_LEVEL") != "debug" {
+               // If not in debug mode then curtail the dumping of log lines
+               lines := int64(50)
+               logOptions.TailLines = &lines
+       }
+
+       stream, err := c.CoreV1().Pods(ns).GetLogs(name, logOptions).Stream(ctx)
        if err != nil {
                return err
        }
diff --git a/pkg/cmd/version.go b/pkg/cmd/version.go
index 6cec424d6..e789fb9b7 100644
--- a/pkg/cmd/version.go
+++ b/pkg/cmd/version.go
@@ -31,6 +31,7 @@ import (
        "github.com/apache/camel-k/pkg/client"
        platformutil "github.com/apache/camel-k/pkg/platform"
        "github.com/apache/camel-k/pkg/util/defaults"
+       "github.com/apache/camel-k/pkg/util/log"
 )
 
 // VersionVariant may be overridden at build time.
@@ -155,7 +156,9 @@ func operatorInfo(ctx context.Context, c client.Client, 
namespace string) (map[s
                }
        }
 
-       return fromCamelCase(infos), nil
+       ccInfo := fromCamelCase(infos)
+       log.Debugf("Operator Info for namespace %s: %v", namespace, ccInfo)
+       return ccInfo, nil
 }
 
 func fromCamelCase(infos map[string]string) map[string]string {
diff --git a/pkg/controller/integrationkit/integrationkit_controller.go 
b/pkg/controller/integrationkit/integrationkit_controller.go
index 02a5c7ce8..cdb41fe11 100644
--- a/pkg/controller/integrationkit/integrationkit_controller.go
+++ b/pkg/controller/integrationkit/integrationkit_controller.go
@@ -191,6 +191,7 @@ func (r *reconcileIntegrationKit) Reconcile(ctx 
context.Context, request reconci
 
        // Make sure the operator is allowed to act on namespace
        if ok, err := platform.IsOperatorAllowedOnNamespace(ctx, r.client, 
request.Namespace); err != nil {
+               log.Debugf("Error occurred when checking whether operator is 
allowed in namespace %s: %v", request.Namespace, err)
                return reconcile.Result{}, err
        } else if !ok {
                rlog.Info("Ignoring request because namespace is locked")
@@ -221,6 +222,7 @@ func (r *reconcileIntegrationKit) Reconcile(ctx 
context.Context, request reconci
        targetLog := rlog.ForIntegrationKit(target)
 
        if target.Status.Phase == v1.IntegrationKitPhaseNone || 
target.Status.Phase == v1.IntegrationKitPhaseWaitingForPlatform {
+               rlog.Debug("Preparing to shift integration kit phase")
                if target.Labels[v1.IntegrationKitTypeLabel] == 
v1.IntegrationKitTypeExternal {
                        target.Status.Phase = 
v1.IntegrationKitPhaseInitialization
                        return r.update(ctx, &instance, target)
@@ -236,6 +238,7 @@ func (r *reconcileIntegrationKit) Reconcile(ctx 
context.Context, request reconci
 
                if instance.Status.Phase != target.Status.Phase {
                        if err != nil {
+                               rlog.Debugf("Error occurred while searching for 
platform. Cannot advance phase until cleared: %v", err)
                                
target.Status.SetErrorCondition(v1.IntegrationKitConditionPlatformAvailable, 
v1.IntegrationKitConditionPlatformAvailableReason, err)
                        }
 
diff --git a/pkg/platform/defaults.go b/pkg/platform/defaults.go
index 9e41d82cc..f1168c623 100644
--- a/pkg/platform/defaults.go
+++ b/pkg/platform/defaults.go
@@ -55,6 +55,7 @@ func ConfigureDefaults(ctx context.Context, c client.Client, 
p *v1.IntegrationPl
 
        // update missing fields in the resource
        if p.Status.Cluster == "" {
+               log.Debugf("Integration Platform [%s]: setting cluster status", 
p.Namespace)
                // determine the kind of cluster the platform is installed into
                isOpenShift, err := openshift.IsOpenShift(c)
                switch {
@@ -68,6 +69,7 @@ func ConfigureDefaults(ctx context.Context, c client.Client, 
p *v1.IntegrationPl
        }
 
        if p.Status.Build.PublishStrategy == "" {
+               log.Debugf("Integration Platform [%s]: setting publishing 
strategy", p.Namespace)
                if p.Status.Cluster == v1.IntegrationPlatformClusterOpenShift {
                        p.Status.Build.PublishStrategy = 
v1.IntegrationPlatformBuildPublishStrategyS2I
                } else {
@@ -76,6 +78,7 @@ func ConfigureDefaults(ctx context.Context, c client.Client, 
p *v1.IntegrationPl
        }
 
        if p.Status.Build.BuildStrategy == "" {
+               log.Debugf("Integration Platform [%s]: setting build strategy", 
p.Namespace)
                // Use the fastest strategy that they support (routine when 
possible)
                if p.Status.Build.PublishStrategy == 
v1.IntegrationPlatformBuildPublishStrategyS2I ||
                        p.Status.Build.PublishStrategy == 
v1.IntegrationPlatformBuildPublishStrategySpectrum {
@@ -114,6 +117,7 @@ func ConfigureDefaults(ctx context.Context, c 
client.Client, p *v1.IntegrationPl
 }
 
 func CreateBuilderServiceAccount(ctx context.Context, client client.Client, p 
*v1.IntegrationPlatform) error {
+       log.Debugf("Integration Platform [%s]: creating build service account", 
p.Namespace)
        sa := corev1.ServiceAccount{}
        key := ctrl.ObjectKey{
                Name:      BuilderServiceAccount,
@@ -132,6 +136,7 @@ func configureRegistry(ctx context.Context, c 
client.Client, p *v1.IntegrationPl
        if p.Status.Cluster == v1.IntegrationPlatformClusterOpenShift &&
                p.Status.Build.PublishStrategy != 
v1.IntegrationPlatformBuildPublishStrategyS2I &&
                p.Status.Build.Registry.Address == "" {
+               log.Debugf("Integration Platform [%s]: setting registry 
address", p.Namespace)
                // Default to using OpenShift internal container images 
registry when using a strategy other than S2I
                p.Status.Build.Registry.Address = 
"image-registry.openshift-image-registry.svc:5000"
 
@@ -140,10 +145,12 @@ func configureRegistry(ctx context.Context, c 
client.Client, p *v1.IntegrationPl
                if err != nil {
                        return err
                }
+               log.Debugf("Integration Platform [%s]: setting registry 
certificate authority", p.Namespace)
                p.Status.Build.Registry.CA = cm.Name
 
                // Default to using the registry secret that's configured for 
the builder service account
                if p.Status.Build.Registry.Secret == "" {
+                       log.Debugf("Integration Platform [%s]: setting registry 
secret", p.Namespace)
                        // Bind the required role to push images to the registry
                        err := createBuilderRegistryRoleBinding(ctx, c, p)
                        if err != nil {
@@ -174,23 +181,30 @@ func configureRegistry(ctx context.Context, c 
client.Client, p *v1.IntegrationPl
                        p.Status.Build.Registry.Address = *address
                }
        }
+
+       log.Debugf("Final Registry Address: %s", 
p.Status.Build.Registry.Address)
        return nil
 }
 
 func setPlatformDefaults(p *v1.IntegrationPlatform, verbose bool) error {
        if p.Status.Build.PublishStrategyOptions == nil {
+               log.Debugf("Integration Platform [%s]: setting publish strategy 
options", p.Namespace)
                p.Status.Build.PublishStrategyOptions = map[string]string{}
        }
        if p.Status.Build.RuntimeVersion == "" {
+               log.Debugf("Integration Platform [%s]: setting runtime 
version", p.Namespace)
                p.Status.Build.RuntimeVersion = defaults.DefaultRuntimeVersion
        }
        if p.Status.Build.BaseImage == "" {
+               log.Debugf("Integration Platform [%s]: setting base image", 
p.Namespace)
                p.Status.Build.BaseImage = defaults.BaseImage()
        }
        if p.Status.Build.Maven.LocalRepository == "" {
+               log.Debugf("Integration Platform [%s]: setting local 
repository", p.Namespace)
                p.Status.Build.Maven.LocalRepository = defaults.LocalRepository
        }
        if len(p.Status.Build.Maven.CLIOptions) == 0 {
+               log.Debugf("Integration Platform [%s]: setting CLI options", 
p.Namespace)
                p.Status.Build.Maven.CLIOptions = []string{
                        "-V",
                        "--no-transfer-progress",
@@ -198,6 +212,7 @@ func setPlatformDefaults(p *v1.IntegrationPlatform, verbose 
bool) error {
                }
        }
        if _, ok := 
p.Status.Build.PublishStrategyOptions[builder.KanikoPVCName]; !ok {
+               log.Debugf("Integration Platform [%s]: setting publish strategy 
options", p.Namespace)
                p.Status.Build.PublishStrategyOptions[builder.KanikoPVCName] = 
p.Name
        }
 
@@ -208,6 +223,7 @@ func setPlatformDefaults(p *v1.IntegrationPlatform, verbose 
bool) error {
                        log.Log.Infof("Build timeout minimum unit is sec 
(configured: %s, truncated: %s)", p.Status.Build.GetTimeout().Duration, d)
                }
 
+               log.Debugf("Integration Platform [%s]: setting build timeout", 
p.Namespace)
                p.Status.Build.Timeout = &metav1.Duration{
                        Duration: d,
                }
@@ -230,6 +246,7 @@ func setPlatformDefaults(p *v1.IntegrationPlatform, verbose 
bool) error {
        }
 
        if len(p.Status.Kamelet.Repositories) == 0 {
+               log.Debugf("Integration Platform [%s]: setting kamelet 
repositories", p.Namespace)
                p.Status.Kamelet.Repositories = 
append(p.Status.Kamelet.Repositories, 
v1.IntegrationPlatformKameletRepositorySpec{
                        URI: repository.DefaultRemoteRepository,
                })
@@ -248,11 +265,14 @@ func setPlatformDefaults(p *v1.IntegrationPlatform, 
verbose bool) error {
 
 func setStatusAdditionalInfo(platform *v1.IntegrationPlatform) {
        platform.Status.Info = make(map[string]string)
+
+       log.Debugf("Integration Platform [%s]: setting build publish strategy", 
platform.Namespace)
        if platform.Spec.Build.PublishStrategy == 
v1.IntegrationPlatformBuildPublishStrategyBuildah {
                platform.Status.Info["buildahVersion"] = defaults.BuildahVersion
        } else if platform.Spec.Build.PublishStrategy == 
v1.IntegrationPlatformBuildPublishStrategyKaniko {
                platform.Status.Info["kanikoVersion"] = defaults.KanikoVersion
        }
+       log.Debugf("Integration Platform [%s]: setting status info", 
platform.Namespace)
        platform.Status.Info["goVersion"] = runtime.Version()
        platform.Status.Info["goOS"] = runtime.GOOS
        platform.Status.Info["gitCommit"] = defaults.GitCommit
diff --git a/pkg/platform/operator.go b/pkg/platform/operator.go
index 2f6f2cff6..39008d423 100644
--- a/pkg/platform/operator.go
+++ b/pkg/platform/operator.go
@@ -30,6 +30,7 @@ import (
        "sigs.k8s.io/controller-runtime/pkg/event"
        "sigs.k8s.io/controller-runtime/pkg/predicate"
 
+       "github.com/apache/camel-k/pkg/util/log"
        ctrl "sigs.k8s.io/controller-runtime/pkg/client"
 )
 
@@ -46,8 +47,11 @@ var OperatorImage string
 // IsCurrentOperatorGlobal returns true if the operator is configured to watch 
all namespaces.
 func IsCurrentOperatorGlobal() bool {
        if watchNamespace, envSet := 
os.LookupEnv(OperatorWatchNamespaceEnvVariable); !envSet || 
strings.TrimSpace(watchNamespace) == "" {
+               log.Debug("Operator is global to all namespaces")
                return true
        }
+
+       log.Debug("Operator is local to namespace")
        return false
 }
 
@@ -118,6 +122,7 @@ func IsOperatorAllowedOnNamespace(ctx context.Context, c 
ctrl.Reader, namespace
 
        // allow global operators that use a proper operator id
        if defaults.OperatorID() != "" {
+               log.Debugf("Operator ID: %s", defaults.OperatorID())
                return true, nil
        }
 
@@ -128,8 +133,11 @@ func IsOperatorAllowedOnNamespace(ctx context.Context, c 
ctrl.Reader, namespace
        }
        alreadyOwned, err := IsNamespaceLocked(ctx, c, namespace)
        if err != nil {
+               log.Debugf("Error occurred while testing whether namespace is 
locked: %v", err)
                return false, err
        }
+
+       log.Debugf("Lock status of namespace %s: %t", namespace, alreadyOwned)
        return !alreadyOwned, nil
 }
 
diff --git a/pkg/platform/platform.go b/pkg/platform/platform.go
index 0f76690f6..2c354a4ba 100644
--- a/pkg/platform/platform.go
+++ b/pkg/platform/platform.go
@@ -22,6 +22,7 @@ import (
 
        v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
        "github.com/apache/camel-k/pkg/util/kubernetes"
+       "github.com/apache/camel-k/pkg/util/log"
        k8serrors "k8s.io/apimachinery/pkg/api/errors"
        k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
 )
@@ -139,6 +140,8 @@ func findAny(ctx context.Context, c k8sclient.Reader, 
namespace string, active b
 
 // findLocal returns the currently installed platform or any platform existing 
in local namespace.
 func findLocal(ctx context.Context, c k8sclient.Reader, namespace string, 
active bool) (*v1.IntegrationPlatform, error) {
+       log.Debug("Finding available platforms")
+
        lst, err := ListPrimaryPlatforms(ctx, c, namespace)
        if err != nil {
                return nil, err
@@ -147,6 +150,7 @@ func findLocal(ctx context.Context, c k8sclient.Reader, 
namespace string, active
        for _, platform := range lst.Items {
                platform := platform // pin
                if IsActive(&platform) {
+                       log.Debugf("Found active local integration platform 
%s", platform.Name)
                        return &platform, nil
                }
        }
@@ -154,9 +158,11 @@ func findLocal(ctx context.Context, c k8sclient.Reader, 
namespace string, active
        if !active && len(lst.Items) > 0 {
                // does not require the platform to be active, just return one 
if present
                res := lst.Items[0]
+               log.Debugf("Found local integration platform %s", res.Name)
                return &res, nil
        }
 
+       log.Debugf("Not found a local integration platform")
        return nil, k8serrors.NewNotFound(v1.Resource("IntegrationPlatform"), 
DefaultPlatformName)
 }
 
diff --git a/pkg/util/kubernetes/client.go b/pkg/util/kubernetes/client.go
index 62261a212..9d0a896eb 100644
--- a/pkg/util/kubernetes/client.go
+++ b/pkg/util/kubernetes/client.go
@@ -30,11 +30,14 @@ import (
 
        v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
        "github.com/apache/camel-k/pkg/client"
+       "github.com/apache/camel-k/pkg/util/log"
 )
 
 func GetIntegrationPlatform(context context.Context, client ctrl.Reader, name 
string, namespace string) (*v1.IntegrationPlatform, error) {
        platform := v1.NewIntegrationPlatform(namespace, name)
+       log.Debugf("Integration Platform [name: %s], [namespace: %s], 
[objectkey: %s]", name, namespace, ctrl.ObjectKeyFromObject(&platform))
        if err := client.Get(context, ctrl.ObjectKeyFromObject(&platform), 
&platform); err != nil {
+               log.Debugf("Integration platform Error: %v", err)
                return nil, err
        }
 
@@ -43,7 +46,9 @@ func GetIntegrationPlatform(context context.Context, client 
ctrl.Reader, name st
 
 func GetIntegrationKit(context context.Context, client ctrl.Reader, name 
string, namespace string) (*v1.IntegrationKit, error) {
        kit := v1.NewIntegrationKit(namespace, name)
+       log.Debugf("Integration Kit [name: %s], [namespace: %s], [objectkey: 
%s]", name, namespace, ctrl.ObjectKeyFromObject(kit))
        if err := client.Get(context, ctrl.ObjectKeyFromObject(kit), kit); err 
!= nil {
+               log.Debugf("Integration kit Error: %v", err)
                return nil, err
        }
 
@@ -52,7 +57,9 @@ func GetIntegrationKit(context context.Context, client 
ctrl.Reader, name string,
 
 func GetBuild(context context.Context, client client.Client, name string, 
namespace string) (*v1.Build, error) {
        build := v1.NewBuild(namespace, name)
+       log.Debugf("Build [name: %s], [namespace: %s], [objectkey: %s]", name, 
namespace, ctrl.ObjectKeyFromObject(build))
        if err := client.Get(context, ctrl.ObjectKeyFromObject(build), build); 
err != nil {
+               log.Debugf("Integration build Error: %v", err)
                return nil, err
        }
 
diff --git a/script/Makefile b/script/Makefile
index fe3c5957c..475c39afc 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -75,7 +75,7 @@ OPM := opm
 # Used to push pre-release artifacts
 STAGING_IMAGE_NAME := docker.io/camelk/camel-k
 
-STAGING_RUNTIME_REPO := 
+STAGING_RUNTIME_REPO :=
 
 # Define here the repo containing the default Kamelet catalog (if any)
 KAMELET_CATALOG_REPO := https://github.com/apache/camel-kamelets.git
@@ -260,24 +260,24 @@ test-fmt: do-build
 #
 test-integration: do-build
        FAILED=0; STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)"; \
-       go test -timeout 60m -v ./e2e/global/common -tags=integration 
$(TEST_INTEGRATION_COMMON_RUN) -json 2>&1 | gotestfmt || FAILED=1; \
-       go test -timeout 60m -v ./e2e/global/common/build -tags=integration 
$(TEST_INTEGRATION_COMMON_BUILD_RUN) -json 2>&1 | gotestfmt || FAILED=1; \
-       go test -timeout 60m -v ./e2e/global/common/config -tags=integration 
$(TEST_INTEGRATION_COMMON_CONFIG_RUN) -json 2>&1 | gotestfmt || FAILED=1; \
-       go test -timeout 60m -v ./e2e/global/common/languages -tags=integration 
$(TEST_INTEGRATION_COMMON_LANG_RUN) -json 2>&1 | gotestfmt || FAILED=1; \
-       go test -timeout 60m -v ./e2e/global/common/traits -tags=integration 
$(TEST_INTEGRATION_COMMON_TRAITS_RUN) -json 2>&1 | gotestfmt || FAILED=1; \
+       go test -timeout 90m -v ./e2e/global/common -tags=integration 
$(TEST_INTEGRATION_COMMON_RUN) -json 2>&1 | gotestfmt || FAILED=1; \
+       go test -timeout 90m -v ./e2e/global/common/build -tags=integration 
$(TEST_INTEGRATION_COMMON_BUILD_RUN) -json 2>&1 | gotestfmt || FAILED=1; \
+       go test -timeout 90m -v ./e2e/global/common/config -tags=integration 
$(TEST_INTEGRATION_COMMON_CONFIG_RUN) -json 2>&1 | gotestfmt || FAILED=1; \
+       go test -timeout 90m -v ./e2e/global/common/languages -tags=integration 
$(TEST_INTEGRATION_COMMON_LANG_RUN) -json 2>&1 | gotestfmt || FAILED=1; \
+       go test -timeout 90m -v ./e2e/global/common/traits -tags=integration 
$(TEST_INTEGRATION_COMMON_TRAITS_RUN) -json 2>&1 | gotestfmt || FAILED=1; \
        exit $${FAILED}
 
 test-knative: do-build
        STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)" \
-       go test -timeout 60m -v ./e2e/global/knative -tags=integration 
$(TEST_KNATIVE_RUN) -json 2>&1 | gotestfmt
+       go test -timeout 90m -v ./e2e/global/knative -tags=integration 
$(TEST_KNATIVE_RUN) -json 2>&1 | gotestfmt
 
 test-builder: do-build
        STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)" \
-       go test -timeout 60m -v ./e2e/global/builder -tags=integration 
$(TEST_BUILDER_RUN) -json 2>&1 | gotestfmt
+       go test -timeout 90m -v ./e2e/global/builder -tags=integration 
$(TEST_BUILDER_RUN) -json 2>&1 | gotestfmt
 
 test-service-binding: do-build
        STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)" \
-       go test -timeout 60m -v ./e2e/global/service-binding -tags=integration 
$(TEST_SERVICE_RUN) -json 2>&1 | gotestfmt
+       go test -timeout 90m -v ./e2e/global/service-binding -tags=integration 
$(TEST_SERVICE_RUN) -json 2>&1 | gotestfmt
 
 test-local: do-build
        STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)" \
@@ -285,7 +285,7 @@ test-local: do-build
 
 test-registry-maven-wagon: do-build
        STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)" \
-       go test -timeout 60m -v ./e2e/global/registry -tags=integration 
$(TEST_REGISTRY_MAVEN_WAGON_RUN) -json 2>&1 | gotestfmt
+       go test -timeout 90m -v ./e2e/global/registry -tags=integration 
$(TEST_REGISTRY_MAVEN_WAGON_RUN) -json 2>&1 | gotestfmt
 
 ###############################
 #
@@ -295,18 +295,18 @@ test-registry-maven-wagon: do-build
 
 test-install: do-build
        FAILED=0; STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)"; \
-       go test -timeout 60m -v ./e2e/namespace/install/ -tags=integration 
$(TEST_INSTALL_RUN) -json 2>&1 | gotestfmt || FAILED=1; \
-       go test -timeout 60m -v ./e2e/namespace/install/cli -tags=integration 
$(TEST_INSTALL_CLI_RUN) -json 2>&1 | gotestfmt || FAILED=1; \
-       go test -timeout 60m -v ./e2e/namespace/install/kustomize 
-tags=integration $(TEST_INSTALL_KUSTOMIZE_RUN) -json 2>&1 | gotestfmt || 
FAILED=1; \
+       go test -timeout 90m -v ./e2e/namespace/install/ -tags=integration 
$(TEST_INSTALL_RUN) -json 2>&1 | gotestfmt || FAILED=1; \
+       go test -timeout 90m -v ./e2e/namespace/install/cli -tags=integration 
$(TEST_INSTALL_CLI_RUN) -json 2>&1 | gotestfmt || FAILED=1; \
+       go test -timeout 90m -v ./e2e/namespace/install/kustomize 
-tags=integration $(TEST_INSTALL_KUSTOMIZE_RUN) -json 2>&1 | gotestfmt || 
FAILED=1; \
        exit $${FAILED}
 
 test-quarkus-native: do-build
        STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)" \
-       go test -timeout 60m -v ./e2e/namespace/native -tags=integration 
$(TEST_QUARKUS_RUN) -json 2>&1 | gotestfmt
+       go test -timeout 90m -v ./e2e/namespace/native -tags=integration 
$(TEST_QUARKUS_RUN) -json 2>&1 | gotestfmt
 
 test-upgrade: do-build
        STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)" \
-       go test -timeout 60m -v ./e2e/namespace/upgrade -tags=integration 
$(TEST_UPGRADE_RUN) -json 2>&1 | gotestfmt
+       go test -timeout 90m -v ./e2e/namespace/upgrade -tags=integration 
$(TEST_UPGRADE_RUN) -json 2>&1 | gotestfmt
 
 build-kamel:
        @echo "####### Building kamel CLI..."

Reply via email to