diff --git a/legacy/build-deploy-docker-compose.sh b/legacy/build-deploy-docker-compose.sh index 151887da..9dae853f 100755 --- a/legacy/build-deploy-docker-compose.sh +++ b/legacy/build-deploy-docker-compose.sh @@ -1072,6 +1072,12 @@ if [ ! "$AUTOGEN_ROUTES_DISABLED" == true ]; then build-deploy-tool template autogenerated-ingress else echo ">> Autogenerated ingress templates disabled for this build" + # delete any autogenerated ingress in the namespace as they are disabled + if kubectl -n ${NAMESPACE} get ingress -l "lagoon.sh/autogenerated=true" &> /dev/null; then + echo ">> Removing any autogenerated ingress" + kubectl -n ${NAMESPACE} delete ingress -l "lagoon.sh/autogenerated=true" + echo ">> Autogenerated ingress removed" + fi # end custom route fi