-
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
S3 storage configuration of LokiStack through the secret does not work properly #12608
Comments
The configuration of the S3 store for the LokiStack instance through this secret seems to have even more bugs. For example, in my first attempt, I accidentially had a data.region value (of "US") in it (from a template where I copied it from). This made lokistack assume the S3 store would live on AWS even though it was set to "type: s3" and not "type: aws", also leading to a strange error message. |
It turns out that the bug is that the compactor (and perhaps other components that use S3/MinIO) fails if the endpoint URL in the secret is a "short" one, e.g. "http://minio:9000". The problem is solved by using a FQDN, e.g. "http://minio.openshift-logging.svc.cluster.local:9000" instead. However, a short URL should normally work equally well. The bug is that with Loki it doesn't. |
@kai-uwe-rommel Thanks for reporting this, I believe the Loki S3 configuration has always been a bit tricky. This stems from the fact supporting two ways to say which endpoint
TL;DR; We streamlined the config generation to always use |
So, one of these validation cases fails (although the secret's endpoint element was there and valid) and causes the pod to crashloop? :-) |
Not exactly. First things first we don't separate the secret type into a category s3 and one for aws. For legacy reason the type s3 is used for both. However the Loki s3_storage_config allows two combinations to declare the target endpoint: s3+region (meant for aws) and endpoint (meant for everything else including the case private/wnterprise proxies that relay to AWS). Historically users and the operators maintainers included here made the mistake to mix this two and in turn trigger unwanted behavior in the AWS SDK (e.g. replacing your endpoint with .amazonaws.com). Therefore we concluded to use only endpoint and make the right choices for everybody using AWS, i.e Building the url from region and setting virtual host style. |
Describe the bug
I am trying to deploy a LokiStack using the Operator on Openshift and a local Minio instance in the same namespace. The deployment itself is working correctly (as far as I can see). But afterwards, the compactor pod crashloops complaining it does not find the endpoint in the secret. But it is there.
To Reproduce
Steps to reproduce the behavior:
failed to init delete store: failed to get s3 object: MissingEndpoint: 'Endpoint' configuration is required for this service
Expected behavior
The configured secret DOES contain the endpoint. So the compactor should not fail.
Environment:
Screenshots, Promtail config, or terminal output
This is what the secret looks like in a test environment:
And this is the lokistack instance object:
The text was updated successfully, but these errors were encountered: