PROJQUAY-11657: feat(operator): implement STS/CCO credential flow for unmanaged S3 storage - #1273
PROJQUAY-11657: feat(operator): implement STS/CCO credential flow for unmanaged S3 storage#1273jbpratt wants to merge 1 commit into
Conversation
|
Skipping CI for Draft Pull Request. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches✨ Simplify code
Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1273 +/- ##
==========================================
- Coverage 62.28% 61.49% -0.79%
==========================================
Files 25 25
Lines 3762 3955 +193
==========================================
+ Hits 2343 2432 +89
- Misses 1419 1523 +104
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…orage (PROJQUAY-11657) Enable quay-app pods on STS-enabled OpenShift clusters (ROSA, OSD) to authenticate to AWS S3 via short-lived tokens instead of static credentials when ObjectStorage is unmanaged. The operator reads ROLEARN from its environment at startup, detects STS-capable clusters (AWS platform, CCO mode, CRD availability), creates a CredentialRequest via server-side apply, and once provisioned, mounts the CCO Secret into the quay-app container with AWS_SHARED_CREDENTIALS_FILE set. When the CredentialRequest is pending, the reconciler requeues silently. Rollout is blocked with actionable conditions only for real errors: misconfigured STS or static credential conflicts. Key changes: - STS cluster detection via Infrastructure, CloudCredential, and CredentialsRequest APIs using meta.IsNoMatchError for graceful fallback - CredentialRequest lifecycle via standalone SSA with correct RawExtension providerSpec and typed OwnerReferences - Volume/env injection scoped to the quay-app container only - CSV: token-auth-aws annotation, clusterPermissions, bound-sa-token volume - RBAC for infrastructures, cloudcredentials, credentialsrequests - Chainsaw e2e test scaffold for ROSA (test-e2e-sts target) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@jbpratt: This pull request references [Jira Issue PROJQUAY-11657](https://redhat.atlassian.net/browse/PROJQUAY-11657), which is invalid:
Comment 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. |
|
This is a test |
|
PR needs rebase. 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. |
Summary
managed: falseROLEARNfrom its environment at startup, detects STS-capable clusters, creates a CredentialRequest via server-side apply, and once provisioned mounts the CCO Secret into the quay-app container withAWS_SHARED_CREDENTIALS_FILEROLEARNis absent — zero behavior change for existing installationsChanges
main.goROLEARNenv once, store on reconciler structpkg/context/context.goQuayRegistryContextapis/quay/v1/quayregistry_types.goConditionReasonconstantscontrollers/quay/features.gocheckSTSCapability()— 5-step detection chain usingmeta.IsNoMatchErrorfor graceful fallback on non-OpenShift clusterscontrollers/quay/quayregistry_controller.gocheckSTSCredentialConflict()(standalone),ensureCredentialRequest()with correct RawExtension providerSpec and typed OwnerReferencespkg/middleware/middleware.goquay-appcontainer onlybundle/manifests/quay-operator.clusterserviceversion.yamltoken-auth-aws: "true",clusterPermissions,bound-sa-tokenprojected volumeconfig/rbac/role.yamltest/chainsaw/sts_cco/test-e2e-stsMakefile targetTest plan
make fmt && make vet— cleanmake manifests— RBAC regeneratedmake test— all unit tests pass (STS detection matrix, credential conflict, middleware injection)make test-e2e-kind— regression (no ROLEARN, STS path never fires)make test-e2e-sts— ROSA cluster with STS enabled (requiresROLEARN+STS_S3_BUCKET)🤖 Generated with Claude Code