-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Configuration: add a common config section for object storage #4473
Conversation
@@ -125,6 +126,32 @@ func (cfg *S3Config) Validate() error { | |||
return nil | |||
} | |||
|
|||
func (cfg *S3Config) ToCortexS3Config() cortex_aws.S3Config { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These "translation" functions are unfortunate, and warrant a discussion around the best path for extracting/sharing object storage clients between various projects. Out of scope for this PR though I think.
49d06a3
to
fe912bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments, notably a test case change and a request for filesystem
inclusion, but then LGTM. Great test cases by the way :)
pkg/loki/common/common.go
Outdated
S3 *aws.S3Config `yaml:"s3"` | ||
GCS *gcp.GCSConfig `yaml:"gcs"` | ||
Azure *azure.BlobStorageConfig `yaml:"azure"` | ||
Swift *openstack.SwiftConfig `yaml:"swift"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any thoughts on adding filesystem
in here and calling the struct storage
instead of object_storage
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, I agree with that. done.
@owen-d and @DylanGuedes changes pushed if you want to take another look. thanks! |
Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>
Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>
Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>
5154688
to
c925bad
Compare
LGTM! |
Signed-off-by: Trevor Whitney trevorjwhitney@gmail.com
What this PR does / why we need it:
This adds an
object_storage
section to the common config that will do the following things:ruler.storage
config is provided in the config filestorage_config
is provided in the config filecompactor.shared_store
unless a specific configuration is provided in the config fileThe common config block only allows a single object storage configuration to be provided, and will error if multiple configurations are provided (ie. s3 and azure). This allows us to determine the correct value for
ruler.storage.type
andcompactor.shared_store
. Loki supports configuring multiple client types for chunk storage in thestorage_config
section, allowing different clients to be used for different schemas. If a user desires this behavior, they will need to provide the multiple different configurations in thestorage_config
section themselves.Which issue(s) this PR fixes:
Fixes #4472
Special notes for your reviewer:
Checklist