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

[bitnami/thanos] support using an existing PVC for Thanos Ruler rules config files #31379

Open
jessebot opened this issue Jan 15, 2025 · 1 comment
Assignees
Labels

Comments

@jessebot
Copy link
Contributor

jessebot commented Jan 15, 2025

Name and Version

bitnami/thanos 15.9.2

What is the problem this feature will solve?

Right now, it is required that users of Thanos Ruler via the bitnami Thanos helm chart provide either of:

  • ruler.config (a string)
  • ruler.existingConfigmap (a configmap)

This assumes users want to provide their rules via a single ConfigMap or secret. I use the kiwigrid/k8s-sidecar sidecar container to automatically grab ConfigMaps matching a specific label and load them into a specific directory for Thanos Ruler to pick up. (This is similar to the same offering by Grafana for automatically detecting new Dashboards) Because of this, I can't provide either a ConfigMap nor the config string.

What is the feature you are proposing to solve the problem?

I'd like to see something like ruler.existingConfigClaim to allow using a persistent volume that both the Thanos ruler container and the side car container can mount. This would allow also for an initContainer to run before the ruler and populate the /config/rules directory. When combined with #31377 this can allow full self service of creating additional alerting rules, instead of having it centrally managed and overloading a specific team or team member to handle updates to one giant ConfigMap.

In the values.yaml, it could look like this:

ruler:
  ## @param ruler.existingConfigClaim provide an existing persistent volume claim to mount for the ruler's rules
  existingConfigClaim: ""

For reference, the ruler config is currently required to be a single config map here:

configMap:
name: {{ include "thanos.ruler.configmapName" . }}

This would need to be changed to allow something like:

        - name: ruler-config
          {{- if and .Values.ruler.existingConfigClaim (not .Values.ruler.config) (not .Values.ruler.existingConfigmap) }}
          persistentVolumeClaim:
            claimName: {{ .Values.ruler.existingConfigClaim }}
          {{- else }}
          configMap:
            name: {{ include "thanos.ruler.configmapName" . }}
          {{- end }}

I can work on this PR later today.

What alternatives have you considered?

No response

@github-actions github-actions bot added the triage Triage is needed label Jan 15, 2025
@carrodher
Copy link
Member

Thank you for bringing this issue to our attention. We appreciate your involvement! If you're interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.

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

No branches or pull requests

2 participants