Fail app readiness waits faster
Homelab Main / validate (push) Waiting to run Details
Homelab Main / deploy (push) Blocked by required conditions Details

This commit is contained in:
juvenal.diaz 2026-09-26 11:48:44 -06:00
parent 96a0b1957d
commit 0ace68506f
1 changed files with 19 additions and 17 deletions

View File

@ -5249,6 +5249,8 @@ require_pimox_app_worker_capacity() {
} }
apps() { 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 buildx_builder_ready=false
local demos_image_built=false local demos_image_built=false
local demos_image_ref local demos_image_ref
@ -5314,10 +5316,10 @@ apps() {
refresh_argocd_application container-registry refresh_argocd_application container-registry
refresh_argocd_application supply-chain-policy 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_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 300 wait_for_namespace container-registry container-registry "${app_resource_wait_seconds}"
wait_for_namespaced_resource container-registry deployment local-registry container-registry 300 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 300 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}" && 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 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}" publish_image_supply_chain_metadata "${demos_image_ref}" "${registry_endpoint}" "${demos_source_hash}"
refresh_argocd_application website-production refresh_argocd_application website-production
wait_for_namespace website-production 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 300 wait_for_namespaced_resource website-production deployment php-website-deployment website-production "${app_resource_wait_seconds}"
if [[ "${website_image_built}" == "true" ]]; then if [[ "${website_image_built}" == "true" ]]; then
recreate_pods_for_selector website-production app=php-website website-production recreate_pods_for_selector website-production app=php-website website-production
else else
echo "Skipping website pod restart because the image did not change." echo "Skipping website pod restart because the image did not change."
fi 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 if [[ "${website_image_built}" == "true" ]]; then
write_website_image_state "${website_image_state_file}" "${website_source_hash}" "${website_platforms}" "${website_image_ref}" write_website_image_state "${website_image_state_file}" "${website_source_hash}" "${website_platforms}" "${website_image_ref}"
fi fi
refresh_argocd_application demos-static refresh_argocd_application demos-static
wait_for_namespace 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 300 wait_for_namespaced_resource demos-static deployment demos-static demos-static "${app_resource_wait_seconds}"
if [[ "${demos_image_built}" == "true" ]]; then if [[ "${demos_image_built}" == "true" ]]; then
recreate_pods_for_selector demos-static app=demos-static demos-static recreate_pods_for_selector demos-static app=demos-static demos-static
else else
echo "Skipping demos pod restart because the image did not change." echo "Skipping demos pod restart because the image did not change."
fi 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 if [[ "${demos_image_built}" == "true" ]]; then
write_demos_image_state "${demos_image_state_file}" "${demos_source_hash}" "${demos_platforms}" "${demos_image_ref}" write_demos_image_state "${demos_image_state_file}" "${demos_source_hash}" "${demos_platforms}" "${demos_image_ref}"
fi fi
refresh_argocd_application heimdall refresh_argocd_application heimdall
wait_for_namespaced_resource monitoring ingress grafana heimdall 300 wait_for_namespaced_resource monitoring ingress grafana heimdall "${app_resource_wait_seconds}"
wait_for_namespaced_resource monitoring ingress prometheus heimdall 300 wait_for_namespaced_resource monitoring ingress prometheus heimdall "${app_resource_wait_seconds}"
wait_for_namespaced_resource monitoring ingress alertmanager heimdall 300 wait_for_namespaced_resource monitoring ingress alertmanager heimdall "${app_resource_wait_seconds}"
wait_for_namespaced_resource argocd ingress argocd-server heimdall 300 wait_for_namespaced_resource argocd ingress argocd-server heimdall "${app_resource_wait_seconds}"
refresh_argocd_application n8n refresh_argocd_application n8n
wait_for_namespace n8n n8n 300 wait_for_namespace n8n n8n "${app_resource_wait_seconds}"
wait_for_namespaced_resource n8n deployment n8n n8n 300 wait_for_namespaced_resource n8n deployment n8n n8n "${app_resource_wait_seconds}"
wait_for_deployment_ready n8n n8n n8n 300 wait_for_deployment_ready n8n n8n n8n "${app_ready_wait_seconds}"
echo "Application deployment successfully completed." echo "Application deployment successfully completed."
} }