DPTP-5324: move periodic-ipi-deprovision-aws jobs to STS - #85496
bear-redhat wants to merge 1 commit into
Conversation
The periodic-ipi-deprovision-aws[-N] jobs authenticated to AWS with the long-lived access key in cluster-secrets-aws[-N] (.awscred). That key expired (AuthFailure on DescribeRegions), so clusters were being leaked. Switch them to STS AssumeRoleWithWebIdentity, mirroring the credential setup ci-operator uses for ipi-aws jobs: - aws.sh: when AWS_STS_MODE=yes, build ~/.aws/config that exchanges a projected service-account token for the per-cluster home role and then chain-assumes the per-account target role. Backward compatible; the hypershift/konflux callers that still pass static creds are unaffected. - infra-build-farm-periodics.yaml: the 5 aws deprovision jobs now project an sts.amazonaws.com SA token and pass HOME_ROLE_ARN/TARGET_ROLE_ARN instead of mounting .awscred. Add the ci.openshift.io/role: cloud-aws capacity selector so the dispatcher places these jobs on AWS build clusters. They were defaulting to build13 (a GCP cluster), where the AWS STS home-role secret is not synced and STS cannot work. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@bear-redhat: This pull request references DPTP-5324 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.1.0" version, but no target version was set. DetailsIn response to this:
Instructions 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 openshift-eng/jira-lifecycle-plugin repository. |
|
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: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. WalkthroughThe AWS deprovisioning script now supports optional STS authentication. When enabled, it configures web-identity authentication for a hub role and chained assumption of the target role. ChangesAWS STS authentication
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk was identified for the STS authentication migration. 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[REHEARSALNOTIFIER]
Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals. Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
/retest |
|
@bear-redhat: 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. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bear-redhat, deepsm007 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 |
The periodic-ipi-deprovision-aws[-N] jobs authenticated to AWS with the long-lived access key in cluster-secrets-aws[-N] (.awscred). That key expired (AuthFailure on DescribeRegions), so clusters were being leaked.
Switch them to STS AssumeRoleWithWebIdentity, mirroring the credential setup ci-operator uses for ipi-aws jobs:
Add the ci.openshift.io/role: cloud-aws capacity selector so the dispatcher places these jobs on AWS build clusters. They were defaulting to build13 (a GCP cluster), where the AWS STS home-role secret is not synced and STS cannot work.
Summary by CodeRabbit
The five periodic AWS IPI deprovision jobs now support STS
AssumeRoleWithWebIdentityauthentication. The jobs use projected service-account tokens and chained hub and target role ARNs instead of static.awscredmounts.The jobs target AWS build clusters with
ci.openshift.io/role: cloud-aws. Jira validation confirms DPTP-5324, but the issue has no target version while the target branch expects5.1.0.Test results and review finding counts are unavailable.