Fix gcr-io CronJob SA field: serviceAccount → serviceAccountName#79546
Conversation
The deprecated `serviceAccount` pod spec field is not honored by Kubernetes — `serviceAccountName` is the correct field. All 8 CronJobs in the gcr-io namespace were using the wrong field name, meaning they ran as the default SA rather than the intended `build-trigger` SA introduced in openshift#79380. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (8)
WalkthroughEight CronJob manifests in ChangesService Account Field Standardization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 12✅ Passed checks (12 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[REHEARSALNOTIFIER] Note: If this PR includes changes to step registry files ( |
|
@petr-muller: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: droslean, petr-muller The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Summary
Follow-up to #79380: all 8 CronJobs introduced there used
serviceAccountin the pod spec, but Kubernetes honorsserviceAccountName— theserviceAccountfield is deprecated and silently ignored. This means the CronJobs were still running as the default SA rather than thebuild-triggerSA, so the RBAC fix in #79380 had no effect.Renames the field in all 8 files (boskos, checkconfig, cleaner, commenter, gcsweb, git, label-sync, reaper).
Test plan
build-triggerSA after merge (checkoc get pod -o yamlforserviceAccountName)oc start-buildsucceeds from a manually triggered Job🤖 Generated with Claude Code
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Fix incorrect CronJob service account field name
This PR corrects a field name issue in eight CronJob manifests (boskos, checkconfig, cleaner, commenter, gcsweb, git, label-sync, and reaper) in the gcr-io namespace of the OpenShift CI infrastructure.
The Issue
The CronJobs were using the deprecated
serviceAccountfield instead of the correctserviceAccountNamefield in their pod specifications. Kubernetes ignores the deprecated field, causing these CronJobs to run under the default service account instead of the intendedbuild-triggerservice account that was introduced in PR#79380.The Fix
All eight CronJob manifests have been updated to replace
serviceAccount: build-triggerwithserviceAccountName: build-trigger, ensuring the pods will run with the correct permissions and identity.Impact
This fix restores the intended RBAC configuration for the gcr-io build trigger jobs. After this merge, the CronJobs will properly authenticate and authorize using the
build-triggerservice account, which should enable build-related operations (likeoc start-build) that depend on these permissions.