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

Adds bearer token support for mimirtool's analyze ruler/prometheus co… #9587

Merged
merged 4 commits into from
Oct 11, 2024

Conversation

mtweten
Copy link
Contributor

@mtweten mtweten commented Oct 10, 2024

…mmands

What this PR does

mimirtool has support for authenticating using --auth-token (since #2146) to supply a bearer token for the rules command, but the analyze ruler and analyze prometheus commands do not currently support using a bearer token. This PR adds support for that.

Checklist

  • Tests updated.
  • Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX].
  • about-versioning.md updated with experimental features.

@mtweten mtweten requested review from tacole02 and a team as code owners October 10, 2024 21:14
@CLAassistant
Copy link

CLAassistant commented Oct 10, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@tacole02 tacole02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

| Environment variable | Flag | Description |
| -------------------- | --------------- | --------------------------------------------------------------------------------------------------- |
| `MIMIR_ADDRESS` | `--address` | Sets the address of the Prometheus instance. |
| `MIMIR_TENANT_ID` | `--id` | Sets the basic auth username. If you're using Grafana Cloud, this variable is your instance ID. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `MIMIR_TENANT_ID` | `--id` | Sets the basic auth username. If you're using Grafana Cloud, this variable is your instance ID. |
| `MIMIR_TENANT_ID` | `--id` | Sets the basic authentication username. If you're using Grafana Cloud, this variable is your instance ID. |

| -------------------- | --------------- | --------------------------------------------------------------------------------------------------- |
| `MIMIR_ADDRESS` | `--address` | Sets the address of the Prometheus instance. |
| `MIMIR_TENANT_ID` | `--id` | Sets the basic auth username. If you're using Grafana Cloud, this variable is your instance ID. |
| `MIMIR_API_KEY` | `--key` | Sets the basic auth password. If you're using Grafana Cloud, this variable is your API key. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `MIMIR_API_KEY` | `--key` | Sets the basic auth password. If you're using Grafana Cloud, this variable is your API key. |
| `MIMIR_API_KEY` | `--key` | Sets the basic authentication password. If you're using Grafana Cloud, this variable is your API key. |

| `MIMIR_ADDRESS` | `--address` | Sets the address of the Prometheus instance. |
| `MIMIR_TENANT_ID` | `--id` | Sets the basic auth username. If you're using Grafana Cloud, this variable is your instance ID. |
| `MIMIR_API_KEY` | `--key` | Sets the basic auth password. If you're using Grafana Cloud, this variable is your API key. |
| `MIMIR_AUTH_TOKEN` | `--auth-token` | Sets bearer or JWT token that is required for Mimir clusters authenticating by bearer or JWT token. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `MIMIR_AUTH_TOKEN` | `--auth-token` | Sets bearer or JWT token that is required for Mimir clusters authenticating by bearer or JWT token. |
| `MIMIR_AUTH_TOKEN` | `--auth-token` | Sets the bearer or JWT token that is required for Mimir clusters authenticating with this method. |

Copy link
Contributor

@56quarters 56quarters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo @tacole02's suggestions. Thanks!

@mtweten
Copy link
Contributor Author

mtweten commented Oct 10, 2024

Updated verbiage based on @tacole02 suggestions - made my own commit instead of taking the suggestions just to make sure the table spacing looked right.

@tacole02
Copy link
Contributor

Updated verbiage based on @tacole02 suggestions - made my own commit instead of taking the suggestions just to make sure the table spacing looked right.

Thanks, @mtweten !

@56quarters 56quarters enabled auto-merge (squash) October 11, 2024 12:38
@56quarters 56quarters merged commit 2e52389 into grafana:main Oct 11, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants