Skip to content

Commit

Permalink
[prometheus-json-exporter] Add support for env variables (#2807)
Browse files Browse the repository at this point in the history
* Add support for env variables in json-exporter

Signed-off-by: Tijmen34 <[email protected]>

* Update Chart.yaml

Signed-off-by: Tijmen Stor <[email protected]>

* Update charts/prometheus-json-exporter/templates/deployment.yaml

Co-authored-by: MH <[email protected]>
Signed-off-by: Tijmen Stor <[email protected]>

* Update charts/prometheus-json-exporter/templates/deployment.yaml

Co-authored-by: André Bauer <[email protected]>
Signed-off-by: Tijmen Stor <[email protected]>

* Update ordering

Signed-off-by: Tijmen34 <[email protected]>

Signed-off-by: Tijmen34 <[email protected]>
Signed-off-by: Tijmen Stor <[email protected]>
Co-authored-by: MH <[email protected]>
Co-authored-by: André Bauer <[email protected]>
  • Loading branch information
3 people authored Dec 21, 2022
1 parent fa28a44 commit 5c2fafa
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/prometheus-json-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.5.0
version: 0.6.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
8 changes: 6 additions & 2 deletions charts/prometheus-json-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ spec:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- with .Values.environmentVariables }}
env:
{{- toYaml . | nindent 12}}
{{- end }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
Expand All @@ -57,6 +59,8 @@ spec:
{{- with .Values.additionalVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
volumes:
- name: config-configmap-volume
configMap:
Expand Down
9 changes: 9 additions & 0 deletions charts/prometheus-json-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ resources: {}
# cpu: 100m
# memory: 128Mi

environmentVariables: []
# - name: some-secret-variable
# valueFrom:
# secretKeyRef:
# key: some-key
# name: some-secret-name
# - name: some-other-variable
# value: some-value

autoscaling:
enabled: false
minReplicas: 1
Expand Down

0 comments on commit 5c2fafa

Please sign in to comment.