-
Notifications
You must be signed in to change notification settings - Fork 6
/
uninstall.yaml
59 lines (59 loc) · 2.26 KB
/
uninstall.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
- hosts: openshift
gather_facts: false
tasks:
- name: Set oc binary
when: oc is not defined
set_fact:
oc: "oc"
- name: Drop control planes
command: "oc delete smcp -n istio-system --all"
failed_when: false
- name: Drop istio-system
command: "oc delete project istio-system"
failed_when: false
- name: Get rid of finalizers
include_tasks: drop-finalizers.yaml
vars:
namespace: istio-system
- name: Get Kiali script
uri:
url: https://git.io/getLatestKialiOperator
dest: /tmp/kiali.sh
mode: 0755
- name: Delete Kiali
command: "/tmp/kiali.sh --uninstall-mode true"
# - name: Get rid of finalizers
# include_tasks: drop-finalizers.yaml
# vars:
# namespace: observability
- name: Drop Jaeger CRDs
shell: "oc get crd -o name | grep jaeger | xargs -r oc delete"
- name: Drop Jaeger SA
shell: "oc get sa -o name | grep jaeger | xargs -r oc delete"
- name: Drop Jaeger clusterrole
shell: "oc get clusterrole -o name | grep jaeger | xargs -r oc delete"
- name: Drop Jaeger cluster role binding
shell: "oc get clusterrolebinding -o name | grep jaeger | xargs -r oc delete"
- name: Drop Jaeger operator namespace
shell: "oc delete project observability"
- name: Drop Maistra operator
shell: "oc delete -n istio-operator -f https://raw.githubusercontent.com/Maistra/istio-operator/maistra-0.12/deploy/maistra-operator.yaml"
- name: Drop Maistra operator namespace
shell: "oc delete project istio-operator"
- name: Get rid of finalizers
include_tasks: drop-finalizers.yaml
vars:
namespace: istio-operator
- name: Drop CSR
shell: "oc delete csr istio-sidecar-injector.istio-system"
failed_when: false
- name: Drop CRDs
shell: "oc get crd -o name | grep istio | xargs -r oc delete"
- name: Drop mutating webhooks
shell: "oc get mutatingwebhookconfigurations -o name | grep istio | xargs -r oc delete"
- name: Drop validating webhooks
shell: "oc get validatingwebhookconfiguration -o name | grep istio | xargs -r oc delete"
- name: Drop cluster roles
shell: "oc get clusterroles -o name | grep istio | xargs -r oc delete"
- name: Drop cluster role bindings
shell: "oc get clusterrolebindings -o name | grep istio | xargs -r oc delete"