Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,14 @@ kind-deploy: manifests
.PHONY: kind-cluster
kind-cluster: $(KIND) kind-verify-versions #EXHELP Standup a kind cluster.
-$(KIND) delete cluster --name $(KIND_CLUSTER_NAME)
./hack/setup-e2e-registry-config.sh
$(KIND) create cluster --name $(KIND_CLUSTER_NAME) --config ./kind-config.yaml
$(KIND) export kubeconfig --name $(KIND_CLUSTER_NAME)

.PHONY: kind-clean
kind-clean: $(KIND) #EXHELP Delete the kind cluster.
$(KIND) delete cluster --name $(KIND_CLUSTER_NAME)
./hack/cleanup-e2e-registry-config.sh

.PHONY: kind-verify-versions
kind-verify-versions:
Expand Down
21 changes: 21 additions & 0 deletions hack/cleanup-e2e-registry-config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
CERTS_DIR="${PROJECT_ROOT}/hack/kind-config/containerd/certs.d"

REGISTRY_HOST="docker-registry.operator-controller-e2e.svc.cluster.local:5000"
REGISTRY_DIR="${CERTS_DIR}/${REGISTRY_HOST}"

echo "Cleaning up e2e registry configuration..."

if [ -d "${REGISTRY_DIR}" ]; then
echo "Removing directory: ${REGISTRY_DIR}"
rm -rf "${REGISTRY_DIR}"
echo "E2E registry configuration cleanup complete."
else
echo "Registry directory not found, nothing to clean."
fi

This file was deleted.

25 changes: 25 additions & 0 deletions hack/setup-e2e-registry-config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
CERTS_DIR="${PROJECT_ROOT}/hack/kind-config/containerd/certs.d"

REGISTRY_HOST="docker-registry.operator-controller-e2e.svc.cluster.local:5000"
REGISTRY_DIR="${CERTS_DIR}/${REGISTRY_HOST}"

echo "Setting up e2e registry configuration..."
echo "Creating directory: ${REGISTRY_DIR}"

mkdir -p "${REGISTRY_DIR}"

cat > "${REGISTRY_DIR}/hosts.toml" << 'EOF'
[host."https://localhost:30000"]
capabilities = ["pull", "resolve"]
skip_verify = true
EOF

echo "Created ${REGISTRY_DIR}/hosts.toml"
echo "E2E registry configuration setup complete."
10 changes: 10 additions & 0 deletions scripts/install.tpl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,16 @@ if [ -f "${olmv1_manifest}" ]; then
fi

curl -L -s "${olmv1_manifest}" | sed "s/olmv1-system/${olmv1_namespace}/g" | kubectl apply -f -

# Wait for registry to be available if it exists (for e2e tests)
if kubectl get namespace operator-controller-e2e >/dev/null 2>&1; then
echo "Waiting for e2e registry to be available..."
if ! kubectl_wait "operator-controller-e2e" "deployment/docker-registry" "60s"; then
echo "Error: E2E registry is not ready, cannot proceed with deployment"
exit 1
fi
fi

Comment on lines +112 to +120
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The upgrade-experimental-e2e is failing because this check is not present in the lastest release.

Hopefully 60s of wait time will be enough.

# Wait for the rollout, and then wait for the deployment to be Available
kubectl_wait_rollout "${olmv1_namespace}" "deployment/catalogd-controller-manager" "60s"
kubectl_wait "${olmv1_namespace}" "deployment/catalogd-controller-manager" "60s"
Expand Down
Loading