As is now, the chart only accounts for puppetdb-exporter and it does not allow the user to utilize any metrics scraping implementation other than the one provided by the use of monitoring.coreos.com/v1 which is not always the case.
The changes in this PR allow users to choose whether they want a serviceMonitor deployed or not on the account that they might have Prometheus scraping all services/pods/etc via the Kubernetes API.
In addition to that, it adds jmx-exporter which is commonly used to get all of the Puppetserver mbean metrics in the Prometheus format allowing for insightful dashboards/alerts. These exporters are deployed next to each Puppetserver, be it master or compiler. It is up to the user to ensure that the Puppetserver exposes JMX - I've added a comment in the extraEnv that contains an example of it.
Do note that this introduces a breaking change for current users of the metrics: section in values.yaml due to support of multiple exporters, each exporter is nested under an object representing it.
This PR also adds snapshots for all unittests that make it easier catch unexpected changes when editing templates. Note, that this will require updating snapshots when the version is incremented in Chart.yaml too - this is done by running helm unittest ./ -u since the version number is contained within them in all of the resources.
Removing the commented out prometheusRule from values.yaml as it is not really used anywhere even if you were to uncomment it (from what I can tell).
As is now, the chart only accounts for
puppetdb-exporter
and it does not allow the user to utilize any metrics scraping implementation other than the one provided by the use ofmonitoring.coreos.com/v1
which is not always the case.The changes in this PR allow users to choose whether they want a
serviceMonitor
deployed or not on the account that they might have Prometheus scraping all services/pods/etc via the Kubernetes API.In addition to that, it adds
jmx-exporter
which is commonly used to get all of the Puppetserver mbean metrics in the Prometheus format allowing for insightful dashboards/alerts. These exporters are deployed next to each Puppetserver, be it master or compiler. It is up to the user to ensure that the Puppetserver exposes JMX - I've added a comment in theextraEnv
that contains an example of it.Do note that this introduces a breaking change for current users of the
metrics:
section invalues.yaml
due to support of multiple exporters, each exporter is nested under an object representing it.This PR also adds snapshots for all unittests that make it easier catch unexpected changes when editing templates. Note, that this will require updating snapshots when the version is incremented in
Chart.yaml
too - this is done by runninghelm unittest ./ -u
since the version number is contained within them in all of the resources.Removing the commented out
prometheusRule
fromvalues.yaml
as it is not really used anywhere even if you were to uncomment it (from what I can tell).