From bb7ad9af29682ea621c2c2da61562ac44522847e Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Mon, 28 Apr 2025 19:18:26 -0400 Subject: [PATCH] assume keycloak is available --- config_job.tf | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/config_job.tf b/config_job.tf index 7cc6465..adcedcd 100644 --- a/config_job.tf +++ b/config_job.tf @@ -84,29 +84,6 @@ GRANT return 1 } - # Wait for Keycloak to be ready - function wait_for_keycloak { - local max_attempts=30 - local attempt=1 - - echo "Waiting for Keycloak to be ready..." - - while [ $attempt -le $max_attempts ]; do - echo "Keycloak check attempt $attempt of $max_attempts" - if curl -s -o /dev/null -w %%{http_code} $KC_URL/auth/health/ready | grep -q "200"; then - echo "Keycloak is ready" - return 0 - else - echo "Keycloak not ready, waiting..." - sleep 10 - attempt=$((attempt+1)) - fi - done - - echo "Keycloak failed to become ready after $max_attempts attempts" - return 1 - } - # Function to login to Keycloak admin console function login { local token=$(curl -s -X POST "$KC_URL/auth/realms/master/protocol/openid-connect/token" \ @@ -332,11 +309,6 @@ GRANT # Fix PostgreSQL permissions for metrics fix_metrics_permissions - - # Wait for Keycloak to be ready - wait_for_keycloak || { - echo "Failed waiting for Keycloak" - exit 1 } # Login to Keycloak