Skip to content

Commit

Permalink
Completely remove all knative CRDs
Browse files Browse the repository at this point in the history
* If not the profile's of integrations are updated to "Knative"
  • Loading branch information
phantomjinx committed Jun 22, 2022
1 parent 8194f43 commit 1c85b6f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
11 changes: 8 additions & 3 deletions .github/actions/kamel-cleanup/cleanup-knative.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ echo -n "Removing testing knative cluster roles ... "
cleanup_resources clusterroles 'knative\|imc'

# CRDS
echo -n "Removing testing knative CRDs ... "
cleanup_resources crds 'knative.dev'

CRDS=$(kubectl --ignore-not-found=true get crds | grep knative | awk '{print $1}')
if [ -n "${CRDS}" ]; then
for crd in ${CRDS}
do
echo -n "Removing ${crd} CRD ... "
cleanup_resources crds "${crd}"
done
fi
set -e
5 changes: 0 additions & 5 deletions .github/actions/kamel-cleanup/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@ if [ -n "${BUILD_CATALOG_SOURCE_NAMESPACE}" ]; then
set -e
fi

if [ "${SAVE_NAMESPACES}" == "true" ]; then
echo "Skipping remaining cleanup since SAVE_NAMESPACES has been set to true"
exit 0
fi

#
# Remove installed kamel
#
Expand Down
4 changes: 3 additions & 1 deletion .github/actions/kamel-preflight-test/preflight-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ if [ -n "${BUILD_CATALOG_SOURCE_NAMESPACE}" ]; then
#
# Check catalog source is actually available
#
timeout=5
timeout=10
catalog_ready=0
until [ ${catalog_ready} -eq 1 ] || [ ${timeout} -eq 0 ]
do
Expand All @@ -136,6 +136,8 @@ if [ -n "${BUILD_CATALOG_SOURCE_NAMESPACE}" ]; then
else
echo "Warning: catalog source status is not ready."
if [ "${timeout}" -eq 1 ]; then
kubectl get catalogsource ${BUILD_CATALOG_SOURCE_NAME} \
-n ${BUILD_CATALOG_SOURCE_NAMESPACE} -o yaml
echo "Error: timed out while awaiting catalog source to start"
delns "${NAMESPACE}"
exit 1
Expand Down

0 comments on commit 1c85b6f

Please sign in to comment.