Skip to content

Commit f4ad7cb

Browse files
authored
Fixed the error
1 parent b2a5408 commit f4ad7cb

1 file changed

Lines changed: 5 additions & 36 deletions

File tree

‎.github/workflows/ci.yaml‎

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ jobs:
4343
helm repo add bitnami https://charts.bitnami.com/bitnami || true
4444
helm repo update
4545
46-
# Step 4: Install MinIO for communal storage
4746
- name: Install MinIO (namespace minio)
4847
run: |
4948
kubectl create ns minio || true
@@ -95,8 +94,6 @@ jobs:
9594
EOF
9695
kubectl apply -f minio.yaml
9796
kubectl -n minio rollout status deployment/minio --timeout=2m || true
98-
kubectl get pods -n minio -o wide || true
99-
kubectl get svc -n minio || true
10097
10198
- name: Ensure MinIO bucket exists
10299
run: |
@@ -109,7 +106,6 @@ jobs:
109106
mc ls localminio
110107
"
111108
112-
# Create MinIO credentials secret
113109
- name: Create MinIO Secret
114110
run: |
115111
kubectl delete secret communal-creds -n my-verticadb-operator --ignore-not-found
@@ -118,9 +114,7 @@ jobs:
118114
-n my-verticadb-operator \
119115
--from-literal=accesskey="minioadmin" \
120116
--from-literal=secretkey="minioadmin"
121-
kubectl get secret communal-creds -n my-verticadb-operator -o yaml || true
122117
123-
# Install Vertica Operator
124118
- name: Install Vertica Operator
125119
run: |
126120
cat <<'EOF' > operator-values.yaml
@@ -134,9 +128,7 @@ jobs:
134128
EOF
135129
helm upgrade --install vdb-op vertica-charts/verticadb-operator \
136130
-n my-verticadb-operator -f operator-values.yaml --wait --timeout 10m
137-
kubectl -n my-verticadb-operator get pods -o wide || true
138131
139-
# Deploy VerticaDB with MinIO
140132
- name: Deploy VerticaDB
141133
run: |
142134
cat <<'EOF' | kubectl apply -f -
@@ -164,7 +156,6 @@ jobs:
164156
kubectl annotate verticadb verticadb-sample -n my-verticadb-operator \
165157
vertica.com/ci-reconcile="$(date -u +%s)" --overwrite || true
166158
167-
# Wait for Vertica readiness
168159
- name: Wait for Vertica readiness
169160
run: |
170161
NS=my-verticadb-operator
@@ -175,7 +166,6 @@ jobs:
175166
done
176167
kubectl wait --for=condition=Ready pod/${POD} -n ${NS} --timeout=5m || true
177168
178-
# Deploy Keycloak in K8s
179169
- name: Deploy Keycloak
180170
run: |
181171
kubectl create ns keycloak || true
@@ -206,13 +196,6 @@ jobs:
206196
value: admin
207197
ports:
208198
- containerPort: 8080
209-
readinessProbe:
210-
httpGet:
211-
path: /
212-
port: 8080
213-
initialDelaySeconds: 20
214-
periodSeconds: 5
215-
failureThreshold: 6
216199
---
217200
apiVersion: v1
218201
kind: Service
@@ -227,13 +210,11 @@ jobs:
227210
targetPort: 8080
228211
EOF
229212
230-
# Wait for Keycloak readiness
231213
- name: Wait for Keycloak readiness
232214
run: |
233215
kubectl -n keycloak rollout status deploy/keycloak --timeout=2m
234216
kubectl -n keycloak get pods -o wide
235217
236-
# Configure Keycloak realm, client, and user
237218
- name: Configure Keycloak realm, client, and user
238219
run: |
239220
kubectl -n keycloak exec deploy/keycloak -- \
@@ -259,7 +240,6 @@ jobs:
259240
/opt/keycloak/bin/kcadm.sh set-password -r test \
260241
--username oauth_user --new-password password
261242
262-
# Configure Vertica Authentication
263243
- name: Configure Vertica Authentication
264244
run: |
265245
NS=my-verticadb-operator
@@ -280,10 +260,13 @@ jobs:
280260
\"
281261
"
282262
283-
# Fetch OAuth Access Token from Keycloak
284263
- name: Fetch OAuth Access Token
285264
run: |
286-
RAW=$(curl -s -X POST http://keycloak.keycloak.svc.cluster.local:8080/realms/${REALM}/protocol/openid-connect/token \
265+
kubectl -n keycloak port-forward svc/keycloak 8080:8080 >/dev/null 2>&1 &
266+
disown
267+
sleep 10
268+
269+
RAW=$(curl -s -X POST http://localhost:8080/realms/${REALM}/protocol/openid-connect/token \
287270
-d "client_id=${CLIENT_ID}" \
288271
-d "username=${USER}" \
289272
-d "password=${PASSWORD}" \
@@ -302,20 +285,6 @@ jobs:
302285
echo "$TOKEN" > access_token.txt
303286
echo "Access token successfully retrieved"
304287
305-
- name: Install dependencies
306-
run: pip install tox
307-
308-
- name: Run tests
309-
env:
310-
VP_TEST_USER: dbadmin
311-
VP_TEST_OAUTH_USER: ${{ env.USER }}
312-
VP_TEST_OAUTH_ACCESS_TOKEN: ${{ secrets.NONE }}
313-
run: |
314-
export VP_TEST_OAUTH_ACCESS_TOKEN=$(cat access_token.txt)
315-
tox -e py
316-
kubectl -n my-verticadb-operator delete pod go-test-runner --ignore-not-found=true
317-
318-
# Cleanup MinIO
319288
- name: Uninstall MinIO
320289
if: always()
321290
run: |

0 commit comments

Comments
 (0)