Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[prometheus-mysql-exporter]: introduce an ability to set additional env. variables for exporter container #5116

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion charts/prometheus-mysql-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: A Helm chart for prometheus mysql exporter with cloudsqlproxy
name: prometheus-mysql-exporter
version: 2.9.1
version: 2.10.0
home: https://github.com/prometheus/mysqld_exporter
appVersion: v0.17.2
sources:
11 changes: 11 additions & 0 deletions charts/prometheus-mysql-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -91,6 +91,17 @@ spec:
key: {{ .Values.mysql.existingPasswordSecret.key }}
{{- end }}
{{- end }}
{{- with .Values.extraEnvs }}
{{- if kindIs "map" . }}
{{- range $name, $value := . }}
- name: {{ $name }}
value: {{ tpl $value $ | quote }}
{{- end }}
{{- end }}
{{- if kindIs "slice" . -}}
{{ toYaml . | nindent 10 }}
{{- end }}
{{- end }}
ports:
- containerPort: {{ .Values.service.internalPort }}
livenessProbe:
9 changes: 9 additions & 0 deletions charts/prometheus-mysql-exporter/values.yaml
Original file line number Diff line number Diff line change
@@ -106,6 +106,15 @@ extraVolumes: []
# configMap:
# name: example

# ExtraEnvs
extraEnvs: []
# - name: EXTRA_ENV
# value: value
# - name: POD_NAMESPACE
# valueFrom:
# fieldRef:
# fieldPath: metadata.namespace

podSecurityContext: {}
# fsGroup: 65534