Skip to content

Commit

Permalink
Fix retrying for req avail checks (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwiatekus authored Nov 13, 2024
1 parent 2066671 commit a3bb699
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tests/btp/hack/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ enable_docker_registry:
@while ! kubectl get gateway kyma-gateway -n kyma-system --kubeconfig ${KUBECONFIG}; do echo "Waiting for kyma-gateway..."; sleep 1; done
@echo "Enabling docker registry"
@kubectl apply -f ${OPERATOR_MANIFEST} --kubeconfig ${KUBECONFIG}
@while ! kubectl get crd dockerregistries.operator.kyma-project.io --kubeconfig ${KUBECONFIG}; do echo "Waiting for docker-registry CRD..."; sleep 1; done
@kubectl wait --for condition=established crd/dockerregistries.operator.kyma-project.io --kubeconfig ${KUBECONFIG}
@kubectl apply -f ../k8s-resources/dependencies/exposed-docker-registry-with-btp-storage.yaml -n kyma-system --kubeconfig ${KUBECONFIG}
@echo "..waiting for docker registry"
@kubectl wait --for condition=Installed dockerregistries.operator.kyma-project.io/default -n kyma-system --timeout=300s --kubeconfig ${KUBECONFIG}
@echo "Docker registry installed"
@while ! kubectl get secret dockerregistry-config-external --kubeconfig ${KUBECONFIG}; do echo "Waiting for dockerregistry-config-external secret..."; sleep 1; done
@echo "Waiting for docker registry external address availibility"
./registry-availibility-check.sh ${KUBECONFIG}
@for i in 1 2 3 4 5; do ./registry-availibility-check.sh ${KUBECONFIG} && break || sleep 5; done

.PHONY: docker_registry_login
docker_registry_login:
Expand Down
1 change: 0 additions & 1 deletion tests/btp/hack/registry-availibility-check.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/sh
set -e -o pipefail

USERNAME=$(kubectl get secrets -n kyma-system dockerregistry-config-external -o jsonpath={.data.username} --kubeconfig ${KUBECONFIG} | base64 -d)
PASSWORD=$(kubectl get secrets -n kyma-system dockerregistry-config-external -o jsonpath={.data.password} --kubeconfig ${KUBECONFIG} | base64 -d)
Expand Down

0 comments on commit a3bb699

Please sign in to comment.