Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Commit

Permalink
Add support for passing environment variables (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomislater authored and hjacobs committed Jul 24, 2019
1 parent d5acc11 commit bfe1c27
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion chart/kube-resource-report/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v1
appVersion: "0.14.1"
description: Report Kubernetes cluster and pod resource requests vs usage and generate static HTML
name: kube-resource-report
version: 0.2.1
version: 0.2.2
home: https://github.com/hjacobs/kube-resource-report.git
8 changes: 8 additions & 0 deletions chart/kube-resource-report/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ spec:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
# environment variables
{{- if .Values.env }}
env:
{{- end }}
{{- range $key, $value := .Values.env }}
- name: {{ $key }}
value: {{ tpl $value $ | quote }}
{{- end }}
args:
- --update-interval-minutes={{ .Values.updateInterval }}
{{- if .Values.addtionalCostPerCluster }}
Expand Down
6 changes: 6 additions & 0 deletions chart/kube-resource-report/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,9 @@ nodeSelector: {}
tolerations: []

affinity: {}

# e.g.
# env:
# NODE_LABEL_SPOT: "a.com/spot"
# OBJECT_LABEL_APPLICATION: "app,chart"
env: {}

0 comments on commit bfe1c27

Please sign in to comment.