Skip to content

Commit c24d2c3

Browse files
committed
Adjust values to work
1 parent f3da9ab commit c24d2c3

File tree

5 files changed

+48
-27
lines changed

5 files changed

+48
-27
lines changed

.github/workflows/deploy-auth-service.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,19 +138,19 @@ jobs:
138138
echo "🔍 Verifying auth service deployment..."
139139
140140
# Wait for pod to be ready
141-
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=auth-service -n study-mate --timeout=300s || {
141+
kubectl wait --for=condition=ready pod -l app.kubernetes.io/component=auth-service -n study-mate --timeout=300s || {
142142
echo "❌ Auth service pod failed to become ready"
143143
echo "🔍 Pod status:"
144-
kubectl get pods -n study-mate -l app.kubernetes.io/name=auth-service -o wide
144+
kubectl get pods -n study-mate -l app.kubernetes.io/component=auth-service -o wide
145145
echo "🔍 Pod logs:"
146-
kubectl logs -l app.kubernetes.io/name=auth-service -n study-mate --tail=50 || echo "⚠️ Could not get logs"
146+
kubectl logs -l app.kubernetes.io/component=auth-service -n study-mate --tail=50 || echo "⚠️ Could not get logs"
147147
exit 1
148148
}
149149
150150
echo "✅ Auth service is ready"
151151
152152
# Check service
153-
kubectl get service auth-service -n study-mate
153+
kubectl get service study-mate-auth-service -n study-mate
154154
155155
# Health check
156156
echo "🏥 Performing health check..."
@@ -174,7 +174,7 @@ jobs:
174174
echo "🏷️ Image tag: ${{ github.event.inputs.image_tag || github.sha }}"
175175
echo ""
176176
echo "🔧 Useful commands:"
177-
echo " kubectl get pods -n study-mate -l app.kubernetes.io/name=auth-service"
177+
echo " kubectl get pods -n study-mate -l app.kubernetes.io/component=auth-service"
178178
echo " kubectl logs -f deployment/auth-service -n study-mate"
179179
echo " kubectl port-forward svc/auth-service 8086:8086 -n study-mate"
180180
echo ""

.github/workflows/deploy-document-service.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,19 @@ jobs:
140140
echo "🔍 Verifying document service deployment..."
141141
142142
# Wait for pod to be ready
143-
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=document-service -n study-mate --timeout=300s || {
143+
kubectl wait --for=condition=ready pod -l app.kubernetes.io/component=document-service -n study-mate --timeout=300s || {
144144
echo "❌ Document service pod failed to become ready"
145145
echo "🔍 Pod status:"
146-
kubectl get pods -n study-mate -l app.kubernetes.io/name=document-service -o wide
146+
kubectl get pods -n study-mate -l app.kubernetes.io/component=document-service -o wide
147147
echo "🔍 Pod logs:"
148-
kubectl logs -l app.kubernetes.io/name=document-service -n study-mate --tail=50 || echo "⚠️ Could not get logs"
148+
kubectl logs -l app.kubernetes.io/component=document-service -n study-mate --tail=50 || echo "⚠️ Could not get logs"
149149
exit 1
150150
}
151151
152152
echo "✅ Document service is ready"
153153
154154
# Check service
155-
kubectl get service document-service -n study-mate
155+
kubectl get service study-mate-document-service -n study-mate
156156
157157
# Health check
158158
echo "🏥 Performing health check..."
@@ -176,7 +176,7 @@ jobs:
176176
echo "🏷️ Image tag: ${{ github.event.inputs.image_tag || github.sha }}"
177177
echo ""
178178
echo "🔧 Useful commands:"
179-
echo " kubectl get pods -n study-mate -l app.kubernetes.io/name=document-service"
179+
echo " kubectl get pods -n study-mate -l app.kubernetes.io/component=document-service"
180180
echo " kubectl logs -f deployment/document-service -n study-mate"
181181
echo " kubectl port-forward svc/document-service 8084:8084 -n study-mate"
182182
echo ""

.github/workflows/deploy-genai-service.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -140,23 +140,23 @@ jobs:
140140
echo "🔍 Verifying GenAI service deployment..."
141141
142142
# Wait for pod to be ready
143-
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=genai-service -n study-mate --timeout=300s || {
144-
echo "❌ GenAI service pod failed to become ready"
145-
echo "🔍 Pod status:"
146-
kubectl get pods -n study-mate -l app.kubernetes.io/name=genai-service -o wide
147-
echo "🔍 Pod logs:"
148-
kubectl logs -l app.kubernetes.io/name=genai-service -n study-mate --tail=50 || echo "⚠️ Could not get logs"
143+
kubectl wait --for=condition=ready pod -l app.kubernetes.io/component=genai-service -n study-mate --timeout=300s || {
144+
echo "❌ GenAI service pod failed to become ready"
145+
echo "🔍 Pod status:"
146+
kubectl get pods -n study-mate -l app.kubernetes.io/component=genai-service -o wide
147+
echo "🔍 Pod logs:"
148+
kubectl logs -l app.kubernetes.io/component=genai-service -n study-mate --tail=50 || echo "⚠️ Could not get logs"
149149
exit 1
150150
}
151151

152152
echo "✅ GenAI service is ready"
153153

154154
# Check service
155-
kubectl get service genai-service -n study-mate
155+
kubectl get service study-mate-genai-service -n study-mate
156156

157157
# Health check
158158
echo "🏥 Performing health check..."
159-
kubectl port-forward svc/genai-service 8085:8085 -n study-mate &
159+
kubectl port-forward svc/study-mate-genai-service 8085:8085 -n study-mate &
160160
PF_PID=$!
161161
sleep 10
162162

@@ -176,9 +176,9 @@ jobs:
176176
echo "🏷️ Image tag: ${{ github.event.inputs.image_tag || github.sha }}"
177177
echo ""
178178
echo "🔧 Useful commands:"
179-
echo " kubectl get pods -n study-mate -l app.kubernetes.io/name=genai-service"
180-
echo " kubectl logs -f deployment/genai-service -n study-mate"
181-
echo " kubectl port-forward svc/genai-service 8085:8085 -n study-mate"
179+
echo " kubectl get pods -n study-mate -l app.kubernetes.io/component=genai-service"
180+
echo " kubectl logs -f deployment/study-mate-genai-service -n study-mate"
181+
echo " kubectl port-forward svc/study-mate-genai-service 8085:8085 -n study-mate"
182182
echo ""
183183
echo "🔍 Troubleshooting:"
184184
echo " kubectl get events -n study-mate --sort-by='.lastTimestamp'"

.github/workflows/deploy-ingress.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,26 @@ jobs:
8282
- name: Verify deployment
8383
run: |
8484
echo "Waiting for ingress to be ready..."
85-
kubectl wait --for=condition=ready ingress/study-mate-client-ingress \
86-
--namespace study-mate \
87-
--timeout=300s
85+
86+
# Wait for ingress to have load balancer IPs (this is how we know it's ready)
87+
echo "Checking for load balancer IPs..."
88+
timeout=300
89+
elapsed=0
90+
while [ $elapsed -lt $timeout ]; do
91+
if kubectl get ingress study-mate-client-ingress -n study-mate -o jsonpath='{.status.loadBalancer.ingress[*].ip}' | grep -q .; then
92+
echo "✅ Ingress has load balancer IPs assigned"
93+
break
94+
fi
95+
echo "⏳ Waiting for ingress to get load balancer IPs... ($elapsed/$timeout seconds)"
96+
sleep 10
97+
elapsed=$((elapsed + 10))
98+
done
99+
100+
if [ $elapsed -ge $timeout ]; then
101+
echo "❌ Timeout waiting for ingress to be ready"
102+
kubectl describe ingress study-mate-client-ingress -n study-mate
103+
exit 1
104+
fi
88105
89106
echo "Ingress deployment successful!"
90107
kubectl get ingress -n study-mate

.github/workflows/deploy-kubernetes.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,11 @@ jobs:
161161
kubectl get ingress -n ${{ env.HELM_NAMESPACE }} || echo "⚠️ Could not retrieve ingress (permission issue)"
162162
163163
echo "🏥 Waiting for pods to be ready..."
164-
kubectl wait --for=condition=ready pod -l app=study-mate-postgres -n ${{ env.HELM_NAMESPACE }} --timeout=300s || echo "⚠️ Could not verify PostgreSQL pod readiness"
165-
kubectl wait --for=condition=ready pod -l app=study-mate-client -n ${{ env.HELM_NAMESPACE }} --timeout=300s || echo "⚠️ Could not verify client pod readiness"
166-
kubectl wait --for=condition=ready pod -l app=study-mate-auth-service -n ${{ env.HELM_NAMESPACE }} --timeout=300s || echo "⚠️ Could not verify auth service pod readiness"
164+
kubectl wait --for=condition=ready pod -l app.kubernetes.io/component=postgres -n ${{ env.HELM_NAMESPACE }} --timeout=300s || echo "⚠️ Could not verify PostgreSQL pod readiness"
165+
kubectl wait --for=condition=ready pod -l app.kubernetes.io/component=client -n ${{ env.HELM_NAMESPACE }} --timeout=300s || echo "⚠️ Could not verify client pod readiness"
166+
kubectl wait --for=condition=ready pod -l app.kubernetes.io/component=auth-service -n ${{ env.HELM_NAMESPACE }} --timeout=300s || echo "⚠️ Could not verify auth service pod readiness"
167+
kubectl wait --for=condition=ready pod -l app.kubernetes.io/component=document-service -n ${{ env.HELM_NAMESPACE }} --timeout=300s || echo "⚠️ Could not verify document service pod readiness"
168+
kubectl wait --for=condition=ready pod -l app.kubernetes.io/component=genai-service -n ${{ env.HELM_NAMESPACE }} --timeout=300s || echo "⚠️ Could not verify genai service pod readiness"
167169
168170
# Check if ingress failed and provide alternative access method
169171
if ! kubectl get ingress -n ${{ env.HELM_NAMESPACE }} 2>/dev/null | grep -q study-mate-ingress; then
@@ -183,4 +185,6 @@ jobs:
183185
echo "kubectl get pods -n ${{ env.HELM_NAMESPACE }}"
184186
echo "kubectl logs -f deployment/study-mate-client -n ${{ env.HELM_NAMESPACE }}"
185187
echo "kubectl logs -f deployment/study-mate-auth-service -n ${{ env.HELM_NAMESPACE }}"
188+
echo "kubectl logs -f deployment/study-mate-document-service -n ${{ env.HELM_NAMESPACE }}"
189+
echo "kubectl logs -f deployment/study-mate-genai-service -n ${{ env.HELM_NAMESPACE }}"
186190
echo "kubectl port-forward svc/study-mate-client 8080:80 -n ${{ env.HELM_NAMESPACE }}"

0 commit comments

Comments
 (0)