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

Support optional ConfigMap volumes for alerting rules #4480

Closed
sl4dy opened this Issue Aug 8, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@sl4dy
Copy link

sl4dy commented Aug 8, 2018

Proposal

Support optional ConfigMap volumes for alerting rules

We provide ConfigMaps with alerting rules in Helm chart of particular application. However, we need to make Prometheus aware of such ConfigMaps prior to creating the particular Helm chart containing the given ConfigMap. I have tried to mark the ConfigMap volume as optional:

      volumes:
        - name: prometheus-config-volume
          configMap:
            name: prometheus-server-conf
        - name: rules-volume
          configMap:
            name: prometheus-rules
        - name: component-rules-volume
          configMap:
            name: component-rules
            optional: true

However Prometheus fails to start:

level=error ts=2018-07-25T09:56:53.963527236Z caller=manager.go:479 component="rule manager" msg="loading groups failed" err="read /etc/prometheus-rules/vertica-monitoring-rules.yaml: is a directory" level=error ts=2018-07-25T09:56:53.963723232Z caller=main.go:607 msg="Failed to apply configuration" err="error loading rules, previous rule set restored"

It would be great if Prometheus can ignore the file if it is directory - caused by the optional parameter in the volume.

@simonpasquier

This comment has been minimized.

Copy link
Member

simonpasquier commented Aug 13, 2018

In general the project prefers to fail hard on configuration errors (such as using a directory where the application expects a file) rather than silently catching the error and expecting the user to notice it.

@sl4dy

This comment has been minimized.

Copy link
Author

sl4dy commented Aug 14, 2018

Understood, but the optional volume is a great feature which cannot be used right now. Anyway, I get your point and I have handled the situation by ensuring that the rules configMap shall exist before mounting it.

@gouthamve gouthamve closed this Aug 29, 2018

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 22, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 22, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.