Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(storage): AWS backend using thanos.io/objstore #11221

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

JoaoBraveCoding
Copy link
Collaborator

@JoaoBraveCoding JoaoBraveCoding commented Nov 13, 2023

What this PR does / why we need it:

This PR adds support to use the thanos.io/objstore backend for the AWS provider for all components excluding the Ruler since it's similar to the work done in #11132.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

  • We tried to the best of our efforts to preserve feature parity so the new backend still uses the ObjectClient interface
  • Fix how some CLI variables we being passed (some HTTP CLI variables were under .http while others weren't)
  • Thanos.io/objstore doesn't support all the CLI flags Loki supports nowadays (see snippet below)
  • This PR was inspired by the way Mimir uses thanos.io/objstore with the goal of making this part of the codebase as similar as possible

CLI Table

s3.bucket (new, before it was buckets)
s3.endpoint
s3.region
s3.access-key-id
s3.secret-access-key
s3.session-token
s3.insecure
s3.storage-class 
s3.sse
s3.http.idle-conn-timeout
s3.http.response-header-timeout
s3.http.insecure-skip-verify
s3.http.ca-file
s3.signature-version (possible but I've deprecated it)

NOT PRESENT AT THE MOMENT
s3.url (replaced by endpoint)
s3.force-path-style (deprecated since we use endpoint)
s3.buckets
s3.http.timeout (only possible if we were to always pass full transport)
s3.min-backoff (Would need objstore patch)
s3.max-backoff (Would need objstore patch)
s3.max-retries (Would need objstore patch)

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • CHANGELOG.md updated
    • If the change is worth mentioning in the release notes, add add-to-release-notes label
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

@JoaoBraveCoding JoaoBraveCoding changed the title WIP: AWS implementation using thanos.io/objstore WIP: storage: AWS backend using thanos.io/objstore Nov 14, 2023
Copy link
Contributor

github-actions bot commented Nov 20, 2023

Trivy scan found the following vulnerabilities:

@JoaoBraveCoding JoaoBraveCoding force-pushed the log-4550-aws branch 2 times, most recently from 36c3250 to b3aab24 Compare November 20, 2023 17:13
@JoaoBraveCoding JoaoBraveCoding marked this pull request as ready for review November 23, 2023 10:48
@JoaoBraveCoding JoaoBraveCoding requested a review from a team as a code owner November 23, 2023 10:48
@JoaoBraveCoding JoaoBraveCoding changed the title WIP: storage: AWS backend using thanos.io/objstore storage: AWS backend using thanos.io/objstore Nov 23, 2023
@JoaoBraveCoding JoaoBraveCoding changed the title storage: AWS backend using thanos.io/objstore feat(storage): AWS backend using thanos.io/objstore Mar 14, 2024
@github-actions github-actions bot added the type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories label Mar 14, 2024
func (cfg *HTTPConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet) {
cfg.Config.RegisterFlagsWithPrefix(prefix+"s3.", f)
}

// Config holds the config options for an S3 backend
type Config struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JoaoBraveCoding would you be able to add STSEndpoint to this config?
the thanos store supports this and would add support for minio STS auth flow.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, no problem from my side. I'll do it once #11132 merges since it will likely be the first to go. Then I'll need to rebase this one and I'll add your request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XXL type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants