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

Idea: API for read/write of runtime configuration #10365

Open
pjastrzabek opened this issue Jan 7, 2025 · 1 comment
Open

Idea: API for read/write of runtime configuration #10365

pjastrzabek opened this issue Jan 7, 2025 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@pjastrzabek
Copy link

pjastrzabek commented Jan 7, 2025

What is the problem you are trying to solve?

We deploy various applications in our testing pipelines and for each release we configure it with a sidecar that sends logs / metrics to separate tenant (let's say "app_version_xx").

We use shared mimir stack that is used for other purposes so default retention is set to 30 days, but for these adhoc tenants we want to set it to something shorter like 1day.
Each time we run pipeline, currently we need to log into kubernetes cluster, edit config map with runtime settings, add proper setting with an extra care for indentation (a mistake in this file, can render file to no longer reloading itself with a warning message in logs (which is good)).

We automated this, but we miss general API for reading / changing runtime settings. API that would work on json.

Which solution do you envision (roughly)?

  • having an API that returns json for reading runtime settings for all tenants / single tenant
  • having an API for setting runtime setting for tenant

Have you considered any alternatives?

We work on configmap with runtime settings directly, but it's error prone.

Any additional context to share?

No response

How long do you think this would take to be developed?

Small (<= 1 month dev)

What are the documentation dependencies?

No response

Proposer?

No response

@pjastrzabek pjastrzabek added the enhancement New feature or request label Jan 7, 2025
@colega
Copy link
Contributor

colega commented Feb 10, 2025

Hi,

We are not planning to add such features to Grafana Mimir. Adding an API to Grafana that would just edit the configmap sounds weird.

Each time we run pipeline, currently we need to log into kubernetes cluster, edit config map with runtime settings.
...
We automated this.

Can you explain which part you automated and how so I can provide you some guidance/hints on how to achieve what you need with least effort?
In general terms, seems like you want some gitops that validates that config is valid (by running mimir as CI step) and then just render that.

add proper setting with an extra care for indentation
...
API that would work on json.

Note that you can already render overrides as JSON, since JSON is valid YAML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants