chore: add retry to prometheus_pushgateway
diff --git a/roles/prometheus_pushgateway/tasks/main.yml b/roles/prometheus_pushgateway/tasks/main.yml
index f617f14..9270594 100644
--- a/roles/prometheus_pushgateway/tasks/main.yml
+++ b/roles/prometheus_pushgateway/tasks/main.yml
@@ -43,3 +43,10 @@
create_namespace: true
kubeconfig: /etc/kubernetes/admin.conf
values: "{{ _prometheus_pushgateway_helm_values | combine(prometheus_pushgateway_helm_values, recursive=True) }}"
+ # NOTE(mnaser): The Atmosphere operator is so fast that the CRDs for ServiceMonitor
+ # are not installed yet by the time we run this for the first
+ # time, so we retry until we let the operator handle deploy.
+ retries: 60
+ delay: 5
+ register: _result
+ until: _result is not failed