message: Added NOTIFYONLY option
  Added DEBUG option
  Changed how PROJECTNAME variable is get
diff: # by disabling the tls-acme, removing other acme related annotations and add
  # an interal one for filtering purpose
  +if [ "$DEBUG" = "true" ]; then
  + set -x
  +fi
  +
  set -eu -o pipefail
  # Some variables
  @@ -24,6 +28,9 @@ DEBUG="${DEBUG:-"false"}"
  # Set a REGEX variable to filter the execution of the script
  REGEX=${REGEX:-".*"}
  +# Set NOTIFYONLY to true if you want to only notify customers about their failed routes
  +NOTIFYONLY=${NOTIFYONLY:-"false"}
  +
  # Help function
  function usage() {
  echo -e "The available commands are:
  @@ -108,7 +115,9 @@ function create_routes_array() {
  # Get the list of namespaces with broker routes, according to REGEX
  for namespace in $(oc get routes --all-namespaces|grep exposer|awk '{print $1}'|sort -u|grep -E "$REGEX")
  do
  - PROJECTNAME=$(oc get project "$namespace" -o=jsonpath="{.metadata.labels.lagoon\.sh/project}")
  + #PROJECTNAME=$(oc get project "$namespace" -o=jsonpath="{.metadata.labels.lagoon\.sh/project}")
  + PROJECTNAME=$(oc get project "$namespace" -o json|grep display-name|awk -F'[][]' '{print $2}'|tr "_" "-")
  +
  # Get the list of broken unique routes for each namespace
  for routelist in $(oc get -n "$namespace" route|grep exposer|awk -vNAMESPACE="$namespace" -vPROJECTNAME="$PROJECTNAME" '{print $1";"$2";"NAMESPACE";"PROJECTNAME}'|sort -u -k2 -t ";")
  do
  @@ -142,7 +151,11 @@ function check_routes() {
  ROUTE_PROJECTNAME=${route[3]}
  # Get route DNS record(s)
  + if [[ $(dig +short "$ROUTE_HOSTNAME" &> /dev/null; echo $?) -ne 0 ]]; then
  + ROUTE_HOSTNAME_IP="null"
  + else
  ROUTE_HOSTNAME_IP=$(dig +short "$ROUTE_HOSTNAME")
  + fi
  if [[ "${DEBUG}" == true ]]; then
  echo -e "===== DEBUG INFORMATION =====\n${route[*]}\n$ROUTE_HOSTNAME_IP"
  @@ -159,6 +172,12 @@ function check_routes() {
  fi
  echo "$DNS_ERROR"
  +
  + if [[ "$NOTIFYONLY" = "true" ]]; then
  + echo $NOTIFYONLY
  + notify_customer "$ROUTE_PROJECTNAME"
  + else
  + echo $NOTIFYONLY
  # Call the update function to update the route
  update_annotation "$ROUTE_HOSTNAME" "$ROUTE_NAMESPACE"
  notify_customer "$ROUTE_PROJECTNAME"
  @@ -176,6 +195,7 @@ function check_routes() {
  fi
  done
  fi
  + fi
  echo -e "\n"
  