4242 helm repo add vertica-charts https://vertica.github.io/charts || true
4343 helm repo add bitnami https://charts.bitnami.com/bitnami || true
4444 helm repo update
45- # Step 4: Install MinIO for communal storage
45+
4646 - name : Install MinIO (namespace minio)
4747 run : |
4848 kubectl create ns minio || true
9696 kubectl -n minio rollout status deployment/minio --timeout=2m || true
9797 kubectl get pods -n minio -o wide || true
9898 kubectl get svc -n minio || true
99+
99100 - name : Ensure MinIO bucket exists
100101 run : |
101102 kubectl run mc-client --rm -i --restart=Never \
@@ -106,17 +107,17 @@ jobs:
106107 mc mb --ignore-existing localminio/vertica-fleeting && \
107108 mc ls localminio
108109 "
109- # Create MinIO credentials secret
110+
110111 - name : Create MinIO Secret
111112 run : |
112- kubectl delete secret communal-creds -n my-verticadb-operator --ignore-not-found
113113 kubectl create ns my-verticadb-operator || true
114+ kubectl delete secret communal-creds -n my-verticadb-operator --ignore-not-found
114115 kubectl create secret generic communal-creds \
115116 -n my-verticadb-operator \
116117 --from-literal=accesskey="minioadmin" \
117118 --from-literal=secretkey="minioadmin"
118119 kubectl get secret communal-creds -n my-verticadb-operator -o yaml || true
119- # Install Vertica Operator
120+
120121 - name : Install Vertica Operator
121122 run : |
122123 cat <<'EOF' > operator-values.yaml
@@ -131,7 +132,7 @@ jobs:
131132 helm upgrade --install vdb-op vertica-charts/verticadb-operator \
132133 -n my-verticadb-operator -f operator-values.yaml --wait --timeout 10m
133134 kubectl -n my-verticadb-operator get pods -o wide || true
134- # Deploy VerticaDB with MinIO
135+
135136 - name : Deploy VerticaDB
136137 run : |
137138 cat <<'EOF' | kubectl apply -f -
@@ -158,7 +159,7 @@ jobs:
158159 EOF
159160 kubectl annotate verticadb verticadb-sample -n my-verticadb-operator \
160161 vertica.com/ci-reconcile="$(date -u +%s)" --overwrite || true
161- # Wait for Vertica readiness
162+
162163 - name : Wait for Vertica readiness
163164 run : |
164165 NS=my-verticadb-operator
@@ -168,7 +169,7 @@ jobs:
168169 kubectl get pod ${POD} -n ${NS} && break || sleep 10
169170 done
170171 kubectl wait --for=condition=Ready pod/${POD} -n ${NS} --timeout=5m || true
171- # Deploy Keycloak in K8s
172+
172173 - name : Deploy Keycloak
173174 run : |
174175 kubectl create ns keycloak || true
@@ -219,12 +220,12 @@ jobs:
219220 - port: 8080
220221 targetPort: 8080
221222 EOF
222- # Wait for Keycloak readiness
223+
223224 - name : Wait for Keycloak readiness
224225 run : |
225226 kubectl -n keycloak rollout status deploy/keycloak --timeout=2m
226227 kubectl -n keycloak get pods -o wide
227- # Configure Keycloak realm, client, and user
228+
228229 - name : Configure Keycloak realm, client, and user
229230 run : |
230231 kubectl -n keycloak exec deploy/keycloak -- \
@@ -245,7 +246,7 @@ jobs:
245246 kubectl -n keycloak exec deploy/keycloak -- \
246247 /opt/keycloak/bin/kcadm.sh set-password -r test \
247248 --username oauth_user --new-password password
248- # Configure Vertica Authentication
249+
249250 - name : Configure Vertica Authentication
250251 run : |
251252 NS=my-verticadb-operator
@@ -265,22 +266,19 @@ jobs:
265266 GRANT AUTHENTICATION v_dbadmin_hash TO dbadmin;
266267 \"
267268 "
268- # Fetch access token
269+
269270 - name : Fetch OAuth Access Token
270271 run : |
271272 set -euo pipefail
272-
273273 NS=keycloak
274274 POD_NAME="curl-token-$$"
275275 IMAGE="curlimages/curl:7.92.0"
276276 TOKEN_ENDPOINT="http://keycloak.keycloak.svc.cluster.local:8080/realms/${REALM}/protocol/openid-connect/token"
277277 WAIT_TIMEOUT=60
278278 INTERVAL=2
279279
280- # Create a short-lived pod that will run curl
281280 kubectl -n ${NS} run ${POD_NAME} --restart=Never --image=${IMAGE} --command -- sleep 300
282281
283- # Wait for pod to reach Running
284282 deadline=$((SECONDS + WAIT_TIMEOUT))
285283 while [ $SECONDS -lt $deadline ]; do
286284 phase=$(kubectl -n ${NS} get pod ${POD_NAME} -o jsonpath='{.status.phase}' 2>/dev/null || echo "")
@@ -305,7 +303,6 @@ jobs:
305303 exit 1
306304 fi
307305
308- # Execute curl inside the pod and write body+httpcode to a file
309306 kubectl -n ${NS} exec ${POD_NAME} -- sh -c "
310307 curl -s -w '\n%{http_code}' -X POST '${TOKEN_ENDPOINT}' \
311308 -d 'client_id=${CLIENT_ID}' \
@@ -315,7 +312,6 @@ jobs:
315312 -d 'client_secret=${CLIENT_SECRET}' > /tmp/token_resp.txt
316313 "
317314
318- # Retrieve response then delete pod
319315 RAW_JSON=$(kubectl -n ${NS} exec ${POD_NAME} -- cat /tmp/token_resp.txt || true)
320316 kubectl -n ${NS} delete pod ${POD_NAME} --ignore-not-found
321317
@@ -355,7 +351,6 @@ jobs:
355351 POD=py-test-runner
356352 kubectl -n ${NS} exec -i pod/${POD} -- mkdir -p /workspace
357353 tar cf - . | kubectl -n ${NS} exec -i pod/${POD} -- tar xf - -C /workspace
358- # copy the token created on the runner into the pod
359354 kubectl -n ${NS} cp access_token.txt pod/${POD}:/workspace/access_token.txt
360355
361356 - name : Run tests inside python pod
@@ -370,8 +365,7 @@ jobs:
370365 export VP_TEST_OAUTH_ACCESS_TOKEN=\$(cat access_token.txt)
371366 tox -e py
372367 "
373-
374- # Cleanup MinIO
368+
375369 - name : Uninstall MinIO
376370 if : always()
377371 run : |
0 commit comments