Skip to content

Commit

Permalink
Delete all the resources of openshift-marketplace
Browse files Browse the repository at this point in the history
ansible-collections/kubernetes.core#517 added
delete_all: true to delete all the resources.

It needs to be added in fix openshift-marketplace task files
to make sure all pods are deleted otherwise
fix_openshift_marketplace.yml taskfile does not work as expected.

Note: It moves to oc commands to be make sure all the pods are in
running state.

Signed-off-by: Chandan Kumar <raukadah@gmail.com>
  • Loading branch information
raukadah committed Apr 19, 2024
1 parent c4a895d commit fd21bea
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions roles/openshift_setup/tasks/fix_openshift_marketplace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@
kubernetes.core.k8s:
kind: Pod
state: absent
delete_all: true
kubeconfig: "{{ cifmw_openshift_kubeconfig }}"
namespace: openshift-marketplace

- name: Wait for openshift-marketplace pods to be running
kubernetes.core.k8s_info:
kubeconfig: "{{ cifmw_openshift_kubeconfig }}"
kind: Pod
namespace: openshift-marketplace
wait: true
wait_condition:
type: Ready
status: "True"
wait_timeout: 300
environment:
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
PATH: "{{ cifmw_path }}"
ansible.builtin.command:
cmd: >-
oc wait pod --all --for=condition=Ready
-n openshift-marketplace --timeout=1m
register: _pod_status
retries: 4
delay: 10
until: _pod_status.rc == 0

0 comments on commit fd21bea

Please sign in to comment.