diff --git a/chart/prometheus-mongodb-query-exporter/Chart.yaml b/chart/prometheus-mongodb-query-exporter/Chart.yaml index e14caf11..24dfd239 100644 --- a/chart/prometheus-mongodb-query-exporter/Chart.yaml +++ b/chart/prometheus-mongodb-query-exporter/Chart.yaml @@ -15,4 +15,4 @@ keywords: name: prometheus-mongodb-query-exporter sources: - https://github.com/raffis/mongodb-query-exporter -version: 2.0.1 +version: 2.1.0 diff --git a/chart/prometheus-mongodb-query-exporter/templates/deployment.yaml b/chart/prometheus-mongodb-query-exporter/templates/deployment.yaml index 291cf3e5..2bdaf8a8 100644 --- a/chart/prometheus-mongodb-query-exporter/templates/deployment.yaml +++ b/chart/prometheus-mongodb-query-exporter/templates/deployment.yaml @@ -53,6 +53,12 @@ spec: - secretRef: name: {{ .Values.envFromSecret }} {{- end }} + {{- range $key, $value := .Values.extraEnvFieldPath }} + - name: {{ $key }} + valueFrom: + fieldRef: + fieldPath: {{ $value }} + {{- end }} image: "{{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} args: diff --git a/chart/prometheus-mongodb-query-exporter/values.yaml b/chart/prometheus-mongodb-query-exporter/values.yaml index 0c861665..3c293be2 100644 --- a/chart/prometheus-mongodb-query-exporter/values.yaml +++ b/chart/prometheus-mongodb-query-exporter/values.yaml @@ -127,6 +127,13 @@ envFromSecret: "" ## key: password extraEnvSecrets: {} +## A list of environment variables from fieldPath refs that will expose pod information to the container +## This can be useful for enriching the custom metrics with pod information +## example: +## extraEnvFieldPath: +## POD_NAME: metadata.name +extraEnvFieldPath: {} + securityContext: allowPrivilegeEscalation: false capabilities: