From 0ace68506f49a1ba2a0088627786f49c987093b3 Mon Sep 17 00:00:00 2001 From: "juvenal.diaz" Date: Sat, 26 Sep 2026 11:48:44 -0600 Subject: [PATCH] Fail app readiness waits faster --- lib/jeannie/pipeline.sh | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/lib/jeannie/pipeline.sh b/lib/jeannie/pipeline.sh index f3837a1..0f67582 100644 --- a/lib/jeannie/pipeline.sh +++ b/lib/jeannie/pipeline.sh @@ -5249,6 +5249,8 @@ require_pimox_app_worker_capacity() { } apps() { + local app_ready_wait_seconds="${LAB_APPS_READY_WAIT_SECONDS:-180}" + local app_resource_wait_seconds="${LAB_APPS_RESOURCE_WAIT_SECONDS:-120}" local buildx_builder_ready=false local demos_image_built=false local demos_image_ref @@ -5314,10 +5316,10 @@ apps() { refresh_argocd_application container-registry refresh_argocd_application supply-chain-policy - wait_for_cluster_resource imagevalidatingpolicies.policies.kyverno.io homelab-local-registry-supply-chain supply-chain-policy 300 - wait_for_namespace container-registry container-registry 300 - wait_for_namespaced_resource container-registry deployment local-registry container-registry 300 - wait_for_deployment_ready container-registry local-registry container-registry 300 + wait_for_cluster_resource imagevalidatingpolicies.policies.kyverno.io homelab-local-registry-supply-chain supply-chain-policy "${app_resource_wait_seconds}" + wait_for_namespace container-registry container-registry "${app_resource_wait_seconds}" + wait_for_namespaced_resource container-registry deployment local-registry container-registry "${app_resource_wait_seconds}" + wait_for_deployment_ready container-registry local-registry container-registry "${app_ready_wait_seconds}" if website_image_is_current "${website_image_state_file}" "${website_source_hash}" "${website_platforms}" "${website_image_ref}" "${registry_endpoint}" && image_supply_chain_metadata_exists "${website_image_ref}" "${registry_endpoint}"; then @@ -5370,41 +5372,41 @@ apps() { publish_image_supply_chain_metadata "${demos_image_ref}" "${registry_endpoint}" "${demos_source_hash}" refresh_argocd_application website-production - wait_for_namespace website-production website-production 300 - wait_for_namespaced_resource website-production deployment php-website-deployment website-production 300 + wait_for_namespace website-production website-production "${app_resource_wait_seconds}" + wait_for_namespaced_resource website-production deployment php-website-deployment website-production "${app_resource_wait_seconds}" if [[ "${website_image_built}" == "true" ]]; then recreate_pods_for_selector website-production app=php-website website-production else echo "Skipping website pod restart because the image did not change." fi - wait_for_deployment_ready website-production php-website-deployment website-production 300 + wait_for_deployment_ready website-production php-website-deployment website-production "${app_ready_wait_seconds}" if [[ "${website_image_built}" == "true" ]]; then write_website_image_state "${website_image_state_file}" "${website_source_hash}" "${website_platforms}" "${website_image_ref}" fi refresh_argocd_application demos-static - wait_for_namespace demos-static demos-static 300 - wait_for_namespaced_resource demos-static deployment demos-static demos-static 300 + wait_for_namespace demos-static demos-static "${app_resource_wait_seconds}" + wait_for_namespaced_resource demos-static deployment demos-static demos-static "${app_resource_wait_seconds}" if [[ "${demos_image_built}" == "true" ]]; then recreate_pods_for_selector demos-static app=demos-static demos-static else echo "Skipping demos pod restart because the image did not change." fi - wait_for_deployment_ready demos-static demos-static demos-static 300 + wait_for_deployment_ready demos-static demos-static demos-static "${app_ready_wait_seconds}" if [[ "${demos_image_built}" == "true" ]]; then write_demos_image_state "${demos_image_state_file}" "${demos_source_hash}" "${demos_platforms}" "${demos_image_ref}" fi refresh_argocd_application heimdall - wait_for_namespaced_resource monitoring ingress grafana heimdall 300 - wait_for_namespaced_resource monitoring ingress prometheus heimdall 300 - wait_for_namespaced_resource monitoring ingress alertmanager heimdall 300 - wait_for_namespaced_resource argocd ingress argocd-server heimdall 300 + wait_for_namespaced_resource monitoring ingress grafana heimdall "${app_resource_wait_seconds}" + wait_for_namespaced_resource monitoring ingress prometheus heimdall "${app_resource_wait_seconds}" + wait_for_namespaced_resource monitoring ingress alertmanager heimdall "${app_resource_wait_seconds}" + wait_for_namespaced_resource argocd ingress argocd-server heimdall "${app_resource_wait_seconds}" refresh_argocd_application n8n - wait_for_namespace n8n n8n 300 - wait_for_namespaced_resource n8n deployment n8n n8n 300 - wait_for_deployment_ready n8n n8n n8n 300 + wait_for_namespace n8n n8n "${app_resource_wait_seconds}" + wait_for_namespaced_resource n8n deployment n8n n8n "${app_resource_wait_seconds}" + wait_for_deployment_ready n8n n8n n8n "${app_ready_wait_seconds}" echo "Application deployment successfully completed." }