-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcleanup.yaml
52 lines (48 loc) · 1.46 KB
/
cleanup.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
---
- name: Migration - remove old cluster and migration resources
hosts: localhost
connection: local
tasks:
- name: Delete old region
kubernetes.core.k8s:
validate_certs: false
state: absent
name: north-america
api_version: project.openshift.io/v1
kind: Project
wait: true
wait_condition:
status: true
type: Ready
wait_timeout: 1200
- name: Delete topics where the migration job stored offset info
kubernetes.core.k8s:
validate_certs: false
state: absent
name: "{{ item.name }}"
namespace: europe
api_version: eventstreams.ibm.com/v1beta2
kind: KafkaTopic
wait: true
wait_condition:
status: true
type: Ready
wait_timeout: 1200
loop:
- name: northamerica.checkpoints.internal
- name: mm2-offset-syncs.northamerica.internal
- name: Delete topics where the migration job stored state
ansible.builtin.shell: oc delete -n europe `oc get kafkatopic -n europe -o name | grep mm2-`
- name: Delete credentials that were used by the migration job
kubernetes.core.k8s:
validate_certs: false
state: absent
name: mm2-europe
namespace: europe
api_version: eventstreams.ibm.com/v1beta2
kind: KafkaUser
wait: true
wait_condition:
status: true
type: Ready
wait_timeout: 1200