Repository navigation
Conversation
Add Alibaba Cloud OSS as a storage backend for blocks, ruler, and alertmanager storage, wrapping the existing Thanos objstore OSS provider. Select it with `backend: oss` and configure it via `-<prefix>.oss.*` flags. Fixes cortexproject#7594 Assisted-by: Claude Opus 5.5 Signed-off-by: YuMin Kim <yuminkim.dev@gmail.com>
Signed-off-by: YuMin Kim <yuminkim.dev@gmail.com> Assisted-by: Claude Opus 5.5
This branch has not been deployed
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.
What this PR does:
Adds Alibaba Cloud OSS as a storage backend for blocks, ruler, and alertmanager. It wraps the OSS provider that Thanos
objstorealready ships (objstore/providers/oss). Select it withbackend: ossand configure it with the-<prefix>.oss.*flags (endpoint,bucket,access-key-id,access-key-secret). The secret is stored as aflagext.Secret, the same way the other backends store theirs.pkg/storage/bucket/oss/config.go: config struct and flagspkg/storage/bucket/oss/bucket_client.go: thin wrapper aroundoss.NewBucketWithConfig. It passes the hedged round tripper through.pkg/storage/bucket/client.go: backend registration (constant,SupportedBackends, config field, flag registration,NewClientcase)make doc).v1-guarantees.mdlists OSS as experimental.The OCI backend (#7718) set the structure, and this PR follows it. Ruler, alertmanager, and blocks storage all validate against
bucket.SupportedBackends, so OSS works for all three without extra wiring. No vendoring was needed:github.com/aliyun/aliyun-oss-go-sdkandobjstore/providers/ossare already invendor/, andgo mod tidy && go mod vendorproduce no diff.Testing:
go build ./...,go test ./pkg/storage/bucket/..., andgolangci-lint run ./pkg/storage/bucket/...(v2.13.1) all pass.Which issue(s) this PR fixes:
Fixes #7594
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]docs/configuration/v1-guarantees.mdupdated if this PR introduces experimental flagsAI disclosure: most of this change was written with AI assistance (Claude Code, Claude Opus 5.5).
🤖 Generated with Claude Code