瀏覽代碼

delete csv in its source namespace

Grega Bremec 7 月之前
父節點
當前提交
2cedf7d20f
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      playbooks/roles/remove-operators/tasks/main.yml

+ 4 - 1
playbooks/roles/remove-operators/tasks/main.yml

@@ -20,6 +20,9 @@
 #       - role: "{{ item }}"
 #       - role: "{{ item }}"
 #     loop: "{{ removed_operators }}"
 #     loop: "{{ removed_operators }}"
 #
 #
+# What this means is that each item of removed_operators is expected to be
+# placed in the "role" variable prior to iterating over this role.
+#
 - name: Remove any of the resources found
 - name: Remove any of the resources found
   k8s:
   k8s:
     kubeconfig: tmp/kubeconfig-ocp4
     kubeconfig: tmp/kubeconfig-ocp4
@@ -61,7 +64,7 @@
     api_version: operators.coreos.com/v1alpha1
     api_version: operators.coreos.com/v1alpha1
     kind: clusterserviceversion
     kind: clusterserviceversion
     name: "{{ role.csv_name }}"
     name: "{{ role.csv_name }}"
-    delete_all: true
+    namespace: "{{ role.sub_nspc }}"
     state: absent
     state: absent
   ignore_errors: yes
   ignore_errors: yes
   when: role.csv_kill
   when: role.csv_kill