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: falseand 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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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
queryandhttp.configare passed in via the Helm chart. So I can't manually specify an additional flag ofhttp.configbecause of duplicate keys, which could include mybasic_authcredentials 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_authand the rest of the components requirebasic_auth_usersconfiguration?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