Skip to content

Commit 30db8d0

Browse files
committed
Inject service account spec to Aggregator
``` Caller does not have storage.objects.list access to the Google Cloud Storage bucket. Permission 'storage.objects.list' denied on resource (or it may not exist). ```
1 parent e7e10f9 commit 30db8d0

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Ironwood/guides/automation/aggregator.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ kind: Job
33
metadata:
44
name: aggregator
55
spec:
6+
backoffLimit: 0
67
template:
78
spec:
9+
serviceAccountName: ${GCS_SA_NAME}
810
containers:
911
- name: main-app
1012
image: python:3.12

Ironwood/guides/automation/automation_launch.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,12 @@ echo ""
209209
echo "Jobs completed. Aggregating results..."
210210
echo ""
211211

212-
envsubst '${GCS_BUCKET_ROOT_DIR}' < ${SCRIPT_DIR}/aggregator.yaml | kubectl apply -f -
212+
# Ensure cleanup of any previous aggregator job to avoid immutable field errors
213+
kubectl delete job aggregator --ignore-not-found=true
214+
215+
envsubst '${GCS_BUCKET_ROOT_DIR} ${GCS_SA_NAME}' < ${SCRIPT_DIR}/aggregator.yaml | kubectl apply -f -
213216
wait_for_job_completion "aggregator" ${TIMEOUT_SECOND}
214-
envsubst '${GCS_BUCKET_ROOT_DIR}' < ${SCRIPT_DIR}/aggregator.yaml | kubectl delete -f -
217+
envsubst '${GCS_BUCKET_ROOT_DIR} ${GCS_SA_NAME}' < ${SCRIPT_DIR}/aggregator.yaml | kubectl delete -f -
215218

216219
# Print the failed jobs at the end for better visibility.
217220

0 commit comments

Comments
 (0)