Skip to content

Migrate object storage clients to use thanos objstore.Bucket implementations #2262

@jtlisi

Description

@jtlisi

Currently we have generic ObjectClient interface defined here:

// ObjectClient is used to store arbitrary data in Object Store (S3/GCS/Azure/Etc)
type ObjectClient interface {
PutObject(ctx context.Context, objectKey string, object io.ReadSeeker) error
GetObject(ctx context.Context, objectKey string) (io.ReadCloser, error)
List(ctx context.Context, prefix string) ([]StorageObject, error)
DeleteObject(ctx context.Context, objectKey string) error
Stop()
}

This interface is used by the pkg/chunk/objectclient to store chunks. It will also be used by @sandeepsukhani works on delete. I also utilize this interface for my rules/alerts branches. These clients are pretty generic and I think we might be able to utilize some off the shelf libraries instead of rolling our own object client. I found two potential libraries that might work:

  1. Go Cloud Development Kit

https://github.com/google/go-cloud

Keeps things very generic and easy for reuse.

  1. Reuse Thanos
    The Thanos libary is pretty full featured and would be able to do most of what we want. It would also be nice for unifying the two ecosystems.
    https://github.com/thanos-io/thanos/blob/master/pkg/objstore/objstore.go

Metadata

Metadata

Assignees

No one assigned

    Labels

    candidate/2.0staletype/choreSomething that needs to be done; not a bug or a featuretype/productionIssues related to the production use of Cortex, inc. configuration, alerting and operating.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions