Skip to content

Commit f0e5641

Browse files
Merge pull request #883 from vyzigold/fix-clf-check
Simplify ClusterLogForwarder condition check
2 parents ee65b04 + 7708747 commit f0e5641

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

ci/deploy-logging-dependencies/tasks/deploy-cluster-logging.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,13 @@
2121
register: output
2222
until: output.stdout_lines | length != 0
2323

24-
- name: Wait for 2 "True" and 0 "False" conditions in ClusterLogForwarder status
24+
- name: Wait for all conditions to be "True" in ClusterLogForwarder status
2525
ansible.builtin.shell:
2626
cmd: >
27-
oc get clusterlogforwarder collector -n openshift-logging -o json | jq --raw-output '[
28-
([.status.conditions[] | select(.status == "True")] | length),
29-
([.status.conditions[] | select(.status == "False")] | length)
30-
] | @csv'
31-
register: clf_condition_counts
32-
until: clf_condition_counts.stdout == "2,0"
27+
oc get clusterlogforwarder collector -n openshift-logging -o json |
28+
jq '.status.conditions | length > 0 and all(.status == "True")'
29+
register: clf_conditions
30+
until: clf_conditions.stdout == "true"
3331
retries: 20
3432
delay: 20
3533
changed_when: false

0 commit comments

Comments
 (0)