You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

stop.sh 721 B

1 year ago
1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/bash
  2. # 获取当前路径
  3. current_path=$(pwd)
  4. # 删除configmap
  5. cd $current_path/config
  6. config_files=$(ls *.json 2>/dev/null)
  7. if [ -z "$config_files" ]; then
  8. echo "当前路径下没有.config.json文件。"
  9. exit 1
  10. fi
  11. for file in $config_files; do
  12. if [[ -f "$file" ]]; then
  13. name=$(echo "$file" | cut -d '.' -f1)
  14. kubectl delete cm $name-config
  15. fi
  16. done
  17. # 删除pod
  18. cd $current_path
  19. yaml_files=$(ls *.yaml 2>/dev/null)
  20. for yaml_file in $yaml_files; do
  21. echo "Delete $yaml_file ..."
  22. kubectl delete -f $yaml_file
  23. done
  24. # 删除pv
  25. cd $current_path/config
  26. pv_yaml_files=$(ls *.yaml 2>/dev/null)
  27. for pv_yaml_file in $pv_yaml_files; do
  28. echo "Delete $pv_yaml_file ..."
  29. kubectl delete -f $pv_yaml_file
  30. done

本项目旨在将云际存储公共基础设施化,使个人及企业可低门槛使用高效的云际存储服务(安装开箱即用云际存储客户端即可,无需关注其他组件的部署),同时支持用户灵活便捷定制云际存储的功能细节。