Thanos Ruler: got 401 Body: Unauthorized #7351
Unanswered
JoshuaSmeda
asked this question in
Questions & Answers
Replies: 1 comment
-
Hi @JoshuaSmeda, I had similar issue with ThanosRuler authentication. If you want to configure that in helm chart you have to do a workaround by editing ruler values like that: ruler:
extraVolumeMounts:
- name: query-config
mountPath: /mnt/query-config
extraVolumes:
- name: query-config
secret:
defaultMode: 420
secretName: thanos-ruler-query-config
extraFlags:
- '--query.config-file=/mnt/query-config.yaml'
dnsDiscovery:
enabled: false and secret with query-config should look like this: apiVersion: v1
kind: Secret
metadata:
name: thanos-ruler-query-config
namespace: thanos
stringData:
query-config.yaml: |-
- static_configs:
- "thanos-query.thanos:9090"
scheme: http
http_config:
basic_auth:
username: admin
password: password |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context:
I'm busy setting up a Thanos stack. So far, things have been smooth sailing.
I've deployed the stack using a Helm Chart
I've added basic authentication:
which generates something similar to this:
which is injected into all my pods.
My problem:
I cannot get my Thanos Ruler to authenticate to my Thanos query API.
The error I receive:
My arguments passed into the Ruler container, this worked perfectly fine without authentication:
The
query
andhttp.config
are passed in via the Helm chart. So I can't manually specify an additional flag ofhttp.config
because of duplicate keys, which could include mybasic_auth
credentials as described here.How am I supposed to authenticate to the query API? Is there a simpler way that I may be missing?
And why is there a disparity between the different Thanos components? Why does the query API leverage
basic_auth
and the rest of the components requirebasic_auth_users
configuration?I hope I explained my problem clearly enough. If you have any comments, questions, or suggestions, please do reply.
Beta Was this translation helpful? Give feedback.
All reactions