Skip to content

Commit

Permalink
[stable/mongodb] Allow extra parameters in metrics exporter (helm#11488)
Browse files Browse the repository at this point in the history
* [stable/mongodb] Allow extra parameters in metrics exporter

Signed-off-by: Javier J. Salmeron Garcia <[email protected]>

* Remove ghost values

Signed-off-by: Javier J. Salmeron Garcia <[email protected]>

* Remove trailing whitespace

Signed-off-by: Javier J. Salmeron Garcia <[email protected]>
  • Loading branch information
javsalgar authored and k8s-ci-robot committed Feb 18, 2019
1 parent 2978da5 commit dab07b1
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion stable/mongodb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: mongodb
version: 5.3.4
version: 5.4.0
appVersion: 4.0.6
description: NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications.
keywords:
Expand Down
1 change: 1 addition & 0 deletions stable/mongodb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ The following table lists the configurable parameters of the MongoDB chart and t
| `metrics.image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `metrics.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `metrics.podAnnotations` | Additional annotations for Metrics exporter pod | {} |
| `metrics.extraArgs` | String with extra arguments for the MongoDB Exporter | `` |
| `metrics.resources` | Exporter resource requests/limit | Memory: `256Mi`, CPU: `100m` |
| `metrics.serviceMonitor.enabled` | Create ServiceMonitor Resource for scraping metrics using PrometheusOperator | `false` |
| `metrics.serviceMonitor.additionalLabels` | Used to pass Labels that are required by the Installed Prometheus Operator | {} |
Expand Down
4 changes: 2 additions & 2 deletions stable/mongodb/templates/deployment-standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ spec:
secretKeyRef:
name: {{ if .Values.existingSecret }}{{ .Values.existingSecret }}{{- else }}{{ template "mongodb.fullname" . }}{{- end }}
key: mongodb-root-password
command: [ 'sh', '-c', '/bin/mongodb_exporter --mongodb.uri mongodb://root:${MONGODB_ROOT_PASSWORD}@localhost:{{ .Values.service.port }}/admin' ]
command: [ 'sh', '-c', '/bin/mongodb_exporter --mongodb.uri mongodb://root:${MONGODB_ROOT_PASSWORD}@localhost:{{ .Values.service.port }}/admin {{ .Values.metrics.extraArgs }}' ]
{{- else }}
command: [ 'sh', '-c', '/bin/mongodb_exporter --mongodb.uri mongodb://localhost:{{ .Values.service.port }}' ]
command: [ 'sh', '-c', '/bin/mongodb_exporter --mongodb.uri mongodb://localhost:{{ .Values.service.port }} {{ .Values.metrics.extraArgs }}' ]
{{- end }}
ports:
- name: metrics
Expand Down
4 changes: 2 additions & 2 deletions stable/mongodb/templates/statefulset-primary-rs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ spec:
secretKeyRef:
name: {{ if .Values.existingSecret }}{{ .Values.existingSecret }}{{- else }}{{ template "mongodb.fullname" . }}{{- end }}
key: mongodb-root-password
command: [ 'sh', '-c', '/bin/mongodb_exporter --mongodb.uri mongodb://root:${MONGODB_ROOT_PASSWORD}@localhost:{{ .Values.service.port }}/admin' ]
command: [ 'sh', '-c', '/bin/mongodb_exporter --mongodb.uri mongodb://root:${MONGODB_ROOT_PASSWORD}@localhost:{{ .Values.service.port }}/admin {{ .Values.metrics.extraArgs }}' ]
{{- else }}
command: [ 'sh', '-c', '/bin/mongodb_exporter --mongodb.uri mongodb://localhost:{{ .Values.service.port }}' ]
command: [ 'sh', '-c', '/bin/mongodb_exporter --mongodb.uri mongodb://localhost:{{ .Values.service.port }} {{ .Values.metrics.extraArgs }}' ]
{{- end }}
ports:
- name: metrics
Expand Down
4 changes: 2 additions & 2 deletions stable/mongodb/templates/statefulset-secondary-rs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ spec:
secretKeyRef:
name: {{ if .Values.existingSecret }}{{ .Values.existingSecret }}{{- else }}{{ template "mongodb.fullname" . }}{{- end }}
key: mongodb-root-password
command: [ 'sh', '-c', '/bin/mongodb_exporter --mongodb.uri mongodb://root:${MONGODB_ROOT_PASSWORD}@localhost:{{ .Values.service.port }}/admin' ]
command: [ 'sh', '-c', '/bin/mongodb_exporter --mongodb.uri mongodb://root:${MONGODB_ROOT_PASSWORD}@localhost:{{ .Values.service.port }}/admin {{ .Values.metrics.extraArgs }}' ]
{{- else }}
command: [ 'sh', '-c', '/bin/mongodb_exporter --mongodb.uri mongodb://localhost:{{ .Values.service.port }}' ]
command: [ 'sh', '-c', '/bin/mongodb_exporter --mongodb.uri mongodb://localhost:{{ .Values.service.port }} {{ .Values.metrics.extraArgs }}' ]
{{- end }}
ports:
- name: metrics
Expand Down
3 changes: 3 additions & 0 deletions stable/mongodb/values-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ metrics:
# pullSecrets:
# - myRegistrKeySecretName

## String with extra arguments to the metrics exporter
## ref: https://github.com/dcu/mongodb_exporter/blob/master/mongodb_exporter.go
extraArgs: ""
## Metrics exporter resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
Expand Down
3 changes: 3 additions & 0 deletions stable/mongodb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ metrics:
# pullSecrets:
# - myRegistrKeySecretName

## String with extra arguments to the metrics exporter
## ref: https://github.com/dcu/mongodb_exporter/blob/master/mongodb_exporter.go
extraArgs: ""
## Metrics exporter resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
Expand Down

0 comments on commit dab07b1

Please sign in to comment.