Skip to content

Commit

Permalink
[patch] wait for subscription to complete when creating (#1471)
Browse files Browse the repository at this point in the history
  • Loading branch information
stonepd committed Sep 17, 2024
1 parent 901c12a commit fdee49c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ibm/mas_devops/common_tasks/create_subscription.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,19 @@
until:
- _installplan_info.resources[0].status.phase is defined
- _installplan_info.resources[0].status.phase == "Complete"

# 5. Wait for Subscription to complete
# -----------------------------------------------------------------------------
- name: "create_subscription : Wait for Subscription state to become 'AtLatestKnown'"
kubernetes.core.k8s_info:
api_version: operators.coreos.com/v1alpha1
kind: Subscription
namespace: "{{ subscription_namespace }}"
name: "{{ package_name }}"
register: _subscription_info
retries: 30
delay: 30 # Retry for approx 15 minutes (30s * 30 attempts) before giving up
until:
- _subscription_info.resources | length > 0
- _subscription_info.resources[0].status.state is defined
- _subscription_info.resources[0].status.state == "AtLatestKnown"

0 comments on commit fdee49c

Please sign in to comment.