@@ -182,6 +182,21 @@ jobs:
182182 done
183183 kubectl wait --for=condition=Ready pod/${POD} -n ${NS} --timeout=5m || true
184184
185+ echo "🚀 Creating test runner pod..."
186+ kubectl -n ${NS} run test-runner --image=python:3.13-slim --restart=Never --command -- sleep infinity
187+ kubectl -n ${NS} wait --for=condition=Ready pod/test-runner --timeout=180s
188+
189+ echo "🩹 Adding Vertica pod entries to /etc/hosts in test pod..."
190+ for p in $(kubectl -n $NS get pods -l app.kubernetes.io/instance=verticadb-sample -o jsonpath='{.items[*].metadata.name}'); do
191+ IP=$(kubectl -n $NS get pod $p -o jsonpath='{.status.podIP}')
192+ echo "$IP $p.$NS.svc.cluster.local $p" | kubectl -n $NS exec -i test-runner -- tee -a /etc/hosts >/dev/null
193+ echo "✔ Added $p -> $IP"
194+ done
195+
196+ echo "📂 Copying repository into pod..."
197+ kubectl -n ${NS} cp . test-runner:/workspace
198+
199+
185200 # ---------------------------
186201 # Keycloak + OAuth setup
187202 # ---------------------------
@@ -281,16 +296,6 @@ jobs:
281296 GRANT AUTHENTICATION v_dbadmin_hash TO dbadmin;
282297 \"
283298 "
284- - name : 🩹 Patch /etc/hosts in test pod with Vertica pod entries
285- run : |
286- echo "Adding Vertica pod entries to /etc/hosts in test pod..."
287- POD=test-runner
288- NS=my-verticadb-operator
289- for p in $(kubectl -n $NS get pods -l app.kubernetes.io/instance=verticadb-sample -o jsonpath='{.items[*].metadata.name}'); do
290- IP=$(kubectl -n $NS get pod $p -o jsonpath='{.status.podIP}')
291- echo "$IP $p.$NS.svc.cluster.local $p" | kubectl -n $NS exec -i $POD -- tee -a /etc/hosts >/dev/null
292- echo "✔ Added $p -> $IP"
293- done
294299
295300 # ---------------------------
296301 # Testing section
0 commit comments