Skip to content

Commit 90159c6

Browse files
committed
Fix deletion of CRDs
Signed-off-by: Ales Raszka <araszka@redhat.com>
1 parent b237db9 commit 90159c6

File tree

1 file changed

+28
-1
lines changed
  • upstream/roles/cleanup_operator_resources/tasks

1 file changed

+28
-1
lines changed

upstream/roles/cleanup_operator_resources/tasks/main.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,35 @@
77
patterns: "*.yml"
88
register: cor_all_yml
99

10+
- name: "Debug print - all processed resources in the deploy directory"
11+
debug:
12+
var: cor_all_yml
13+
verbosity: 2
14+
15+
- name: "Get all CRDs from cluster"
16+
shell: "{{ oc_bin_path }} get crd"
17+
register: cor_crds
18+
environment:
19+
KUBECONFIG: "{{ kubeconfig_path }}"
20+
21+
- name: "Debug print - all CRDs from cluster"
22+
debug:
23+
var: cor_crds.stdout_lines
24+
verbosity: 2
25+
26+
- name: "Get all from cluster"
27+
shell: "{{ oc_bin_path }} get all "
28+
register: cor_all
29+
environment:
30+
KUBECONFIG: "{{ kubeconfig_path }}"
31+
32+
- name: "Debug print - all from cluster"
33+
debug:
34+
var: cor_all.stdout_lines
35+
verbosity: 2
36+
1037
- name: "Delete the operator owned CRDs if any"
11-
shell: "{{ oc_bin_path }} delete -f {{ owned_crd_path }} --ignore-not-found=true --timeout={{ cor_cleanup_timeout }}s"
38+
shell: "{{ oc_bin_path }} delete -f {{ owned_crd_path }} --ignore-not-found=true --timeout={{ cor_cleanup_timeout }}s --force --grace-period=0"
1239
environment:
1340
KUBECONFIG: "{{ kubeconfig_path }}"
1441
with_items: "{{ crd_paths|default([]) }}"

0 commit comments

Comments
 (0)