From f4975db1658ef38a19abdc27de7df658ac53c7b1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 23 Jan 2026 03:22:50 +0000 Subject: [PATCH] Address code review feedback: Add timeout check and clarify docs Co-authored-by: rchincha <45800463+rchincha@users.noreply.github.com> --- examples/kind/README.md | 3 ++- examples/kind/kind-oidc.sh | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/examples/kind/README.md b/examples/kind/README.md index c13ed563..820e119c 100644 --- a/examples/kind/README.md +++ b/examples/kind/README.md @@ -69,7 +69,8 @@ The script will: 3. Create a kind cluster with OIDC configuration 4. Deploy zot with OIDC authentication enabled 5. Configure RBAC for OIDC users -6. Wait for user input before cleanup +6. In interactive mode: Wait for user input before cleanup + In non-interactive mode: Automatically cleanup after validation #### OIDC Configuration Details diff --git a/examples/kind/kind-oidc.sh b/examples/kind/kind-oidc.sh index 8648e028..293d908f 100755 --- a/examples/kind/kind-oidc.sh +++ b/examples/kind/kind-oidc.sh @@ -88,15 +88,22 @@ docker run -d --name dex-server \ # Wait for Dex to start echo "Waiting for Dex to be ready..." +DEX_READY=false for i in $(seq 1 30); do if docker exec dex-server wget -qO- --no-check-certificate https://localhost:10443/dex/.well-known/openid-configuration > /dev/null 2>&1; then echo "Dex is ready" + DEX_READY=true break fi echo "Waiting for Dex... ($i/30)" sleep 2 done +if [ "$DEX_READY" = false ]; then + echo "ERROR: Dex failed to become ready within timeout" + exit 1 +fi + # create registry container unless it already exists reg_name='kind-registry' reg_port='5001'