Skip to content

Commit 20d3cde

Browse files
committed
chore(e2e): apply cluster-setup and deployment fixes
Squashed cherry-picks from previous PR to resolve cluster-setup and APIKey E2E timeouts and errors. Signed-off-by: Arpit Tripathi <arpittripathiayo@gmail.com>
1 parent b540871 commit 20d3cde

2 files changed

Lines changed: 35 additions & 4 deletions

File tree

.github/workflows/e2e.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ concurrency:
1414
jobs:
1515
e2e-rbac:
1616
runs-on: ubuntu-latest
17-
timeout-minutes: 45
17+
timeout-minutes: 60
1818

1919
steps:
2020
- uses: actions/checkout@v4

scripts/cluster-setup.sh

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,42 @@ PLUGIN_NAME=$(node -p "require('${REPO_DIR}/package.json').consolePlugin.name")
2424

2525
log "creating oinc cluster with addons..."
2626
oinc create \
27-
--addons gateway-api,cert-manager,metallb,istio,kuadrant@latest \
27+
--addons gateway-api,cert-manager,metallb,istio \
2828
--console-plugin "${PLUGIN_NAME}=http://${HOST}:${PLUGIN_PORT}"
2929

30-
log "patch kuadrant to enable developer portal controller..."
31-
kubectl patch kuadrant kuadrant -n kuadrant-system --type merge --patch '{"spec": {"components": {"developerPortal": {"enabled": true}}}}'
30+
log "installing kuadrant addon (helm-based)..."
31+
MAX_RETRIES=3
32+
RETRY_DELAY=30
33+
34+
for attempt in $(seq 1 $MAX_RETRIES); do
35+
if oinc addon install kuadrant; then
36+
log "Kuadrant addon installed successfully"
37+
break
38+
fi
39+
if [ $attempt -lt $MAX_RETRIES ]; then
40+
log "Attempt $attempt/$MAX_RETRIES failed, dumping diagnostics..."
41+
kubectl get pods -n kuadrant-system 2>/dev/null || true
42+
kubectl get events -n kuadrant-system --sort-by='.lastTimestamp' 2>/dev/null | tail -10 || true
43+
log "Retrying in ${RETRY_DELAY}s..."
44+
sleep $RETRY_DELAY
45+
else
46+
log "Kuadrant addon failed after $MAX_RETRIES attempts. Final diagnostics:"
47+
kubectl get pods -A 2>/dev/null || true
48+
kubectl get events -n kuadrant-system --sort-by='.lastTimestamp' 2>/dev/null || true
49+
exit 1
50+
fi
51+
done
52+
53+
log "installing Developer Portal Controller from main..."
54+
kubectl apply -k https://github.com/Kuadrant/developer-portal-controller/config/default?ref=main
55+
56+
log "patching Developer Portal Controller image to quay.io..."
57+
kubectl set image deployment/developer-portal-controller-controller-manager \
58+
manager=quay.io/kuadrant/developer-portal-controller:v0.2.0 \
59+
-n developer-portal-controller-system
60+
61+
log "waiting for Developer Portal Controller to become ready..."
62+
kubectl rollout status deployment/developer-portal-controller-controller-manager -n developer-portal-controller-system --timeout=120s
3263

3364
# --- MetalLB IP pool ---
3465

0 commit comments

Comments
 (0)