Add Bucket CORS configuration#391
Open
mariomalinditex wants to merge 2 commits into
Open
Conversation
Add a CORSConfiguration sub-resource to the Bucket managed resource, following the existing ServerSideEncryptionConfiguration pattern. - New CORSConfiguration/CORSRule API types and Bucket spec fields (corsConfiguration, corsConfigurationDisabled) plus the corsConfigurationCondition backend status. - S3-only implementation via Put/Get/DeleteBucketCors on the S3Client interface; no new external dependencies. - New CORSConfigurationClient sub-resource reconciler wired into the bucket controller, autopause checks and per-backend conditions. - --disable-cors-config-reconcile flag (DISABLE_CORS_CONFIG_RECONCILE). - Regenerated deepcopy, S3 client fakes and Bucket CRD; added example CR. Signed-off-by: mariomalinditex <mariomal@ext.inditex.com>
Signed-off-by: mariomalinditex <mariomal@ext.inditex.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of your changes
Add a CORSConfiguration sub-resource to the Bucket managed resource,
following the existing ServerSideEncryptionConfiguration pattern.
(corsConfiguration, corsConfigurationDisabled) plus the
corsConfigurationCondition backend status.
interface; no new external dependencies.
bucket controller, autopause checks and per-backend conditions.
I have:
make ready-for-reviewto ensure this PR is ready for review.make ceph-chainsawto validate these changes against Ceph. This step is not always necessary. However, for changes related to S3 calls it is sensible to validate against an actual Ceph cluster. Localstack is used in our CI Chainsaw suite for convenience and there can be disparity in S3 behaviours between it and Ceph. Seedocs/TESTING.mdfor information on how to run tests against a Ceph cluster.backport release-x.ylabels to auto-backport this PR if necessary.How has this code been tested
internal/rgw) and theCORSConfigurationClientreconcile flow (internal/controller/bucket) covering create/update, delete, drift, disabled, and unhealthy-backend paths.go test ./...passes.golangci-lintpasses with 0 issues;make generateregenerates the CRD, deepcopy, and S3 client fakes cleanly.corsConfiguration+ assertcorsConfigurationCondition: Available) to the Localstack suite (e2e/tests/stable, runs in CI) and the Ceph suite (e2e/tests/ceph). Ran the Localstack suite locally against Kind.