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

Thanos is not able to read redis password passed as environment variable #7872

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BouchaaraAdil
Copy link
Contributor

we don't have that problem with loki, and I think the reason is they use different redis package (go-redis), and also the interpretation of Password
Ref: https://github.com/grafana/loki/blob/main/pkg/storage/chunk/cache/redis_client.go#L69

with below config

    indexCacheConfig: |
      type: REDIS
      config:
        addr: ${THANOS_CACHE_REDIS_ENDPOINT}:6379
        password: ${THANOS_CACHE_REDIS_PASSWORD}
        ....

and

      - name: THANOS_CACHE_REDIS_PASSWORD
        valueFrom:
          secretKeyRef:
            name: thanos-metrics-redis
            key: password

we face

WRONGPASS invalid username-password pair or user is disabled.\ncreate REDIS index cache
  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Verification

…is_client.go#L69

Ref: https://github.com/grafana/loki/blob/main/pkg/storage/chunk/cache/redis_client.go#L69
make sure environment variables are parsed correctly:

```
    indexCacheConfig: |
      type: REDIS
      config:
        addr: ${THANOS_CACHE_REDIS_ENDPOINT}:6379
        password: ${THANOS_CACHE_REDIS_PASSWORD}
        ....
```

Signed-off-by: adil <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant