diff --git a/cluster/local/integration_tests.sh b/cluster/local/integration_tests.sh index 8356a6dbd4..7b4c434d21 100755 --- a/cluster/local/integration_tests.sh +++ b/cluster/local/integration_tests.sh @@ -84,8 +84,9 @@ EOF echo "${KIND_CONFIG}" | "${KIND}" create cluster --name="${K8S_CLUSTER}" --wait=5m --image="${KIND_NODE_IMAGE}" --config=- # tag controller image and load it into kind cluster -docker tag "${CONTROLLER_IMAGE}" "${PACKAGE_NAME}" -"${KIND}" load docker-image "${PACKAGE_NAME}" --name="${K8S_CLUSTER}" +PACKAGE_NAME_REF="xpkg.upbound.io/$PACKAGE_NAME" +docker tag "${CONTROLLER_IMAGE}" "${PACKAGE_NAME_REF}" +"${KIND}" load docker-image "${PACKAGE_NAME_REF}" --name="${K8S_CLUSTER}" echo_step "create crossplane-system namespace" "${KUBECTL}" create ns crossplane-system @@ -131,7 +132,7 @@ echo "${PVC_YAML}" | "${KUBECTL}" create -f - # install crossplane from stable channel echo_step "installing crossplane from stable channel" "${HELM3}" repo add crossplane-stable https://charts.crossplane.io/stable/ -chart_version="$("${HELM3}" search repo crossplane-stable/crossplane | awk 'FNR == 2 {print $2}')" +chart_version="1.14.5" echo_info "using crossplane version ${chart_version}" echo # we replace empty dir with our PVC so that the /cache dir in the kind node @@ -163,7 +164,24 @@ docker exec "${K8S_CLUSTER}-control-plane" ls -la /cache echo_step "waiting for provider to be installed" -kubectl wait "provider.pkg.crossplane.io/${PACKAGE_NAME}" --for=condition=healthy --timeout=180s +if ! kubectl wait "provider.pkg.crossplane.io/${PACKAGE_NAME}" --for=condition=healthy --timeout=300s ; then + echo_warn "kubectl describe provider.pkg.crossplane.io/${PACKAGE_NAME}" + kubectl describe "provider.pkg.crossplane.io/${PACKAGE_NAME}" + echo_warn "kubectl describe providerrevision.pkg.crossplane.io" + kubectl describe providerrevision.pkg.crossplane.io + + DEPLOY_NAMES=$(kubectl get deploy -n "${CROSSPLANE_NAMESPACE}" -oname | grep ${PACKAGE_NAME}) + for DEPLOY in $DEPLOY_NAMES; do + echo_warn "kubectl describe -n ${CROSSPLANE_NAMESPACE} $DEPLOY" + kubectl describe -n "${CROSSPLANE_NAMESPACE}" "$DEPLOY" + done + + POD_NAMES=$(kubectl get pods -n "${CROSSPLANE_NAMESPACE}" -oname | grep ${PACKAGE_NAME}) + for POD in $POD_NAMES; do + echo_warn "kubectl describe -n ${CROSSPLANE_NAMESPACE} $POD" + kubectl describe -n "${CROSSPLANE_NAMESPACE}" "$POD" + done +fi echo_step "uninstalling ${PROJECT_NAME}"