From fb69897211448444ee922a0833d481218348de85 Mon Sep 17 00:00:00 2001 From: Greg Date: Mon, 30 Jun 2025 23:22:30 -0700 Subject: [PATCH] fix: Ensure Knative service exists before patching in staging deployment - Apply service manifest before attempting to patch - This prevents 'resource not found' errors when staging service doesn't exist yet - Ensures proper deployment flow for staging environment --- .github/workflows/deploy-staging.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index a65aea6..c54dd4b 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -59,7 +59,10 @@ jobs: kubectl apply -f - fi - # Update image in service and deploy + # Apply the Knative service manifest first + kubectl apply -f manifests/staging/service.yml + + # Update image in service kubectl patch ksvc game-2048-staging -n game-2048-staging --type merge -p '{"spec":{"template":{"spec":{"containers":[{"image":"${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}","imagePullPolicy":"Always"}]}}}}' echo "⏳ Waiting for deployment to be ready..."