undeploy.sh 825 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. cd "$(dirname "$0")"
  3. #kubectl create namespace overleaf
  4. kubectl delete -n overleaf -f ./overleaf/overleaf-service.yaml -f ./overleaf/overleaf-deployment.yaml -f ./overleaf/overleaf-variables.yaml
  5. kubectl delete -f ./overleaf/reg-secret.yaml
  6. if [ "$1" = "t" ]
  7. then
  8. #
  9. kubectl delete -f ./overleaf/overleaf-pvc.yaml
  10. # El GUI para mongoDB
  11. #
  12. kubectl delete -f mongo-express/mongo-configmap.yaml -f mongo-express/mongoDB-secret.yaml -f mongo-express/mongo-express.yaml
  13. #
  14. helm uninstall mongo --namespace overleaf
  15. helm uninstall redis --namespace overleaf
  16. kubectl -n overleaf delete persistentvolumeclaim/datadir-mongo-mongodb-0 persistentvolumeclaim/redis-data-redis-master-0
  17. ## Uncomment following ling to expose the application via ingress
  18. #kubectl apply -n overleaf -f ./overleaf/overleaf-ingress.yaml
  19. fi