Skip to content

Commit

Permalink
[stable/rabbitmq] Support configuration for the rabbitmq metrics expo…
Browse files Browse the repository at this point in the history
…rter (helm#12908)

- generic configuration via environment variables: `metrics.env`
  see https://github.com/kbudde/rabbitmq_exporter#configuration
- better default `capabilities` (faster metrics collection with recent
  rabbitmq servers): `metrics.capabilities`
  see https://github.com/kbudde/rabbitmq_exporter#extended-rabbitmq-capabilities

Signed-off-by: Thomas Riccardi <[email protected]>
  • Loading branch information
thomas-riccardi authored and eyenx committed May 28, 2019
1 parent 1db0cb3 commit 28ccf0e
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stable/rabbitmq/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: rabbitmq
version: 4.11.1
version: 4.12.0
appVersion: 3.7.14
description: Open source message broker software that implements the Advanced Message Queuing Protocol (AMQP)
keywords:
Expand Down
2 changes: 2 additions & 0 deletions stable/rabbitmq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ The following table lists the configurable parameters of the RabbitMQ chart and
| `metrics.image.repository` | Exporter image name | `kbudde/rabbitmq-exporter` |
| `metrics.image.tag` | Exporter image tag | `v0.29.0` |
| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` |
| `metrics.env` | Exporter [configuration environment variables](https://github.com/kbudde/rabbitmq_exporter#configuration) | `{}` |
| `metrics.resources` | Exporter resource requests/limit | `nil` |
| `metrics.capabilities` | Exporter: Comma-separated list of extended [scraping capabilities supported by the target RabbitMQ server](https://github.com/kbudde/rabbitmq_exporter#extended-rabbitmq-capabilities) | `bert,no_sort` |
| `podLabels` | Additional labels for the statefulset pod(s). | {} |
| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` |
| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` |
Expand Down
8 changes: 8 additions & 0 deletions stable/rabbitmq/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,14 @@ spec:
value: "http://localhost:{{ .Values.service.managerPort }}"
- name: RABBIT_USER
value: {{ .Values.rabbitmq.username }}
{{ if .Values.metrics.capabilities }}
- name: RABBIT_CAPABILITIES
value: "{{ .Values.metrics.capabilities }}"
{{- end }}
{{- range $key, $value := .Values.metrics.env }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
ports:
- name: metrics
containerPort: 9090
Expand Down
8 changes: 7 additions & 1 deletion stable/rabbitmq/values-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ service:
## ref: https://github.com/bitnami/bitnami-docker-rabbitmq#environment-variables
##
managerPort: 15672

## Service annotations
annotations:
# service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0
Expand Down Expand Up @@ -254,6 +254,12 @@ metrics:
##
# pullSecrets:
# - myRegistryKeySecretName
## environment variables to configure rabbitmq_exporter
## ref: https://github.com/kbudde/rabbitmq_exporter#configuration
env: {}
## Comma-separated list of extended scraping capabilities supported by the target RabbitMQ server
## ref: https://github.com/kbudde/rabbitmq_exporter#extended-rabbitmq-capabilities
capabilities: "bert,no_sort"
resources: {}
annotations:
prometheus.io/scrape: "true"
Expand Down
7 changes: 7 additions & 0 deletions stable/rabbitmq/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,13 @@ metrics:
##
# pullSecrets:
# - myRegistryKeySecretName

## environment variables to configure rabbitmq_exporter
## ref: https://github.com/kbudde/rabbitmq_exporter#configuration
env: {}
## Comma-separated list of extended scraping capabilities supported by the target RabbitMQ server
## ref: https://github.com/kbudde/rabbitmq_exporter#extended-rabbitmq-capabilities
capabilities: "bert,no_sort"
resources: {}
annotations:
prometheus.io/scrape: "true"
Expand Down

0 comments on commit 28ccf0e

Please sign in to comment.