Skip to content

Commit

Permalink
Wait on all errors for Zenith services (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkjpryor authored Dec 4, 2023
1 parent d7f6362 commit a67570a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions rstudio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@
follow_redirects: safe
register: rstudio_uri
changed_when: false
# The task fails if there is an error querying the endpoint
# An SSL error is indicated as -1, which will occur while cert-manager fetches certificates
# A 404 is expected until the Zenith service has started
failed_when: >-
rstudio_uri.status < 0 or
rstudio_uri.status == 404 or
rstudio_uri.status >= 500
retries: 180
delay: 10
# 404 and 503 are the statuses that are seen when the Zenith service is not ready yet
# An SSL error is indicated as -1, which will occur while cert-manager fetches certificates
until: rstudio_uri.status not in [404, 503, -1]
until: "rstudio_uri is not failed"
when: (cluster_state | default('present')) == 'present'

- name: Wait for Monitoring to become available
Expand All @@ -31,13 +32,14 @@
follow_redirects: safe
register: monitoring_uri
changed_when: false
# The task fails if there is an error querying the endpoint
# An SSL error is indicated as -1, which will occur while cert-manager fetches certificates
# A 404 is expected until the Zenith service has started
failed_when: >-
monitoring_uri.status < 0 or
monitoring_uri.status == 404 or
monitoring_uri.status >= 500
retries: 180
retries: 60
delay: 10
# 404 and 503 are the statuses that are seen when the Zenith service is not ready yet
# An SSL error is indicated as -1, which will occur while cert-manager fetches certificates
until: monitoring_uri.status not in [404, 503, -1]
until: "monitoring_uri is not failed"
when: (cluster_state | default('present')) == 'present'

0 comments on commit a67570a

Please sign in to comment.