Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[prometheus-consul-exporter] Unable to disable Consul health summary #14589

Closed
jfiedler opened this issue Jun 7, 2019 · 0 comments · Fixed by #14694
Closed

[prometheus-consul-exporter] Unable to disable Consul health summary #14589

jfiedler opened this issue Jun 7, 2019 · 0 comments · Fixed by #14694

Comments

@jfiedler
Copy link
Contributor

jfiedler commented Jun 7, 2019

Describe the bug

The Prometheus consul exporter Helm charts allows to provide options to be passed to the actual exporter. The way options are rendered does not allow to specify options without values. This is however required for boolean options, eg. --no-consul.health-summary

Version of Helm and Kubernetes:

helm version
Client: &version.Version{SemVer:"v2.14.0", GitCommit:"05811b84a3f93603dd6c2fcfe57944dfa7ab7fd0", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.14.0", GitCommit:"05811b84a3f93603dd6c2fcfe57944dfa7ab7fd0", GitTreeState:"clean"}
kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.2", GitCommit:"66049e3b21efe110454d67df4fa62b08ea79a19b", GitTreeState:"clean", BuildDate:"2019-05-16T18:55:03Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.2", GitCommit:"66049e3b21efe110454d67df4fa62b08ea79a19b", GitTreeState:"clean", BuildDate:"2019-05-16T16:14:56Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}

Which chart:

prometheus-consul-exporter

What happened:

I was unable to disable the export service health summary which is enabled by default and requires a boolean option to be provided.

What you expected to happen:

I expected to be able to turn off --consul.health-summary (whose default is true) by providing its negative form --nconsul.health-summary

How to reproduce it (as minimally and precisely as possible):

values.yaml like this

prometheus-consul-exporter:
  consulServer: xxx:8500
  options:
    - no-consul.health-summary:

leads to K8s container args like this:

Args:                                                                                                                                                                                                         
      --consul.server=xxx:8500                                                                                                                                                                  
      --no-consul.health-summary=

and error message like this

consul_exporter: error: unexpected , try --help

Anything else we need to know:

I'd suggest to turn the options into a simple string array at the values.yaml level so that users have full control over what is being passed to the exporter.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant