apache / couchdb-helm

Apache CouchDB Helm Chart
https://couchdb.apache.org/
Apache License 2.0
49 stars 64 forks source link

Update default CouchDB tag to 3.2.0 and expose Prometheus support. #57

Closed sag closed 3 years ago

sag commented 3 years ago

What this PR does / why we need it:

Bump CouchDB version to 3.2.0

CouchDB 3.2.0 adds built-in prometheus style metrics. These metrics are exposed at /_node/_local/_prometheus. Since this is part of the main http server, this endpoint is authenticated. CouchDB 3.2.0 Also adds configuration to expose the new metrics on another unauthenticated port. This PR also adds extra support for that new configuration.

New Variables

New variables that match the new CouchDB configuration have been added. prometheusPort.enabled - when true the new feature will be enabled prometheusPort.port - the new unauthenticated port prometheusPort.bind_address - the address to listen on

When prometheusPort.enabled is true:

This makes it possible to have prometheus scrape CouchDB metrics using a ServiceMonitor such as

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: couchdb
  labels:
    release: prometheus-stack
spec:
  selector:
    matchLabels:
      app:  couchdb
  endpoints:
  - port: metrics 
    path: /_node/_local/_prometheus

Referenced URLS:

Special notes for your reviewer:

Checklist

kocolosk commented 3 years ago

Thanks for this contribution! It looks quite nice, happy to merge it.