From aa7693ad766893eb42316a01d96d64e5939cf3d1 Mon Sep 17 00:00:00 2001 From: OpenShift Cherrypick Robot Date: Tue, 25 Feb 2025 18:09:00 +0100 Subject: [PATCH] fix: fix mirror init command (PROJQUAY-8187) (#1023) - Use requests to hit Quay container in mirror init pod Co-authored-by: Jonathan King --- kustomize/components/mirror/mirror.deployment.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kustomize/components/mirror/mirror.deployment.yaml b/kustomize/components/mirror/mirror.deployment.yaml index daa194ea8..c76aed2f5 100644 --- a/kustomize/components/mirror/mirror.deployment.yaml +++ b/kustomize/components/mirror/mirror.deployment.yaml @@ -53,9 +53,9 @@ spec: - name: quay-mirror-init image: quay.io/projectquay/quay:latest command: - - /bin/sh - - -c - - curl $QUAY_APP_SERVICE_HOST --connect-timeout 360 + - sh + - -c + - python -c "import os, requests, sys; host = os.getenv(\"QUAY_APP_SERVICE_HOST\"); sys.exit(0) if requests.get(\"http://\"+host) else sys.exit(1);" env: - name: QUAY_APP_SERVICE_HOST value: $(QUAY_APP_SERVICE_HOST)