remove.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. ---
  2. - name: Remove Service Catalog APIServer
  3. command: >
  4. {{ openshift.common.client_binary }} --config=/etc/origin/master/admin.kubeconfig delete apiservices.apiregistration.k8s.io/v1beta1.servicecatalog.k8s.io --ignore-not-found -n kube-service-catalog
  5. # TODO: this module doesn't currently remove this
  6. #- name: Remove service catalog api service
  7. # oc_obj:
  8. # state: absent
  9. # namespace: "kube-service-catalog"
  10. # kind: apiservices.apiregistration.k8s.io
  11. # name: v1beta1.servicecatalog.k8s.io
  12. - name: Remove Service Catalog API Server route
  13. oc_obj:
  14. state: absent
  15. namespace: "kube-service-catalog"
  16. kind: route
  17. name: apiserver
  18. - name: Remove Service Catalog API Server service
  19. oc_obj:
  20. state: absent
  21. namespace: "kube-service-catalog"
  22. kind: service
  23. name: apiserver
  24. - name: Remove Service Catalog API Server daemonset
  25. oc_obj:
  26. state: absent
  27. namespace: "kube-service-catalog"
  28. kind: daemonset
  29. name: apiserver
  30. - name: Remove Controller Manager service
  31. oc_obj:
  32. state: absent
  33. namespace: "kube-service-catalog"
  34. kind: service
  35. name: controller-manager
  36. - name: Remove Controller Manager deployment
  37. oc_obj:
  38. state: absent
  39. namespace: "kube-service-catalog"
  40. kind: deployment
  41. name: controller-manager
  42. - name: Remove Service Catalog kube-system Role Bindinds
  43. shell: >
  44. {{ openshift.common.client_binary }} --config=/etc/origin/master/admin.kubeconfig process kube-system-service-catalog-role-bindings -n kube-system | {{ openshift.common.client_binary }} --config=/etc/origin/master/admin.kubeconfig delete --ignore-not-found -f -
  45. - oc_obj:
  46. kind: template
  47. name: "kube-system-service-catalog-role-bindings"
  48. namespace: kube-system
  49. state: absent
  50. - name: Remove Service Catalog kube-service-catalog Role Bindinds
  51. shell: >
  52. {{ openshift.common.client_binary }} --config=/etc/origin/master/admin.kubeconfig process service-catalog-role-bindings -n kube-service-catalog | {{ openshift.common.client_binary }} --config=/etc/origin/master/admin.kubeconfig delete --ignore-not-found -f -
  53. - oc_obj:
  54. kind: template
  55. name: "service-catalog-role-bindings"
  56. namespace: kube-service-catalog
  57. state: absent
  58. - name: Remove Service Catalog namespace
  59. oc_project:
  60. state: absent
  61. name: "kube-service-catalog"