#!/bin/bash

. $(dirname "$0")/setenv.bash

delete_namespace() {
  _NS=$1-$2
  kubectl delete namespace $_NS
}

delete_service_account() {
    kubectl delete clusterrolebinding $1-$2-admin-binding
    printf "Service account $1-$2-admin-binding deleted.\n\n"
}

delete_registry_key() {
  kubectl --namespace $1-$2 delete secret ${1}-docker-registry-key
}

delete_app_helm() {
  helm delete $1-$2 --purge
}

wait_terminate() {
  printf "Waiting for namespaces termination...\n"
  while true; do
    declare -i _STATUS=0
    for i in ${HELM_APPS[@]}; do
      kubectl get namespaces $1-$i > /dev/null 2>&1
      if [ "$?" -eq "0" ]; then
        _STATUS=1
        break
      fi
    done
    if [ "$_STATUS" -eq "0" ]; then
      break
    fi
    sleep 2
  done
}

usage() {
  cat <<EOF
Usage: $0 [PARAMs]
-u                  : Display usage
-n [NAMESPACE]      : Kubernetes namespace (required)
-c                  : kubectl context (default: current context)
-y                  : Skip interactive confirmation (default: no)
-a [APP]            : Specify a specific ONAP component (default: all)
                      from the following choices:
                      sdc, aai ,mso, message-router, robot, vid, aaf, uui
                      sdnc, portal, policy, appc, multicloud, clamp, consul, vnfsdk
-N                  : Do not wait for deletion of namespace and its objects
EOF
}

#MAINs
NS=
INCL_SVC=false
APP=
WAIT_TERMINATE=true
SKIP_INTERACTIVE_CONFIRMATION=no
KUBECTL_CONTEXT=

while getopts ":c:n:u:s:a:yN" PARAM; do
  case $PARAM in
    u)
      usage
      exit 1
      ;;
    n)
      NS=${OPTARG}
      ;;
    a)
      APP=${OPTARG}
      if [[ -z $APP ]]; then
        usage
        exit 1
      fi
      ;;
    N)
      WAIT_TERMINATE=false
      ;;
    y)
      SKIP_INTERACTIVE_CONFIRMATION=yes
      ;;
    c)
      KUBECTL_CONTEXT=${OPTARG}
      ;;
    ?)
      usage
      exit
      ;;
  esac
done

if [[ -z $NS ]]; then
  usage
  exit 1
fi

if [[ "$SKIP_INTERACTIVE_CONFIRMATION" != yes ]]; then
  current_kubectl_context=$(kubectl config get-contexts |grep "*" |awk '{print $2}')
  if test "$KUBECTL_CONTEXT" != "$current_kubectl_context"; then
    printf "Current kubectl context does not match context specified:\x1b[31m $current_kubectl_context\x1b[0m\n"
    if [ ! -z "$KUBECTL_CONTEXT" -a "$KUBECTL_CONTEXT" != " " ]; then
      read -p "Do you wish to switch context to $KUBECTL_CONTEXT and continue?" yn
      case $yn in
        [Yy]* ) kubectl config use-context $KUBECTL_CONTEXT;;
        * ) printf "Skipping delete...\n"; exit;;
      esac
    else
      printf "You are about to delete deployment from:\x1b[31m $current_kubectl_context\x1b[0m\n"
      read -p "To continue enter context name: " response

      if test "$response" != "$current_kubectl_context"
      then
        printf "Your response does not match current context! Skipping delete ...\n"
        exit 1
      fi
    fi
  fi
fi

if [[ ! -z "$APP" ]]; then
  HELM_APPS=($APP)
fi

printf "\n********** Cleaning up ONAP: ${ONAP_APPS[*]}\n"

for i in ${HELM_APPS[@]}; do

  delete_app_helm $NS $i
  delete_namespace $NS $i
  delete_service_account $NS $i

done

delete_app_helm $NS "config"
kubectl delete namespace $NS

if $WAIT_TERMINATE; then
  wait_terminate $NS
fi

printf "\n********** Gone **********\n"
